[PATCH v2 10/11] ima: convert VMA flag tests to use vma_flags_t
From: Lorenzo Stoakes (ARM)
Date: Tue Nov 24 2026 - 12:13:38 EST
Replace use of the legacy vm_flags_t flags with vma_flags_t values in the
IMA mprotect LSM hook.
No functional change intended.
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>
---
security/integrity/ima/ima_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index fed80da3ee09..92032afe4cd1 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -556,7 +556,7 @@ static int ima_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,
/* Is mprotect making an mmap'ed file executable? */
if (!(ima_policy_flag & IMA_APPRAISE) || !vma->vm_file ||
- !(prot & PROT_EXEC) || (vma->vm_flags & VM_EXEC))
+ !(prot & PROT_EXEC) || vma_test(vma, VMA_EXEC_BIT))
return 0;
security_current_getlsmprop_subj(&prop);
--
2.56.1