Merge branch 'bpf: Add detection of kfuncs.'
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 17 Mar 2023 22:44:27 +0000 (15:44 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 17 Mar 2023 22:46:03 +0000 (15:46 -0700)
commit6cae5a7106e272e7908a1facdf519a307f93872d
treedd3fb68a821169c52d13421de0ba528db0ce70ba
parent0f10f647f45545004ea50b73a7a7c5c3309ff286
parent95fdf6e313a981b0729886f86916190cb418b04c
Merge branch 'bpf: Add detection of kfuncs.'

Alexei Starovoitov says:

====================

From: Alexei Starovoitov <ast@kernel.org>

Allow BPF programs detect at load time whether particular kfunc exists.

Patch 1: Allow ld_imm64 to point to kfunc in the kernel.
Patch 2: Fix relocation of kfunc in ld_imm64 insn when kfunc is in kernel module.
Patch 3: Introduce bpf_ksym_exists() macro.
Patch 4: selftest.

NOTE: detection of kfuncs from light skeleton is not supported yet.
====================

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>