[PATCH bpf-next 2/5] bpf: drop __weak from bpf_jit_alloc_exec() and bpf_jit_free_exec()

From: Mike Rapoport (Microsoft)

Date: Fri Jun 26 2026 - 14:44:12 EST


bpf_jit_alloc_exec() and bpf_jit_free_exec() are wrappers for the
corresponding execmem APIs.

Architectures define the properties of the memory range needed by BPF in
their initialization of execmem and don't need to override neither of
them.

Drop the __weak qualifier from bpf_jit_alloc_exec() and
bpf_jit_free_exec().

Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
---
kernel/bpf/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 649cce41e13f..2188f6b5a9e2 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1060,12 +1060,12 @@ void bpf_jit_uncharge_modmem(u32 size)
atomic_long_sub(size, &bpf_jit_current);
}

-void *__weak bpf_jit_alloc_exec(unsigned long size)
+void *bpf_jit_alloc_exec(unsigned long size)
{
return execmem_alloc(EXECMEM_BPF, size);
}

-void __weak bpf_jit_free_exec(void *addr)
+void bpf_jit_free_exec(void *addr)
{
execmem_free(addr);
}

--
2.53.0