Re: [bpf-next v9 2/2] bpf: Add tests for bpf_copy_from_user_str kfunc

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

 



On Fri, Aug 23, 2024 at 11:49 AM Jordan Rome <linux@xxxxxxxxxxxxxx> wrote:
>
> +u32 dynamic_sz = 1;

..

> +
> +       // Make sure this passes the verifier
> +       ret = bpf_copy_from_user_str(data_long, dynamic_sz &= sizeof(data_long), user_ptr, 0);

Did you really mean to &= into the global variable while passing it as
an argument?

And the compiler didn't warn?





[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