Re: [PATCH bpf-next 16/18] selftests/bpf: add checks for bpf_wq_set_callback()

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

 



On Tue, Apr 16, 2024 at 7:11 AM Benjamin Tissoires <bentiss@xxxxxxxxxx> wrote:
[...]

> +SEC("?tc")
> +__log_level(2)
> +__failure
> +/* check that the first argument of bpf_wq_set_callback()
> + * is a correct bpf_wq pointer.
> + */
> +__msg("mark_precise: frame0: regs=r1 stack= before")

This line and some other "mark_precise" lines are causing issues for
test_progs-no_alu32 in the CI. I can reproduce it in my local tests.

I am not quite sure what is the best fix. Maybe we can just
remove it.

Thanks,
Song

> +__msg(": (85) call bpf_wq_set_callback_impl#") /* anchor message */
> +__msg("off 1 doesn't point to 'struct bpf_wq' that is at 0")
> +long test_wrong_wq_pointer_offset(void *ctx)
> +{
> +       int key = 0;
> +       struct bpf_wq *wq;
> +
> +       wq = bpf_map_lookup_elem(&array, &key);
> +       if (!wq)
> +               return 1;
> +
> +       if (bpf_wq_init(wq, &array, 0))
> +               return 2;
> +
> +       if (bpf_wq_set_callback((void *)wq + 1, wq_cb_sleepable, 0))
> +               return 3;
> +
> +       return -22;
> +}
>
> --
> 2.44.0
>





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux