bpf/bpftool: add unprivileged_bpf_disabled check against value of 2
Subsystems (4)
PATCH 1/1 bpf/bpftool: add unprivileged_bpf_disabled check against value of 2
In [1], we added a kconfig knob that can set/proc/sys/kernel/unprivileged_bpf_disabled to 2
We now check against this value in bpftool feature probe
--- tools/bpf/bpftool/feature.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/bpf/bpftool/feature.c +4 -1
@@ -207,7 +207,10 @@ static void probe_unprivileged_disabled(void)printf ("bpf() syscall for unprivileged users is enabled\n" );break ;case 1 : -printf ("bpf() syscall restricted to privileged users\n" ); +printf ("bpf() syscall restricted to privileged users (without recovery)\n" ); +break ; +case 2 : +printf ("bpf() syscall restricted to privileged users (admin can change)\n" );break ;case -1 :printf ("Unable to retrieve required privileges for bpf() syscall\n" );
Signature · 1 line
2.32.0
2022-03-22 10:49 UTC-0400 ~ Milan Landaverde <[email protected]>
Quoted 8 lines
In [1], we added a kconfig knob that can set
/proc/sys/kernel/unprivileged_bpf_disabledto 2We now check against this value in bpftool feature probe
Signed-off-by Milan Landaverde <[email protected]>
Thanks!
KP Singh
Acked-byQuoted 5 lines · Quentin Monnet
2022-03-22 10:49 UTC-0400 ~ Milan Landaverde <[email protected]>
Quoted 3 lines
In [1], we added a kconfig knob that can set
/proc/sys/kernel/unprivileged_bpf_disabledto 2
Quoted 7 lines
Quoted 5 lines
We now check against this value in bpftool feature probe
Signed-off-by Milan Landaverde <[email protected]>Acked-by Quentin Monnet <[email protected]>
Thanks, this is very useful!
This patch was applied to bpf/bpf.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov <[email protected]>:
Quoted 8 lines · On Tue, 22 Mar 2022 10:49:45 -0400 you wrote:
In [1], we added a kconfig knob that can set
/proc/sys/kernel/unprivileged_bpf_disabledto 2We now check against this value in bpftool feature probe
[...]
Here is the summary with links:
- [bpf-next] bpf/bpftool: add unprivileged_bpf_disabled check against value of 2
https://git.kernel.org/bpf/bpf/c/8c1b21198551
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html