Thread (31 messages) 31 messages, 4 authors, 1d ago

Re: [PATCH v2 -next 10/18] LSM: rename inode_getattr to path_getattr

flat view

From: sashiko-bot@kernel.org
Date: 2026-10-15 12:32:15
Also in: bpf, linux-security-module, selinux

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] selftests/bpf: use of deprecated CHECK() macro in updated test code
--

commit c4d97789c19b5bd634c796fba77ad30dd5acd56f
Author: Cai Xinchen [off-list ref]

LSM: rename inode_getattr to path_getattr

This commit renames the inode_getattr hook to path_getattr to follow the
path_* naming convention used for other hooks taking a struct path. It also
updates the security_* wrappers and adjusts BPF selftests to use the new
names.
quoted hunk ↗ jump to hunk
diff --git a/tools/testing/selftests/bpf/prog_tests/d_path.c b/tools/testing/selftests/bpf/prog_tests/d_path.c
index 1a2a2f1abf033..9877c098e5c14 100644
--- a/tools/testing/selftests/bpf/prog_tests/d_path.c
+++ b/tools/testing/selftests/bpf/prog_tests/d_path.c
@@ -160,7 +160,7 @@ static void test_d_path_basic(void)
 
 	if (CHECK(!bss->called_stat,
 		  "stat",
-		  "trampoline for security_inode_getattr was not called\n"))
+		  "trampoline for security_path_getattr was not called\n"))
[Severity: Low]
The BPF subsystem guidelines prefer replacing the deprecated CHECK macros with
modern ASSERT_* macros (such as ASSERT_TRUE or ASSERT_EQ) when writing new
tests or updating existing ones.

Since this patch updates the string literal inside the CHECK macro call in
test_d_path_basic(), could this be migrated to the modern assertion standard?
 		goto cleanup;
 
 	if (CHECK(!bss->called_close,
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015125425.3246251-1-caixinchen1@huawei.com?part=10
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help