On Wed, Jul 09, 2025 at 11:23:12PM +0800, Huacai Chen wrote: > Hi, Chenghao, > > On Wed, Jul 9, 2025 at 1:50 PM Chenghao Duan <duanchenghao@xxxxxxxxxx> wrote: > > > > The bpf_jit_alloc_exec function serves as the core mechanism for BPF > > memory allocation, invoking execmem_alloc(EXECMEM_BPF, size) to > > allocate memory. This change explicitly designates the allocation space > > for EXECMEM_BPF. > Without this patch, BPF JIT is allocated from MODULES region; with > this patch, BPF JIT will be allocated from VMALLOC region. However, > BPF JIT is similar to modules that the target of direct branch > instruction is limited, so it should also be allocated from the > MODULES region. > > So, it is better to drop this patch. > > > Huacai Dear Chen, I understand your technical considerations. Whether to keep or remove the current patch has no impact on trampoline, so we can drop this patch. Chenghao > > > > > Signed-off-by: Chenghao Duan <duanchenghao@xxxxxxxxxx> > > --- > > arch/loongarch/mm/init.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c > > index c3e4586a7..07cedd9ee 100644 > > --- a/arch/loongarch/mm/init.c > > +++ b/arch/loongarch/mm/init.c > > @@ -239,6 +239,12 @@ struct execmem_info __init *execmem_arch_setup(void) > > .pgprot = PAGE_KERNEL, > > .alignment = 1, > > }, > > + [EXECMEM_BPF] = { > > + .start = VMALLOC_START, > > + .end = VMALLOC_END, > > + .pgprot = PAGE_KERNEL, > > + .alignment = PAGE_SIZE, > > + }, > > }, > > }; > > > > -- > > 2.43.0 > > > >