linux/security/integrity
Roberto Sassu fcb0318a29 ima: Support staging and deleting N measurements records
Add support for sending a value N between 1 and ULONG_MAX to the IMA
original measurement interface. This value represents the number of
measurements that should be deleted from the current measurements list. In
this case, measurements are staged in an internal non-user visible list,
and immediately deleted.

This staging method allows the remote attestation agents to easily separate
the measurements that were verified (staged and deleted) from those that
weren't due to the race between taking a TPM quote and reading the
measurements list.

In order to minimize the locking time of ima_extend_list_mutex, deleting
N records is realized by doing a lockless walk in the current measurements
list to determine the N-th entry to cut, to cut the current measurements
list under the lock, and by deleting the excess records after releasing the
lock.

Flushing the hash table is not supported for N records, since it would
require removing the N records one by one from the hash table under the
ima_extend_list_mutex lock, which would increase the locking time.

Link: https://github.com/linux-integrity/linux/issues/1
Co-developed-by: Steven Chen <chenste@linux.microsoft.com>
Signed-off-by: Steven Chen <chenste@linux.microsoft.com>
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2026-06-08 11:43:34 -04:00
..
evm evm: terminate and bound the evm_xattrs read buffer 2026-05-13 08:31:40 -04:00
ima ima: Support staging and deleting N measurements records 2026-06-08 11:43:34 -04:00
platform_certs integrity: Make arch_ima_get_secureboot integrity-wide 2026-03-05 11:10:08 -05:00
digsig_asymmetric.c integrity: Add support for sigv3 verification using ML-DSA keys 2026-05-13 08:21:19 -04:00
digsig.c ima: Define asymmetric_verify_v3() to verify IMA sigv3 signatures 2026-04-01 10:14:30 -04:00
efi_secureboot.c integrity: Make arch_ima_get_secureboot integrity-wide 2026-03-05 11:10:08 -05:00
iint.c ima,evm: move initcalls to the LSM framework 2025-10-22 19:24:27 -04:00
integrity_audit.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
integrity.h ima: Define asymmetric_verify_v3() to verify IMA sigv3 signatures 2026-04-01 10:14:30 -04:00
Kconfig integrity: Select CRYPTO from INTEGRITY_ASYMMETRIC_KEYS 2025-10-03 07:50:56 -04:00
Makefile integrity: Eliminate weak definition of arch_get_secureboot() 2026-03-13 11:37:13 -04:00