linux/tools
Kumar Kartikeya Dwivedi 6668ed271e selftests/bpf: Reject graph kptr use after RCU unlock
Add a sleepable verifier test that loads a graph-node local kptr in an
explicit RCU read-side critical section, then passes its node to
bpf_rbtree_remove() after the section ends.

Before the verifier fix, the stale NON_OWN_REF flag makes the node look like
a live borrowed reference and the program is accepted. After the fix, the
pointer is demoted without NON_OWN_REF and the graph kfunc argument is
rejected.

Also exercise a graph kptr loaded while a spin lock provides implicit RCU
protection. The pointer must be invalidated when the lock is released, which
guards the required ordering between non-owning-reference invalidation and
RCU demotion.

Update the existing fault-protected load test state description. The
post-unlock pointer no longer carries NON_OWN_REF, but remains readable
because the load is rewritten to use BPF_PROBE_MEM.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20260904084325.52250-7-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-09-04 07:58:36 -07:00
..
accounting
arch - Remove the smp_locks alternatives machinery which was used to patch out lock 2026-08-18 18:11:25 -07:00
bootconfig
bpf bpftool: Fix double close in map dump 2026-08-13 14:54:06 -07:00
build perf tools changes for v7.2: 2026-06-23 11:34:49 -07:00
certs
cgroup
counter
crypto
debugging
dma
docs
firewire
firmware
gpio
hv
iio
include Networking changes for 7.3. 2026-08-20 08:16:04 -07:00
kvm/kvm_stat
laptop
leds
lib Major changes: 2026-08-20 07:36:20 -07:00
memory-model
mm slab changes for 7.2 - part 2 2026-06-22 08:28:48 -07:00
net tools: ynl: check alloc fails in generated getter code 2026-08-10 18:23:11 -07:00
objtool - Remove the smp_locks alternatives machinery which was used to patch out lock 2026-08-18 18:11:25 -07:00
pcmcia
perf vfs-7.3-rc1.failfs 2026-08-17 09:15:52 -07:00
power linux-cpupower-7.3-rc1 2026-08-05 13:53:51 +02:00
rcu
sched
sched_ext Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 7.2-rc4 2026-07-17 23:22:46 +02:00
scripts arch: hookup fchroot() system call 2026-07-27 17:18:00 +02:00
sound
spi
testing selftests/bpf: Reject graph kptr use after RCU unlock 2026-09-04 07:58:36 -07:00
thermal tools/thermal/thermometer: close fd on realloc() failure 2026-07-22 17:43:55 +02:00
time
tracing rtla/cli: Unify and improve handling of invalid option arguments 2026-08-05 10:14:40 +02:00
unittests
usb usbip: tools: support SuperSpeedPlus devices 2026-07-08 13:29:13 +02:00
verification verification/rvgen: Add selftests for rvgen kunit 2026-07-31 16:27:45 +02:00
virtio tools/virtio: add missing compat definitions for vhost_net_test 2026-07-01 19:02:56 -07:00
wmi
workqueue
writeback
Makefile