Re: [PATCH v3 bpf-next 03/10] bpf: fix check for attempt to corrupt spilled pointer

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

 



On Tue, 2023-12-05 at 00:12 +0200, Eduard Zingerman wrote:
[...]
> diff --git a/tools/testing/selftests/bpf/test_loader.c b/tools/testing/selftests/bpf/test_loader.c
> index a350ecdfba4a..a5ad6b01175e 100644
> --- a/tools/testing/selftests/bpf/test_loader.c
> +++ b/tools/testing/selftests/bpf/test_loader.c
> @@ -430,7 +430,7 @@ struct cap_state {
>  static int drop_capabilities(struct cap_state *caps)
>  {
>         const __u64 caps_to_drop = (1ULL << CAP_SYS_ADMIN | 1ULL << CAP_NET_ADMIN |
> -                                   1ULL << CAP_PERFMON   | 1ULL << CAP_BPF);
> +                                   1ULL << CAP_PERFMON /*| 1ULL << CAP_BPF */);
>         int err;
>  
>         err = cap_disable_effective(caps_to_drop, &caps->old_caps);

(Here I hack test_loader so that unpriv run has CAP_BPF,
 the test could be run as follows:
 ./test_progs -vvv -a 'verifier_basic_stack/spill_lo32_write_hi32 @unpriv')





[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