From: Mimi Zohar <zohar@linux.ibm.com>
To: Frederick Lawler <fred@cloudflare.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
Eric Snowberg <eric.snowberg@oracle.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
"Darrick J. Wong" <djwong@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Josef Bacik <josef@toxicpanda.com>,
Jeff Layton <jlayton@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
kernel-team@cloudflare.com
Subject: Re: [PATCH v6 0/3] ima: Detect changes to files via kstat changes rather than i_version
Date: Thu, 12 Feb 2026 14:45:58 -0500 [thread overview]
Message-ID: <50c5e00a8c336e8ab393457af009c26902114688.camel@linux.ibm.com> (raw)
In-Reply-To: <20260209-xfs-ima-fixup-v6-0-72f576f90e67@cloudflare.com>
On Mon, 2026-02-09 at 15:21 -0600, Frederick Lawler wrote:
> We uncovered a case in kernels >= 6.13 where XFS is no longer updating
> struct kstat.change_cookie on i_op getattr() access calls. Instead, XFS is
> using multigrain ctime (as well as other file systems) for
> change detection in commit 1cf7e834a6fb ("xfs: switch to
> multigrain timestamps").
>
> Because file systems may implement i_version as they see fit, IMA
> unnecessarily measures files.
Statements like this are wrong and certainly unnecessary. Refer to commit
db1d1e8b9867 ("IMA: use vfs_getattr_nosec to get the i_version"). Directly
accessing the i_version still worked on local filesystems.
I'll be posting a patch shortly that falls back to directly reading the
i_version, when STATX_CHANGE_COOKIE is not supported. It cleans up the file
change detection code, making it more readable and should simplify adding the
ctime file change detection.
> We're proposing to compare against the kstat.change_cookie
> directly to the cached version, and fall back to a ctime comparison,
> if STATX_CHANGE_COOKIE is not supplied by vfs_getattr_nosec()'s result
> mask.
Please rebase your proposed change on this patch.
Mimi
next prev parent reply other threads:[~2026-02-12 19:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 21:21 [PATCH v6 0/3] ima: Detect changes to files via kstat changes rather than i_version Frederick Lawler
2026-02-09 21:21 ` [PATCH v6 1/3] ima: Unify vfs_getattr_nosec() stat comparisons under helper function Frederick Lawler
2026-02-09 21:21 ` [PATCH v6 2/3] ima: Make integrity_inode_attrs_changed() call into VFS Frederick Lawler
2026-02-09 21:21 ` [PATCH v6 3/3] ima: Use kstat.ctime as a fallback for change detection Frederick Lawler
2026-02-12 19:45 ` Mimi Zohar [this message]
2026-02-12 20:01 ` [PATCH v6 0/3] ima: Detect changes to files via kstat changes rather than i_version Frederick Lawler
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=50c5e00a8c336e8ab393457af009c26902114688.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=dmitry.kasatkin@gmail.com \
--cc=eric.snowberg@oracle.com \
--cc=fred@cloudflare.com \
--cc=jlayton@kernel.org \
--cc=jmorris@namei.org \
--cc=josef@toxicpanda.com \
--cc=kernel-team@cloudflare.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=roberto.sassu@huawei.com \
--cc=serge@hallyn.com \
/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