mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 20:02:10 -04:00
bpf: allow access to skb->len from offloads
Since we are now doing strict checking of what offloads may access, make sure skb->len is on that list. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4f9218aaf8
commit
29d1b33a2e
@@ -3738,6 +3738,8 @@ tc_cls_act_is_valid_access_analyzer(int off, int size,
|
||||
struct bpf_insn_access_aux *info)
|
||||
{
|
||||
switch (off) {
|
||||
case offsetof(struct sk_buff, len):
|
||||
return true;
|
||||
case offsetof(struct sk_buff, data):
|
||||
info->reg_type = PTR_TO_PACKET;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user