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:
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)
|
struct bpf_insn_access_aux *info)
|
||||||
{
|
{
|
||||||
switch (off) {
|
switch (off) {
|
||||||
|
case offsetof(struct sk_buff, len):
|
||||||
|
return true;
|
||||||
case offsetof(struct sk_buff, data):
|
case offsetof(struct sk_buff, data):
|
||||||
info->reg_type = PTR_TO_PACKET;
|
info->reg_type = PTR_TO_PACKET;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user