From: sashiko-bot@kernel.org
To: "Alan Maguire" <almagui@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 4/7] selftests/bpf: Test CO-RE relocation of BPF LSM program arguments
Date: Mon, 23 Nov 2026 22:41:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-230155@kernel.org> (raw)
In-Reply-To: <20261123223227.745345-5-almagui@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/bpf: non-standard multi-line comment style in
func_args_core tests
--
commit d8c54394186071b26020206d3532b117ff6287ba
Author: Alan Maguire <almagui@kernel.org>
selftests/bpf: Test CO-RE relocation of BPF LSM program arguments
This commit adds BPF selftests covering CO-RE relocation of function
argument structs and BPF_PROG_CORE() macros for BPF_LSM and BPF_LSM_CGROUP
programs using both standard and light skeletons.
> diff --git a/tools/testing/selftests/bpf/prog_tests/func_args_core.c b/tools/testing/selftests/bpf/prog_tests/func_args_core.c
> index 1516ad13eaa26..f4cc859f20cdc 100644
> --- a/tools/testing/selftests/bpf/prog_tests/func_args_core.c
> +++ b/tools/testing/selftests/bpf/prog_tests/func_args_core.c
[ ... ]
> @@ -110,6 +118,179 @@ static void test_lskel(void)
> func_args_core_lskel__destroy(skel);
> }
>
> +/* An ioctl command that no file implements: the call fails after the
> + * file_ioctl hook ran, so whatever the programs return has no effect on the
> + * process (unlike, e.g., an mprotect() that they allow). Its top bit is set
> + * to check that the unsigned int argument isn't sign-extended.
> + */
> +#define LSM_IOCTL_CMD 0xb1f0c0deU
> +#define LSM_IOCTL_ARG 0x0123456789abcdefULL
> +
> +/* Run file_ioctl(file, cmd, arg) for an ioctl() on a memfd, only monitoring
> + * that call; returns the memfd's inode number, or 0 on failure.
> + */
> +static __u64 lsm_ioctl(int *monitored_pid)
[ ... ]
> diff --git a/tools/testing/selftests/bpf/progs/func_args_core_lsm.c b/tools/testing/selftests/bpf/progs/func_args_core_lsm.c
> new file mode 100644
> index 0000000000000..f4b9e68e45786
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/func_args_core_lsm.c
> @@ -0,0 +1,152 @@
[ ... ]
> +/* A hypothetical future kernel in which file_ioctl()'s file parameter
> + * points to a renamed struct: both variants are described with flavors,
> + * and only one of them can match in a given kernel.
> + */
> +struct vfs_file {
[ ... ]
> +/* The reverse: a program written for the hypothetical kernel, describing
> + * file with the new type and the current one with a flavor, so that only
> + * the flavored member matches.
> + */
> +struct file_ioctl_old_variant_args {
[Severity: Low]
This isn't a bug, but BPF coding style requires multi-line comments to
place the opening "/*" on its own line with the comment text starting on
the next line.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123223227.745345-1-almagui@kernel.org?part=4
next prev parent reply other threads:[~2026-11-23 22:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 22:32 [PATCH bpf-next 0/7] libbpf, bpf: Utilize CO-RE for BPF program parameter presence, ordering Alan Maguire
2026-11-23 22:32 ` [PATCH bpf-next 1/7] libbpf: Support CO-RE relocation of tracing program arguments Alan Maguire
2026-11-23 22:53 ` sashiko-bot
2026-11-23 23:23 ` bot+bpf-ci
2026-11-24 20:17 ` Andrey Grodzovsky
2026-11-23 22:32 ` [PATCH bpf-next 2/7] bpf: " Alan Maguire
2026-11-23 22:52 ` sashiko-bot
2026-11-23 22:32 ` [PATCH bpf-next 3/7] selftests/bpf: Test " Alan Maguire
2026-11-23 22:43 ` sashiko-bot
2026-11-23 22:32 ` [PATCH bpf-next 4/7] selftests/bpf: Test CO-RE relocation of BPF LSM " Alan Maguire
2026-11-23 22:41 ` sashiko-bot [this message]
2026-11-23 22:32 ` [PATCH bpf-next 5/7] libbpf: Report function argument relocation support via type existence Alan Maguire
2026-11-23 22:38 ` sashiko-bot
2026-11-23 22:32 ` [PATCH bpf-next 6/7] selftests/bpf: Test detection of function argument relocation support Alan Maguire
2026-11-23 22:36 ` sashiko-bot
2026-11-23 22:32 ` [PATCH bpf-next 7/7] Documentation/bpf: Describe CO-RE relocation of function arguments Alan Maguire
2026-11-24 0:50 ` [PATCH bpf-next 0/7] libbpf, bpf: Utilize CO-RE for BPF program parameter presence, ordering Alexei Starovoitov
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=sashiko-outbox-230155@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=almagui@kernel.org \
--cc=bpf@vger.kernel.org \
--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.