BPF List
 help / color / mirror / Atom feed
From: Emil Tsalapatis <emil@etsalapatis.com>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
	yonghong.song@linux.dev, memxor@gmail.com, sched-ext@meta.com,
	Emil Tsalapatis <emil@etsalapatis.com>
Subject: [PATCH bpf-next 0/2] bpf/arena: Add kfunc for reserving arena guard memory regions
Date: Thu, 19 Jun 2025 23:11:16 -0400	[thread overview]
Message-ID: <20250620031118.245601-1-emil@etsalapatis.com> (raw)

Add a new kfunc for BPF arenas that reserves a region of the mapping
to prevent it from being mapped. These regions serve as guards against
out-of-bounds accesses and are useful for debugging arena-related code.

Emil Tsalapatis (2):
  bpf/arena: add bpf_arena_guard_pages kfunc
  selftests/bpf: add selftests for bpf_arena_guard_pages

 kernel/bpf/arena.c                            |  95 +++++++++++++++-
 .../testing/selftests/bpf/bpf_arena_common.h  |   3 +
 .../selftests/bpf/progs/verifier_arena.c      | 106 ++++++++++++++++++
 .../bpf/progs/verifier_arena_large.c          |  93 +++++++++++++++
 4 files changed, 294 insertions(+), 3 deletions(-)

-- 
2.49.0


             reply	other threads:[~2025-06-20  3:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20  3:11 Emil Tsalapatis [this message]
2025-06-20  3:11 ` [PATCH bpf-next 1/2] bpf/arena: add bpf_arena_guard_pages kfunc Emil Tsalapatis
2025-06-20 18:44   ` Alexei Starovoitov
2025-06-20 18:52     ` Kumar Kartikeya Dwivedi
2025-06-20 18:56       ` Alexei Starovoitov
2025-06-20 19:06         ` Kumar Kartikeya Dwivedi
2025-06-20 21:12           ` Alexei Starovoitov
2025-06-21  0:15             ` Emil Tsalapatis
2025-06-20 23:58     ` Emil Tsalapatis
2025-06-20  3:11 ` [PATCH bpf-next 2/2] selftests/bpf: add selftests for bpf_arena_guard_pages Emil Tsalapatis

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=20250620031118.245601-1-emil@etsalapatis.com \
    --to=emil@etsalapatis.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=sched-ext@meta.com \
    --cc=song@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