mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] bpf: Require CAP_BPF for pseudo-BTF ksym loads
@ 2026-06-19 16:04 Nuoqi Gui
  2026-06-19 16:04 ` [PATCH bpf-next 1/2] " Nuoqi Gui
  2026-06-19 16:04 ` [PATCH bpf-next 2/2] selftests/bpf: Cover pseudo-BTF ksym load capability Nuoqi Gui
  0 siblings, 2 replies; 5+ messages in thread
From: Nuoqi Gui @ 2026-06-19 16:04 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Eduard Zingerman, Kumar Kartikeya Dwivedi, Song Liu,
	Yonghong Song, Jiri Olsa, Emil Tsalapatis, Hao Luo
  Cc: John Fastabend, Martin KaFai Lau, Shuah Khan, bpf,
	linux-kselftest, linux-kernel, Nuoqi Gui

BPF_PSEUDO_BTF_ID resolves a BTF id for a kernel symbol into a concrete
kernel address before the main verifier pass. A raw ldimm64 using this
pseudo source can currently reach kallsyms resolution without CAP_BPF,
and verbose verifier logging can print the rewritten immediate.

Require CAP_BPF before pseudo-BTF ksym materialization and add focused
verifier selftests for both the no-CAP rejection and the CAP_BPF-allowed
case.

Fixes: 4976b718c3551 ("bpf: Introduce pseudo_btf_id")

Signed-off-by: Nuoqi Gui <gnq25@mails.tsinghua.edu.cn>
---
Nuoqi Gui (2):
      bpf: Require CAP_BPF for pseudo-BTF ksym loads
      selftests/bpf: Cover pseudo-BTF ksym load capability

 kernel/bpf/verifier.c                              |  5 ++++
 .../testing/selftests/bpf/progs/verifier_unpriv.c  | 32 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)
---
base-commit: a3847994b4d20c0701ccc54fe110920ea78e73dc
change-id: 20260619-f01-13-pseudo-btf-id-cap-bpf-585f98eac268

Best regards,
--  
Nuoqi Gui <gnq25@mails.tsinghua.edu.cn>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-20 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-19 16:04 [PATCH bpf-next 0/2] bpf: Require CAP_BPF for pseudo-BTF ksym loads Nuoqi Gui
2026-06-19 16:04 ` [PATCH bpf-next 1/2] " Nuoqi Gui
2026-06-19 20:05   ` Eduard Zingerman
2026-06-20 15:34     ` Nuoqi Gui
2026-06-19 16:04 ` [PATCH bpf-next 2/2] selftests/bpf: Cover pseudo-BTF ksym load capability Nuoqi Gui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®