From: sashiko-bot@kernel.org
To: "Ruslan Valiyev" <linuxoid@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] selftests/bpf: add test for arena vma split and fork rejection
Date: Wed, 03 Jun 2026 09:52:06 +0000 [thread overview]
Message-ID: <20260603095207.25A651F0089B@smtp.kernel.org> (raw)
In-Reply-To: <20260603094428.2597058-1-linuxoid@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comments do not follow the BPF subsystem style guide.
--
commit 68912cf41a7e5ee9f6445ed2bc4cecbbb14bad14
Author: Ruslan Valiyev <linuxoid@gmail.com>
selftests/bpf: add test for arena vma split and fork rejection
This commit adds a selftest to verify that an arena map's mmap()ed VMA
cannot be split with a partial munmap() or inherited across fork().
> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_fork.c b/tools/testing/selftests/bpf/prog_tests/arena_fork.c
> new file mode 100644
> index 0000000000000..f3d5218c9e071
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_fork.c
> @@ -0,0 +1,58 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <test_progs.h>
> +#include <errno.h>
> +#include <sys/mman.h>
> +#include <sys/wait.h>
> +
> +/* Regression test for commit 4fddde2a732d ("bpf: Fix use-after-free in
> + * arena_vm_close on fork"): an arena VMA must reject a splitting munmap()
> + * (.may_split) and must not be inherited across fork() (VM_DONTCOPY). On
> + * an unfixed kernel both operations succeed.
> + */
[Severity: Low]
This isn't a bug, but does this multi-line comment format follow the BPF
subsystem style? The subsystem guidelines state that multi-line comments
should have the opening /* on its own line.
[ ... ]
> + /* A split of the arena VMA must be rejected (.may_split). */
> + ret = munmap((char *)area + ps, ps);
> + err = errno;
> + ASSERT_ERR(ret, "split munmap rejected");
> + ASSERT_EQ(err, EINVAL, "split munmap errno");
> +
> + /* The child of a fork() must not inherit the arena VMA (VM_DONTCOPY);
> + * mincore() returns ENOMEM for the unmapped range.
> + */
[Severity: Low]
This isn't a bug, but does this comment also need the opening /* on its own
line to match the preferred BPF multi-line comment style?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260603094428.2597058-1-linuxoid@gmail.com?part=1
next prev parent reply other threads:[~2026-06-03 9:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 9:44 [PATCH bpf-next] selftests/bpf: add test for arena vma split and fork rejection Ruslan Valiyev
2026-06-03 9:52 ` sashiko-bot [this message]
2026-06-04 16:45 ` Emil Tsalapatis
2026-06-05 11:57 ` [PATCH v2 bpf-next] selftests/bpf: add arena split and fork tests Ruslan Valiyev
2026-06-05 12:07 ` sashiko-bot
2026-06-05 12:22 ` bot+bpf-ci
2026-06-05 14:31 ` Mykyta Yatsenko
2026-06-08 13:25 ` Ruslan Valiyev
2026-06-09 8:37 ` [PATCH v3 bpf-next] selftests/bpf: add tests for arena vma split and fork Ruslan Valiyev
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=20260603095207.25A651F0089B@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=linuxoid@gmail.com \
--cc=sashiko-reviews@lists.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 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.