x86/bpf: Enable EXECMEM_ROX_CACHE for BPF allocations

BPF core and x86 JIT use text poking and temporary writable buffers and
thus can handle ROX memory.

Enable ROX cache for EXECMEM_BPF when configuration and CPU features allow
that.

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/bpf/20260716-execmem-x86-rox-bpf-v0-v3-5-4e76158c01c5@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
Mike Rapoport (Microsoft) 2026-07-16 10:51:39 +03:00 committed by Kumar Kartikeya Dwivedi
parent 5bf02dbf39
commit 6b88aaec81
No known key found for this signature in database
GPG Key ID: 472D377B63542F83

View File

@ -1107,10 +1107,10 @@ struct execmem_info __init *execmem_arch_setup(void)
.alignment = MODULE_ALIGN,
},
[EXECMEM_BPF] = {
.flags = EXECMEM_KASAN_SHADOW,
.flags = flags,
.start = start,
.end = MODULES_END,
.pgprot = PAGE_KERNEL,
.pgprot = pgprot,
.alignment = MODULE_ALIGN,
},
[EXECMEM_MODULE_DATA] = {