[LTP] [PATCH 1/1] bpf_prog0[5-7]: Run with kernel.unprivileged_bpf_disabled = 0
Cyril Hrubis
chrubis@suse.cz
Fri Aug 19 10:27:21 CEST 2022
Hi!
> --- a/testcases/kernel/syscalls/bpf/bpf_prog05.c
> +++ b/testcases/kernel/syscalls/bpf/bpf_prog05.c
> @@ -209,6 +209,11 @@ static struct tst_test test = {
> {&msg, .size = sizeof(MSG)},
> {}
> },
> + .needs_root = 1,
> + .save_restore = (const struct tst_path_val[]) {
> + {"?/proc/sys/kernel/unprivileged_bpf_disabled", "0"},
> + {}
> + },
If we set needs_root the test would run under root and there is no need
to fiddle with the unprivileged_bpf_disabled at all.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list