Commit 10fa03a9 authored by Kui-Feng Lee's avatar Kui-Feng Lee Committed by Greg Kroah-Hartman
Browse files

bpf: Print a warning only if writing to unprivileged_bpf_disabled.



[ Upstream commit fedf9920 ]

Only print the warning message if you are writing to
"/proc/sys/kernel/unprivileged_bpf_disabled".

The kernel may print an annoying warning when you read
"/proc/sys/kernel/unprivileged_bpf_disabled" saying

  WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible
  via Spectre v2 BHB attacks!

However, this message is only meaningful when the feature is
disabled or enabled.

Signed-off-by: default avatarKui-Feng Lee <kuifeng@meta.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20230502181418.308479-1-kuifeng@meta.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8d134210
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment