]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: verifier: refactor kfunc specialization
authorMykyta Yatsenko <yatsenko@meta.com>
Sun, 26 Oct 2025 20:38:51 +0000 (20:38 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 27 Oct 2025 16:56:27 +0000 (09:56 -0700)
commitd869d56ca848415b1169ba08b4f92a32968de8a2
treedbc745b6c5cdb5654fd6105458be92f790658d2c
parente3e36edb1b8f0e6975c68acd2e1202ec0397fd75
bpf: verifier: refactor kfunc specialization

Move kfunc specialization (function address substitution) to later stage
of verification to support a new use case, where we need to take into
consideration whether kfunc is called in sleepable context.

Minor refactoring in add_kfunc_call(), making sure that if function
fails, kfunc desc is not added to tab->descs (previously it could be
added or not, depending on what failed).

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251026203853.135105-9-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c