diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2026-06-25 17:59:05 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-06-25 17:59:16 -0700 |
| commit | a7e213a66adda0c13936ad920c5501acc54c1c25 (patch) | |
| tree | 2b49f1b4fc20eaca2147fe4ce289f244c0048708 /scripts/sbom/git@git.tavy.me:linux-stable.git | |
| parent | fbc10dff7846206585b02864fef4ebfd7cadf6e2 (diff) | |
| parent | 8a870967ca612933974808e6f4725613fea0cece (diff) | |
Merge branch 'bpf-mask-pseudo-pointer-values-in-verifier-logs'
Nuoqi Gui says:
====================
bpf: Mask pseudo pointer values in verifier logs
Verifier log printing already hides ldimm64 immediates for map FD and
map value pseudo sources when pointer leaks are not allowed. The same
print path also sees rewritten immediates for BPF_PSEUDO_MAP_IDX,
BPF_PSEUDO_MAP_IDX_VALUE, and BPF_PSEUDO_BTF_ID, but those sources were
not included in the pointer classification.
Extend the existing masking so all pointer-producing ldimm64 pseudo
sources print as 0x0 when allow_ptr_leaks is false.
Patch 1 extends the disassembler-side masking.
Patch 2 adds verifier selftest coverage for pseudo-BTF ksym logs.
Signed-off-by: Nuoqi Gui <gnq25@mails.tsinghua.edu.cn>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
---
Changes in v2:
- Replace the CAP_BPF gate with verifier-log masking in print_bpf_insn().
- Also mask BPF_PSEUDO_MAP_IDX and BPF_PSEUDO_MAP_IDX_VALUE immediates.
- Update selftests to check masked pseudo-BTF ksym logs.
- Link to v1: https://patch.msgid.link/20260620-f01-13-pseudo-btf-id-cap-bpf-v1-0-f950f69fe60c@mails.tsinghua.edu.cn
====================
Link: https://patch.msgid.link/20260623-f01-13-pseudo-btf-id-cap-bpf-v2-0-a190ebb8f3e2@mails.tsinghua.edu.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/sbom/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
