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. 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