aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
authorJeff Layton <jlayton@kernel.org>2026-03-16 15:02:22 -0400
committerChristian Brauner <brauner@kernel.org>2026-03-17 15:38:49 +0100
commitbef5b11087ce87df47f621c02c1027557d886caf (patch)
tree3a960dc00dc6233c7c891878d242ea10504d9002 /security
parent9840bb66e7e5dffd72b03201318f154a10b06b4a (diff)
downloadlinux-next-history-bef5b11087ce87df47f621c02c1027557d886caf.tar.gz
EVM: add comment describing why ino field is still unsigned long
Mimi pointed out that we didn't widen the inode number field in struct h_misc alongside the inode->i_ino widening. While we could make an equivalent change there, that would require EVM resigning on all 32-bit hosts. Instead, leave the field as an unsigned long. This should have no effect on 64-bit hosts, and allow things to continue working on 32-bit hosts in the cases where the i_ino fits in 32-bits. Add a comment explaining why it's being left as unsigned long. Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260316-iino-u64-v3-1-d1076b8f7a20@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/evm/evm_crypto.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c
index c0ca4eedb0fe5..1c41af2f91a60 100644
--- a/security/integrity/evm/evm_crypto.c
+++ b/security/integrity/evm/evm_crypto.c
@@ -144,6 +144,12 @@ static void hmac_add_misc(struct shash_desc *desc, struct inode *inode,
char type, char *digest)
{
struct h_misc {
+ /*
+ * Although inode->i_ino is now u64, this field remains
+ * unsigned long to allow existing HMAC and signatures from
+ * 32-bit hosts to continue working when i_ino hasn't changed
+ * and fits in a u32.
+ */
unsigned long ino;
__u32 generation;
uid_t uid;