linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Cai Xinchen" <caixinchen1@huawei.com>
Cc: bpf@vger.kernel.org, linux-security-module@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org, selinux@vger.kernel.org,
	dsterba@suse.cz, "Chuck Lever" <cel@kernel.org>,
	"Jeff Layton" <jlayton@kernel.org>,
	"Anna Schumaker" <anna@kernel.org>
Subject: Re: [PATCH -next -v4 10/17] LSM: rename the inode xattr hooks to path_xattr hooks
Date: Tue, 17 Nov 2026 14:55:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-219002@kernel.org> (raw)
In-Reply-To: <20261117150542.1169451-11-caixinchen1@huawei.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/bpf: multi-line comment style in
  test_set_remove_xattr()
--

commit 5a35ac0f5c000b29a6a994caacc2c58218d41cdf
Author: Cai Xinchen <caixinchen1@huawei.com>

LSM: rename the inode xattr hooks to path_xattr hooks

This commit renames the inode_{set,get,list,remove}xattr LSM hooks and
their security_inode_*xattr() wrappers to path_{set,get,list,remove}xattr
and security_path_*xattr(), updating LSM implementations, BPF LSM hooks,
and BPF selftests accordingly.

> diff --git a/tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c b/tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
> index 43a26ec69a8e3..5145b1f03cac2 100644
> --- a/tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
> +++ b/tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c

[ ... ]

> @@ -148,13 +148,13 @@ static void test_set_remove_xattr(void)
>  
>  	/* First, test not _locked version of the kfuncs with getxattr. */
>  
> -	/* Read security.bpf.foo and trigger test_inode_getxattr. This
> +	/* Read security.bpf.foo and trigger test_path_getxattr. This
>  	 * bpf program will set security.bpf.bar to "world".
>  	 */
>  	read_and_validate_foo(skel);
>  	validate_bar_match(skel);
>  
> -	/* Read security.bpf.foo and trigger test_inode_getxattr again.
> +	/* Read security.bpf.foo and trigger test_path_getxattr again.
>  	 * This will remove xattr security.bpf.bar.
>  	 */
>  	read_and_validate_foo(skel);
> @@ -167,13 +167,13 @@ static void test_set_remove_xattr(void)
>  
>  	/* Second, test _locked version of the kfuncs, with setxattr */
>  
> -	/* Set security.bpf.foo and trigger test_inode_setxattr. This
> +	/* Set security.bpf.foo and trigger test_path_setxattr. This
>  	 * bpf program will set security.bpf.bar to "world".
>  	 */
>  	set_foo(skel);
>  	validate_bar_match(skel);
>  
> -	/* Set security.bpf.foo and trigger test_inode_setxattr again.
> +	/* Set security.bpf.foo and trigger test_path_setxattr again.
>  	 * This will remove xattr security.bpf.bar.
>  	 */
>  	set_foo(skel);

[Severity: Low]
This isn't a bug, but BPF coding style puts the opening /* of a
multi-line comment on its own line, with the comment text starting on the
next line.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117150542.1169451-1-caixinchen1@huawei.com?part=10

  reply	other threads:[~2026-11-17 14:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 15:05 [PATCH -next -v4 00/17] landlock: Add READ_METADATA and WRITE_METADATA access rights Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 01/17] fs: pass struct path to notify_change() Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 02/17] LSM: pass struct path to the inode_setsecctx hook Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 03/17] fs: pass struct path to xattr helpers Cai Xinchen
2026-11-17 14:59   ` sashiko-bot
2026-11-17 15:05 ` [PATCH -next -v4 04/17] fs: pass struct path to POSIX ACL helpers Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 05/17] LSM: pass struct path and struct file to the inode xattr hooks Cai Xinchen
2026-11-17 15:03   ` sashiko-bot
2026-11-17 15:05 ` [PATCH -next -v4 06/17] LSM: pass struct path and struct file to the inode posix acl hooks Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 07/17] LSM: pass struct path and struct file to the inode fileattr hooks Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 08/17] LSM: rename inode_setattr to path_setattr and pass struct path and file Cai Xinchen
2026-11-17 15:11   ` sashiko-bot
2026-11-17 15:05 ` [PATCH -next -v4 09/17] LSM: rename inode_getattr to path_getattr and pass struct file Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 10/17] LSM: rename the inode xattr hooks to path_xattr hooks Cai Xinchen
2026-11-17 14:55   ` sashiko-bot [this message]
2026-11-17 15:05 ` [PATCH -next -v4 11/17] LSM: rename the inode posix acl hooks to path_*_acl hooks Cai Xinchen
2026-11-17 14:55   ` sashiko-bot
2026-11-17 15:05 ` [PATCH -next -v4 12/17] LSM: rename the inode fileattr hooks to path_file_* hooks Cai Xinchen
2026-11-17 15:02   ` sashiko-bot
2026-11-17 15:05 ` [PATCH -next -v4 13/17] LSM: rename inode_setsecctx to path_setsecctx Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 14/17] landlock: Add READ_METADATA and WRITE_METADATA access rights Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 15/17] selftests/landlock: Add tests for metadata " Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 16/17] samples/landlock: Add metadata rights to sandboxer Cai Xinchen
2026-11-17 15:05 ` [PATCH -next -v4 17/17] Documentation: Update landlock doc for metadata rights Cai Xinchen

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-219002@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=anna@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=caixinchen1@huawei.com \
    --cc=cel@kernel.org \
    --cc=dsterba@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=selinux@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).