linux-next: manual merge of the bpf-next tree with the bpf tree
From: Mark Brown
Date: Tue Sep 29 2026 - 10:57:35 EST
Hi all,
Today's linux-next merge of the bpf-next tree got a conflict in:
arch/x86/net/bpf_jit_comp.c
between commit:
17637e1a581a2 ("bpf: Skip detached progs in trampoline images that are still in use")
from the bpf tree and commit:
29fcf9ce4bbdf ("bpf, x86: Use global buffer for trampoline size generation")
from the bpf-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc arch/x86/net/bpf_jit_comp.c
index 6bca87457e872,6c7a0578760e7..0000000000000
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@@ -3817,25 -4152,15 +4158,15 @@@ out
int arch_bpf_trampoline_size(const struct btf_func_model *m, u32 flags,
struct bpf_tramp_nodes *tnodes, void *func_addr)
{
- struct bpf_tramp_image im;
+ struct bpf_tramp_image im = {};
- void *image;
- int ret;
- /* Allocate a temporary buffer for __arch_prepare_bpf_trampoline().
- *
- * We cannot use kvmalloc here, because we need image to be in
- * module memory range.
- * Since it must be writable use execmem_alloc(EXECMEM_MODULE_DATA)
- * that returns writable memory in the module address space.
- */
- image = execmem_alloc(EXECMEM_MODULE_DATA, PAGE_SIZE);
- if (!image)
+ if (!trampoline_size_image)
return -ENOMEM;
- ret = __arch_prepare_bpf_trampoline(&im, image, image + PAGE_SIZE, image,
- m, flags, tnodes, func_addr);
- execmem_free(image);
- return ret;
+ return __arch_prepare_bpf_trampoline(&im, trampoline_size_image,
+ trampoline_size_image + PAGE_SIZE,
+ trampoline_size_image, m, flags,
+ tnodes, func_addr);
}
static int emit_bpf_dispatcher(u8 **pprog, int a, int b, s64 *progs, u8 *image, u8 *buf)
Attachment:
signature.asc
Description: PGP signature