Re: [PATCH] ima: initialize the real inode attributes of the iint cache
From: Cai Xinchen
Date: Mon Nov 02 2026 - 07:30:16 EST
Hi Mimi. Thanks for review.
I mistakenly used integrity_inode_attrs_store. In the next version, I will directly use
memset to initialize the real_inode structure.
I double checked b836c4d29f27. That commit also added real_ino and real_dev to struct integrity_iinit_cache and started reading them in process_measurement(). However, iinit_init_always() only reset iint->version, leaving real_ino and real_dev stale. After 309e2b775da8, these three variables are encapsulated into integrity_inode_attributes. Therefore, I believe b836c4d29f27 is the appropriate Fixes tag. If I have missed anything, please let me know.
On 11/2/2026 7:20 PM, Mimi Zohar wrote:
Thanks, Cai.
Instead of calling integrity_inode_attrs_store(), reset the entire real_inode
structure. The store sets dev and ino to the stacked inode’s values, but at
allocation time there are no valid real-inode attributes yet, so the fields
should be cleared. The patch only works because the stacked and real inodes
happen to be on different superblocks.
The Fixes: tag looks wrong. In b836c4d29f27, real_inode is an unsigned long
version and init_always() resets it fully.