]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Always allow fmod_ret programs on syscalls
authorViktor Malik <vmalik@redhat.com>
Mon, 9 Mar 2026 11:23:57 +0000 (12:23 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 9 Mar 2026 16:28:42 +0000 (09:28 -0700)
commit20c2e102a2f30e7e47cba9816ab226de296e8e57
tree6347001190568aa929dbf55092e08896e06cb4b6
parent16d9c5660692d6f0e6aba367274de2b6dfd4343c
bpf: Always allow fmod_ret programs on syscalls

fmod_ret BPF programs can only be attached to selected functions. For
convenience, the error injection list was originally used (along with
functions prefixed with "security_"), which contains syscalls and
several other functions.

When error injection is disabled (CONFIG_FUNCTION_ERROR_INJECTION=n),
that list is empty and fmod_ret programs are effectively unavailable for
most of the functions. In such a case, at least enable fmod_ret programs
on syscalls.

Signed-off-by: Viktor Malik <vmalik@redhat.com>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/472310f9a5f4944ad03214e4d943a4830fd8eb76.1773055375.git.vmalik@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c