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) <[email protected]>
Reviewed-by: Lance Yang <[email protected]>
---
 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


Reply via email to