linux/security/integrity/ima
Frederick Lawler 722a6972de ima: process_measurement() needlessly takes inode_lock() on MAY_READ
[ Upstream commit 30d68cb0c3 ]

On IMA policy update, if a measure rule exists in the policy,
IMA_MEASURE is set for ima_policy_flags which makes the violation_check
variable always true. Coupled with a no-action on MAY_READ for a
FILE_CHECK call, we're always taking the inode_lock().

This becomes a performance problem for extremely heavy read-only workloads.
Therefore, prevent this only in the case there's no action to be taken.

Signed-off-by: Frederick Lawler <fred@cloudflare.com>
Acked-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-06-04 14:41:53 +02:00
..
ima.h ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:49:18 +02:00
ima_api.c ima: Fix use-after-free on a dentry's dname.name 2024-06-21 14:38:48 +02:00
ima_appraise.c integrity: Always reference the blacklist keyring with appraisal 2023-08-01 08:17:25 -04:00
ima_asymmetric_keys.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
ima_crypto.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
ima_efi.c ima: require signed IMA policy when UEFI secure boot is enabled 2023-08-01 08:18:11 -04:00
ima_fs.c ima: Return error code obtained from securityfs functions 2022-02-15 11:17:01 -05:00
ima_init.c ima: define ima_max_digest_data struct without a flexible array variable 2022-02-15 11:52:06 -05:00
ima_kexec.c kexec_lock: Replace kexec_mutex() by kexec_lock() in two comments 2023-08-07 09:55:42 -04:00
ima_main.c ima: process_measurement() needlessly takes inode_lock() on MAY_READ 2025-06-04 14:41:53 +02:00
ima_modsig.c ima: Fix build warnings 2023-06-06 09:37:23 -04:00
ima_mok.c IMA: remove -Wmissing-prototypes warning 2021-07-23 08:05:06 -04:00
ima_policy.c ima: Avoid blocking in RCU read-side critical section 2024-07-11 12:49:18 +02:00
ima_queue.c IMA: support for duplicate measurement records 2021-06-11 12:54:13 -04:00
ima_queue_keys.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
ima_template.c ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2022-11-16 11:47:55 -05:00
ima_template_lib.c ima: fix buffer overrun in ima_eventdigest_init_common 2024-11-22 15:38:34 +01:00
ima_template_lib.h ima: define a new template field named 'd-ngv2' and templates 2022-05-05 11:49:13 -04:00
Kconfig ima: rework CONFIG_IMA dependency block 2023-09-27 11:52:12 -04:00
Makefile ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00