Thread (28 messages) 28 messages, 10 authors, 2d ago

Re: [PATCH bpf-next 9/9] selftests/bpf: Test uprobes and fork() with busy mmap_lock

From: Alexei Starovoitov <hidden>
Date: 2026-10-22 02:22:22
Also in: bpf, linux-mm, linux-perf-users, sashiko-reviews

On Wed, Oct 21, 2026 at 07:10 PM sashiko-bot@kernel.org [off-list ref] wrote:
quoted
+#define AREA_MAX	(64UL << 30)
[ ... ]
quoted
+	area = mmap(NULL, AREA_MAX, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
+	if (area == MAP_FAILED)
+		goto err;
[Severity: Medium]
In tools/testing/selftests/bpf/prog_tests/uprobe_busy_mm.c, does AREA_MAX
overflow on 32-bit architectures when passed to mmap() in hold_mmap_lock()?

Should AREA_MAX be sized appropriately for 32-bit architectures as well?
No. uprobe_multi link is 64-bit only.
bpf_uprobe_multi_link_attach() returns -EOPNOTSUPP on 32-bit and
three of four subtests attach with it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help