Re: [PATCH bpf-next v3 0/5] bpf, x86: enable EXECMEM_ROX_CACHE for BPF allocations
From: Song Liu
Date: Thu Jul 16 2026 - 20:01:28 EST
On Thu, Jul 16, 2026 at 12:51 AM Mike Rapoport (Microsoft)
<rppt@xxxxxxxxxx> wrote:
>
> Hi,
>
> BPF allocations of executable memory on x86 are essentially read-only. Most
> paths that call bpf_jit_alloc_exec() immediately make it ROX with
> set_memory_rox().
>
> The code generation, at least on x86, uses separately allocated writable
> buffers and then updates the actual text memory with text_poke().
>
> These patches do several small adjustments to how BPF allocates executable
> memory and enable EXECMEM_ROX_CACHE for BPF allocations on x86.
After this set, we are still using bpf_prog_pack_alloc() from x86 code. I think
the goal is to eventually remove bpf_prog_pack_alloc(). What's our plan for
the next steps (toward removing bpf_prog_pack_alloc)?
Thanks,
Song