All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf v4 0/2] bpf: bound arena allocations to the user VMA
@ 2026-11-22 12:35 ` YanXin Li
  0 siblings, 0 replies; 7+ messages in thread
From: YanXin Li via B4 Relay @ 2026-11-22 12:35 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Eduard Zingerman, Kumar Kartikeya Dwivedi
  Cc: Martin KaFai Lau, Song Liu, Yonghong Song, Jiri Olsa,
	Emil Tsalapatis, Ihor Solodrai, bpf, linux-kernel, stable

When map_extra is omitted, a short first mmap() can leave free arena
pages beyond the user VMA. Automatic allocation can select those pages;
near a 4 GiB boundary, the kernel mapping can extend past the arena's
vmalloc reservation. Patch 1 confines the range tree to the VMA, and
patch 2 adds a regression selftest.

---
Changes in v4:
- Check the first allocation in the selftest and remove the incorrect
  offset-zero NULL comment. Patch 1 is unchanged.
- Link to v3: https://lore.kernel.org/r/20261122-b4-03-bpf-arena-vmalloc-oob-v3-da2dc21683c6-v3-0-1f94ae9a884a@pm.me

To: Alexei Starovoitov <ast@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
To: Andrii Nakryiko <andrii@kernel.org>
To: Eduard Zingerman <eddyz87@gmail.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Song Liu <song@kernel.org>
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Emil Tsalapatis <emil@etsalapatis.com>
Cc: Ihor Solodrai <ihor.solodrai@linux.dev>
Cc: bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
YanXin Li (2):
      bpf: bound arena allocations to the user VMA
      selftests/bpf: test arena allocation after a short mmap

 kernel/bpf/arena.c                                 | 25 ++++++++++
 .../testing/selftests/bpf/prog_tests/arena_mmap.c  | 53 ++++++++++++++++++++++
 .../testing/selftests/bpf/progs/arena_mmap_alloc.c | 33 ++++++++++++++
 3 files changed, 111 insertions(+)
---
base-commit: c44104f3642da720164042623e4832836aefdd8e
change-id: 20261122-b4-03-bpf-arena-vmalloc-oob-v4-8090cdc58ff8-f2eb9eff6db8

Best regards,
--  
YanXin Li <fadouse@pm.me>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-01  5:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 12:35 [PATCH bpf v4 0/2] bpf: bound arena allocations to the user VMA YanXin Li via B4 Relay
2026-11-22 12:35 ` YanXin Li
2026-11-22 12:35 ` [PATCH bpf v4 1/2] " YanXin Li via B4 Relay
2026-11-22 12:35   ` YanXin Li
2026-12-01  5:16   ` Alexei Starovoitov
2026-11-22 12:35 ` [PATCH bpf v4 2/2] selftests/bpf: test arena allocation after a short mmap YanXin Li
2026-11-22 12:35   ` YanXin Li via B4 Relay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.