From: Alexei Starovoitov Date: Tue, 6 Feb 2024 03:58:47 +0000 (-0800) Subject: Merge branch 'enable-static-subprog-calls-in-spin-lock-critical-sections' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8244ab509f89d63941d5ee207967c5a3e00bb493;p=linux.git Merge branch 'enable-static-subprog-calls-in-spin-lock-critical-sections' Kumar Kartikeya Dwivedi says: ==================== Enable static subprog calls in spin lock critical sections This set allows a BPF program to make a call to a static subprog within a bpf_spin_lock critical section. This problem has been hit in sched-ext and ghOSt [0] as well, and is mostly an annoyance which is worked around by inling the static subprog into the critical section. In case of sched-ext, there are a lot of other helper/kfunc calls that need to be allow listed for the support to be complete, but a separate follow up will deal with that. Unlike static subprogs, global subprogs cannot be allowed yet as the verifier will not explore their body when encountering a call instruction for them. Therefore, we would need an alternative approach (some sort of function summarization to ensure a lock is never taken from a global subprog and all its callees). [0]: https://lore.kernel.org/bpf/bd173bf2-dea6-3e0e-4176-4a9256a9a056@google.com Changelog: ---------- v1 -> v2 v1: https://lore.kernel.org/bpf/20240204120206.796412-1-memxor@gmail.com * Indicate global function call in verifier error string (Yonghong, David) * Add Acks from Yonghong, David ==================== Link: https://lore.kernel.org/r/20240204222349.938118-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov --- 8244ab509f89d63941d5ee207967c5a3e00bb493