summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2026-10-06 01:28:49 +0200
committerKumar Kartikeya Dwivedi <memxor@gmail.com>2026-10-06 01:29:12 +0200
commite1d84a37cba984388988d2f1ddc84561413f0db2 (patch)
treedea6f8fcffc5788669fbfe1391dd2a390a2c8187 /include/uapi/linux
parentb65cc81792eb07436879d9f0be8ebd18a78fffb4 (diff)
parentb04ba9375a9e73f554183ea851cecce475cd1f80 (diff)
downloadlinux-next-e1d84a37cba984388988d2f1ddc84561413f0db2.tar.gz
linux-next-e1d84a37cba984388988d2f1ddc84561413f0db2.zip
Merge branch 'bpf-destroy-callee-local-dynptrs-on-subprog-return'
Xu Yunxiang says: ==================== bpf: Destroy callee-local dynptrs on subprog return A dynptr data slice is valid only while the specific dynptr that produced it remains valid. Apply normal dynptr stack-slot teardown before a callee frame disappears, so its descendants are invalidated and its last release-capable referenced dynptr cannot be lost. Patch 1 adds a helper to destroy dynptrs in an inclusive range of stack slots and reuses it for initialization, variable-offset writes and subprogram returns. The callback diagnostic expectation changes in that same commit. Patch 2 tests callee-local slices, last-holder rejection and caller-owned slice compatibility. Changes in v6, following Amery's review: - Replace destroy_dynptrs_on_func_exit() with the generic destroy_dynptrs_in_stack_slots() and use it at all three call sites. - Add the requested blank line before return-time teardown. - Clarify callee-local clone comments and rename the rejection test to callee_dynptr_slice_invalid_after_return(). - Rebase onto bpf-next ea9358e1270ab. v5: https://lore.kernel.org/r/20260920210438.345847-1-xyx2021@mail.ustc.edu.cn Review: https://lore.kernel.org/r/CAMB2axMmrTb+UZ84UD48MwMtXbk1s9bWtreU3AOfjzU0fPT0BA@mail.gmail.com https://lore.kernel.org/r/CAMB2axOEZjRV1K4Yxb4=1f2jvPHiD2rVy-+byXbvs3G0qat63g@mail.gmail.com Validation on the rebased candidate with a matching bpf_testmod: - W=1 verifier, full kernel and modules builds passed. - Changed BPF objects and required fixtures compiled strictly. - dynptr: 2/137 passed; 0 skipped. - file_reader: 1/8 passed; 0 skipped. - ns_bpf_qdisc/invalid_dynptr_returned_slice: 1/1 passed; 0 skipped. - global_func: 3/29 passed; 3 skipped. - cb_refs: 1/4 passed; 0 skipped. - subprogs: 5/34 passed; 0 skipped. - verifier_var_off: 1/24 passed; 1 skipped. No selected test failed. The VM used panic_on_warn and panic_on_oops; no WARN_ON report, Oops or panic was found. Unprivileged BPF was enabled only in the isolated guest; the kernel printed the expected Spectre-v2 notice when enabling that sysctl. The broad test_progs build used BPF_STRICT_BUILD=0 for unselected objects requiring unavailable kernel features. The changed objects and required fixtures were also compiled in strict mode. Annotated lifetime tests check loading and diagnostics. The unfiltered full suite, sanitizer and architecture matrices, and new unmodified-base differential probes were not run in this rebase validation. Three 512-byte stack-limit variants skip on this 2 KiB-stack kernel; their large-stack counterparts passed. ctx_arg_rewrite skips because the kernel supports native context-argument tags. Please queue the verifier fix for stable after it reaches the BPF tree. ==================== Link: https://patch.msgid.link/20260927120422.1042107-1-xyx2021@mail.ustc.edu.cn Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions