[PATCH bpf-next v2 0/4] Fixes for stack with allow_ptr_leaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Two fixes for usability/correctness gaps when interacting with the stack
without CAP_PERFMON (i.e. with allow_ptr_leaks = false). See the commits
for details. I've verified that the tests fail when run without the fixes.

Changelog:
----------
v1 -> v2
v1: https://lore.kernel.org/bpf/20241127185135.2753982-1-memxor@xxxxxxxxx

 * Fix CI errors in selftest by removing dependence on BPF_ST

Kumar Kartikeya Dwivedi (3):
  bpf: Don't relax STACK_INVALID to STACK_MISC when not allow_ptr_leaks
  selftests/bpf: Add test for reading from STACK_INVALID slots
  selftests/bpf: Add test for narrow spill into 64-bit spilled scalar

Tao Lyu (1):
  bpf: Fix narrow scalar spill onto 64-bit spilled scalar slots

 kernel/bpf/verifier.c                         |  3 +-
 .../selftests/bpf/prog_tests/verifier.c       | 41 ++++++++++++++++---
 .../selftests/bpf/progs/verifier_spill_fill.c | 18 ++++----
 .../bpf/progs/verifier_stack_noperfmon.c      | 36 ++++++++++++++++
 4 files changed, 82 insertions(+), 16 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/verifier_stack_noperfmon.c


base-commit: c8d02b547363880d996f80c38cc8b997c7b90725
-- 
2.43.5





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux