linux/include
Kumar Kartikeya Dwivedi fc7566ad0a bpf: Introduce bpf_preempt_[disable,enable] kfuncs
Introduce two new BPF kfuncs, bpf_preempt_disable and
bpf_preempt_enable. These kfuncs allow disabling preemption in BPF
programs. Nesting is allowed, since the intended use cases includes
building native BPF spin locks without kernel helper involvement. Apart
from that, this can be used to per-CPU data structures for cases where
programs (or userspace) may preempt one or the other. Currently, while
per-CPU access is stable, whether it will be consistent is not
guaranteed, as only migration is disabled for BPF programs.

Global functions are disallowed from being called, but support for them
will be added as a follow up not just preempt kfuncs, but rcu_read_lock
kfuncs as well. Static subprog calls are permitted. Sleepable helpers
and kfuncs are disallowed in non-preemptible regions.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20240424031315.2757363-2-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-04-24 09:47:49 -07:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings
keys
kunit
kvm
linux bpf: Introduce bpf_preempt_[disable,enable] kfuncs 2024-04-24 09:47:49 -07:00
math-emu
media
memory
misc
net
pcmcia
ras
rdma
rv
scsi
soc
sound
target
trace bpf: add bpf_modify_return_test_tp() kfunc triggering tracepoint 2024-03-28 18:31:40 -07:00
uapi bpf: add support for bpf_wq user type 2024-04-23 18:31:24 -07:00
ufs
vdso
video
xen