[PATCH] arm64: allow post-init vmalloc PXNTable
Maxwell Bland
mbland at motorola.com
Tue Feb 13 11:35:27 PST 2024
> -----Original Message-----
> From: Maxwell Bland On Tuesday, February 13, 2024 1:15 PM
> > From: Mark Rutland <mark.rutland at arm.com>
> > How does this work with other allocations of executable memory? e.g. modules,
> > BPF?
>
> It should work.
> - kernel/bpf/core.c uses bpf_jit_alloc_exec to create executable code regions,
> which is a wrapper for module_alloc. In the interpreted BPF case, we do not
> need to worry since the pages storing interpreted code are NX and can be
> marked PXNTable regardless.
Correction: I was wrong here. The _weak reference to bpf_jit_alloc_exec is overwritten in
arch/arm64/net/bpf_jit_comp.c to use a vmalloc call. This would need to be set back to
the generic BPF's use of "module_alloc". I will look into and correct this.
More information about the linux-arm-kernel
mailing list