The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>, Song Liu <song@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>
Cc: Emil Tsalapatis <emil@etsalapatis.com>,
	Jiri Olsa <jolsa@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Yonghong Song <yonghong.song@linux.dev>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org
Subject: Re: [PATCH bpf-next 0/5] bpf, x86: enable EXECMEM_ROX_CACHE for BPF allocations
Date: Thu, 9 Jul 2026 11:03:32 +0300	[thread overview]
Message-ID: <ak9V1C-Y3x-KEcTW@kernel.org> (raw)
In-Reply-To: <20260626-execmem-x86-rox-bpf-v0-v1-0-45a0b0ed4fe9@kernel.org>

Gentle ping

On Fri, Jun 26, 2026 at 09:42:27PM +0300, Mike Rapoport (Microsoft) 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.
> 
> ---
> Mike Rapoport (Microsoft) (5):
>       bpf: dispatcher: allocate bpf_dispatcher->rw_image with vmalloc()
>       bpf: drop __weak from bpf_jit_alloc_exec() and bpf_jit_free_exec()
>       bpf: alloc_prog_pack(): skip ROX management for already ROX memory
>       bpf, x86: make sure allocation in arch_bpf_trampoline_size() is writable
>       x86/bpf: enable EXECMEM_ROX_CACHE for BPF allocations
> 
>  arch/x86/mm/init.c          |  4 ++--
>  arch/x86/net/bpf_jit_comp.c |  5 ++---
>  include/linux/filter.h      |  1 +
>  kernel/bpf/core.c           | 30 +++++++++++++++++++++---------
>  kernel/bpf/dispatcher.c     |  5 ++++-
>  5 files changed, 30 insertions(+), 15 deletions(-)
> ---
> base-commit: 53435562a725962e4de0c29653223129ba11643a
> change-id: 20260626-execmem-x86-rox-bpf-v0-b4241ade80df
> 
> Best regards,
> --  
> Sincerely yours,
> Mike.
> 

-- 
Sincerely yours,
Mike.

  parent reply	other threads:[~2026-07-09  8:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 18:42 [PATCH bpf-next 0/5] bpf, x86: enable EXECMEM_ROX_CACHE for BPF allocations Mike Rapoport (Microsoft)
2026-06-26 18:42 ` [PATCH bpf-next 1/5] bpf: dispatcher: allocate bpf_dispatcher->rw_image with vmalloc() Mike Rapoport (Microsoft)
2026-06-26 18:42 ` [PATCH bpf-next 2/5] bpf: drop __weak from bpf_jit_alloc_exec() and bpf_jit_free_exec() Mike Rapoport (Microsoft)
2026-06-26 18:42 ` [PATCH bpf-next 3/5] bpf: alloc_prog_pack(): skip ROX management for already ROX memory Mike Rapoport (Microsoft)
2026-06-26 18:42 ` [PATCH bpf-next 4/5] bpf, x86: make sure allocation in arch_bpf_trampoline_size() is writable Mike Rapoport (Microsoft)
2026-06-26 18:42 ` [PATCH bpf-next 5/5] x86/bpf: enable EXECMEM_ROX_CACHE for BPF allocations Mike Rapoport (Microsoft)
2026-07-09  8:03 ` Mike Rapoport [this message]
2026-07-09 12:12   ` [PATCH bpf-next 0/5] bpf, x86: " Daniel Borkmann
2026-07-09 12:55     ` Mike Rapoport
2026-07-10 12:30       ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ak9V1C-Y3x-KEcTW@kernel.org \
    --to=rppt@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bp@alien8.de \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=hpa@zytor.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=song@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox