From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796400560; b=H5ZuCfwrJR5edBtyRlUKoTvlVL/J2F/jSqvBNKNrPsHWRMlvPxey2W50upyxhBiM3Snq TBhCWT3JqIIEPHzZm+htWsk3bCzyr7n+LEujAZV8isgxBF2xYRq+DQuuRtU4fLF4xh1PG OBmBqvDaqCDW9gZJtuWi1d4wgyW71+I1ZAk5tPZ+vUWWHCw4zkg6bIJK7RG2WVSTAQlU0 gYulq1vizqax3QXg54wtfbBFU7Zr/KPGmk9C238Zybwr9tVo/q+uRPFd0stzUt5VFlTyS xEGgtNXdNtlWCVl3pAdKdxThml7hknqWfiSWMJcpIBSOqJFmrBrU9a4muVdor3GgmAA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796400560; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=adpMLLl/cD7npJ/MEoUW8aReM1JVtQH5hC+EtsQOlMQ=; b=n1+CSsCfjRqkrh9FDPPDcQuJQXXywqa5eZN5Yc/yy712ZZuy9I08/pZB60YeCkNO1X7l a9iqE8PkorvB7JmKgPmkbQQvqwF8hU3jieNnEGMbdUvAdMcq+Gyy1gp/eI/NF9PrhsZZD p03MPyHIw0Rssm4pKNz9B4SfxHuNzJMA7NTUgwu9990ceqnYssSU/k+8ntqDeS8vyF293 uWM5wceiUQZWjpLSEZOoXtO5yYckWLmC4OMVn2InrHA9miNy08ls9RvN5heqhSZwa6Dol XnhAXJdXSrDLLgxliIBD/hR2A9CAzBRhp20a3WDKXOQuZpmQA48oOv7HW70OvJciN4A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d3rkpXxs; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44041606A322 for ; Fri, 4 Dec 2026 16:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d3rkpXxs Received: by smtp.kernel.org (Postfix) with ESMTPSA id C91991F000C2; Fri, 4 Dec 2026 16:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796400559; bh=adpMLLl/cD7npJ/MEoUW8aReM1JVtQH5hC+EtsQOlMQ=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=d3rkpXxsq2qRMGl3aFuu7ttQ+t+B4I0MrVGfaUi4aSkSDJ85tKPlLKlj1dMaS8/Rp J88vBTaE1OK5KStLUaoZcgWbpU3VMvbCgSbgorZes+uluJzsB/wDgJQPNnRCdnx0kS 9z67SG0dG5VA+4Gryrfhm4N6ZYNucDnx90gRzCth+ocxEdwQ/FTdJGB/mDuHEuswNW PR6wo6iNuE29b81p+2XoIl9WJMiBxab2eprbl4z2ctUt70O0Mg4oo8emMPdszsyTac dzrbt7Qf9Kb5mP5DjgkGqf0s6nm8t1x2TwgNPcXnaH8/k+YE0W+ToyZyncAMGfuwGh JkXTUU53KOR4w== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 bpf-next 6/6] selftests/bpf: Test xattr kfuncs on the new sleepable inode hooks Reply-To: sashiko-reviews@lists.linux.dev To: "Anton Protopopov" , bpf@vger.kernel.org In-Reply-To: <20261204155438.1413411-7-a.s.protopopov@gmail.com> References: <20261204155438.1413411-1-a.s.protopopov@gmail.com> <20261204155438.1413411-7-a.s.protopopov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 16:09:19 +0000 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] selftests/bpf: test_inode_xattr() lacks ACL and fileattr skip handling -- commit ce364c49218b9ec40886dd37424d160ba972d101 Author: Anton Protopopov selftests/bpf: Test xattr kfuncs on the new sleepable inode hooks This commit adds the inode_xattr subtest to fs_kfuncs to test reading, setting, and removing xattrs on the new sleepable inode LSM hooks, and adds positive and negative verifier tests for inode_copy_up. > diff --git a/tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c b/tools/t= esting/selftests/bpf/prog_tests/fs_kfuncs.c > index 43a26ec69a8e3..ad467c7663808 100644 > --- a/tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c > +++ b/tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c [ ... ] > @@ -194,6 +202,102 @@ static void test_set_remove_xattr(void) [ ... ] > +static void test_inode_xattr(void) > +{ [ ... ] > + /* inode_set_acl, inode_remove_acl and inode_file_setattr change xattrs= */ > + err =3D setxattr(file, "system.posix_acl_access", &acl, sizeof(acl), 0); > + if (ASSERT_OK(err, "set acl")) { > + ASSERT_EQ(skel->data->set_acl_ret, 0, "set_acl_ret"); > + ASSERT_TRUE(has_bar(skel, file), "bar after set acl"); > + > + ASSERT_OK(removexattr(file, "system.posix_acl_access"), "remove acl"); > + ASSERT_EQ(skel->data->remove_acl_ret, 0, "remove_acl_ret"); > + err =3D getxattr(file, skel->rodata->xattr_bar, NULL, 0); > + ASSERT_TRUE(err =3D=3D -1 && errno =3D=3D ENODATA, "bar after remove a= cl"); > + } > + > + if (ASSERT_OK(ioctl(fd, FS_IOC_GETFLAGS, &flags), "FS_IOC_GETFLAGS") && > + ASSERT_OK(ioctl(fd, FS_IOC_SETFLAGS, &flags), "FS_IOC_SETFLAGS")) { > + ASSERT_EQ(skel->data->file_setattr_ret, 0, "file_setattr_ret"); > + ASSERT_TRUE(has_bar(skel, file), "bar after file setattr"); > + } [Severity: Medium] Should test_inode_xattr() skip on EOPNOTSUPP for system.posix_acl_access and on ENOTTY/EOPNOTSUPP for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS? The base tools/testing/selftests/bpf/config enables CONFIG_TMPFS_XATTR without CONFIG_TMPFS_POSIX_ACL, so a tmpfs /tmp passes the initial security.bpf.foo probe and then fails setxattr() on system.posix_acl_access with EOPNOTSUPP instead of skipping. Under CONFIG_FS_POSIX_ACL=3Dy without SB_POSIXACL, vfs_set_acl() calls security_inode_set_acl() before set_posix_acl() returns -EOPNOTSUPP. Skipping the removexattr() block then leaves security.bpf.bar on file for the subsequent FS_IOC_SETFLAGS has_bar() check. Similarly, filesystems that support xattrs without fileattr_get or fileattr_set (such as 9p or NFS) return ENOTTY from FS_IOC_GETFLAGS or FS_IOC_SETFLAGS, causing the subtest to fail instead of skipping. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204155438.1413= 411-1-a.s.protopopov@gmail.com?part=3D6