ima: mprotect performance fix
ima: fix mprotect checking

Make sure IMA is enabled before checking mprotect change.  Addresses
report of a 3.7% regression of boot-time.dhcp.

Fixes: 8eb613c0b8f1 ("ima: verify mprotect change is consistent with mmap policy")
Reported-by: kernel test robot <>
Reviewed-by: Lakshmi Ramasubramanian <>
Tested-by: Xing Zhengjun <>
Signed-off-by: Mimi Zohar <>
1 file changed