summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSun Jian <sun.jian.kdev@gmail.com>2026-07-14 02:38:46 -0700
committerEduard Zingerman <eddyz87@gmail.com>2026-07-15 02:33:18 -0700
commit6f59deb32efa4673fc3b1fef9f3a0da48e9d8494 (patch)
treef6673d2ceae4a0fb17bdfcb26a5de8b0a32bdcd2 /kernel
parentfd4cfa8c8f9a17cdec0539334d28754bc1d8a5d9 (diff)
downloadlinux-6f59deb32efa4673fc3b1fef9f3a0da48e9d8494.tar.gz
linux-6f59deb32efa4673fc3b1fef9f3a0da48e9d8494.zip
selftests/bpf: Cover negative buffer pointer offsets
Add verifier coverage for constant negative offsets on PTR_TO_TP_BUFFER and PTR_TO_BUF pointers. Both programs adjust the buffer pointer by -8 and access it at offset zero, so the negative effective start must be rejected at load time. Switch the raw tracepoint writable attach checks from nbd_send_request to bpf_testmod_test_writable_bare_tp, avoiding a dependency on the NBD tracepoint. Keep the existing past-end case and add a case with a negative var_off compensated by a positive instruction offset. The effective start remains non-negative, so the program loads, but its access end exceeds the writable context size and bpf_raw_tracepoint_open() must return -EINVAL. Cc: stable@vger.kernel.org # 5.2.0 Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com> Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Link: https://patch.msgid.link/20260714093846.18159-3-sun.jian.kdev@gmail.com Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions