BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ruslan Valiyev" <linuxoid@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next] selftests/bpf: add arena split and fork tests
Date: Fri, 05 Jun 2026 12:07:11 +0000	[thread overview]
Message-ID: <20260605120711.D51941F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260605115713.3224051-1-linuxoid@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comment does not follow the required BPF subsystem comment style.
--

commit f3309fb333fa0cbe670a595203f862bdefb2a073
Author: Ruslan Valiyev <linuxoid@gmail.com>

selftests/bpf: add arena split and fork tests

This commit adds two tests for an arena map's mmap()ed region. The
arena_split test checks that a partial munmap() that would split the
mapping fails with EINVAL, while arena_fork verifies that a forked child 
does not inherit the mapping.

> 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..bb134e9adb607
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_fork.c

[ ... ]

> +	pid = fork();
> +	if (pid == 0) {
> +		unsigned char vec;
> +		int rc;
> +
> +		/* If the mapping was not inherited the range is unmapped in
> +		 * the child, so mincore() fails with ENOMEM. A success means
> +		 * the child wrongly inherited the mapping.
> +		 */

[Severity: Low]
This isn't a bug, but does this multi-line comment in test_arena_fork()
follow the preferred BPF subsystem comment style?

The BPF guidelines require the opening /* to be on its own line for
multi-line comments, like this:

/*
 * If the mapping was not inherited the range is unmapped in
 * the child...
 */

> +		rc = mincore(area, ps, &vec);
> +		if (rc == 0)
> +			_exit(1);
> +		_exit(errno == ENOMEM ? 0 : 2);
> +	}

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260605115713.3224051-1-linuxoid@gmail.com?part=1

  reply	other threads:[~2026-06-05 12:07 UTC|newest]

Thread overview: 10+ 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
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 [this message]
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
2026-06-09 18:40         ` 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=20260605120711.D51941F00893@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox