提交 29d1b33a 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

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: NJakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
Acked-by: NAlexei Starovoitov <ast@kernel.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4f9218aa
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册