Re: [PATCH v3 bpf-next 3/3] bpf: Add cb access in kfree_skb test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 6, 2019 at 5:47 PM Martin KaFai Lau <kafai@xxxxxx> wrote:
>
> Access the skb->cb[] in the kfree_skb test.
>
> Signed-off-by: Martin KaFai Lau <kafai@xxxxxx>
> ---

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

>  .../selftests/bpf/prog_tests/kfree_skb.c      | 54 +++++++++++++++----
>  tools/testing/selftests/bpf/progs/kfree_skb.c | 25 +++++++--
>  2 files changed, 63 insertions(+), 16 deletions(-)
>

[...]

>
> +       meta.ifindex = _(dev->ifindex);
> +       meta.cb8_0 = cb8[8];
> +       meta.cb32_0 = cb32[2];

Have you tried doing it inside __builtin_preserve_access_index region?
Does it fail because of extra allocations against meta?

> +
>         bpf_probe_read_kernel(&pkt_type, sizeof(pkt_type), _(&skb->__pkt_type_offset));
>         pkt_type &= 7;
>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux