summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2025-03-15 21:05:38 -0700
committerAlexei Starovoitov <ast@kernel.org>2025-03-19 08:03:06 -0700
commit97eb35f3ad42de1c932ef1f7e2f0044d4fca35f4 (patch)
treed2f471571c77cc01e58db9950d02f985021af061 /tools/perf/scripts/python/export-to-sqlite.py
parent47979314c0fe245ed54306e2f91b3f819c7c0f9f (diff)
downloadlinux-stable-97eb35f3ad42de1c932ef1f7e2f0044d4fca35f4.tar.gz
linux-stable-97eb35f3ad42de1c932ef1f7e2f0044d4fca35f4.tar.bz2
linux-stable-97eb35f3ad42de1c932ef1f7e2f0044d4fca35f4.zip
bpf: Introduce rqspinlock kfuncs
Introduce four new kfuncs, bpf_res_spin_lock, and bpf_res_spin_unlock, and their irqsave/irqrestore variants, which wrap the rqspinlock APIs. bpf_res_spin_lock returns a conditional result, depending on whether the lock was acquired (NULL is returned when lock acquisition succeeds, non-NULL upon failure). The memory pointed to by the returned pointer upon failure can be dereferenced after the NULL check to obtain the error code. Instead of using the old bpf_spin_lock type, introduce a new type with the same layout, and the same alignment, but a different name to avoid type confusion. Preemption is disabled upon successful lock acquisition, however IRQs are not. Special kfuncs can be introduced later to allow disabling IRQs when taking a spin lock. Resilient locks are safe against AA deadlocks, hence not disabling IRQs currently does not allow violation of kernel safety. __irq_flag annotation is used to accept IRQ flags for the IRQ-variants, with the same semantics as existing bpf_local_irq_{save, restore}. These kfuncs will require additional verifier-side support in subsequent commits, to allow programs to hold multiple locks at the same time. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20250316040541.108729-23-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions