Skip to contentSkip to conversation

IMA: Fix error in comment

PATCH In review Ricardo Ribalda 2 participants 2 messages Mar 30, 2021 – Mar 31, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IMA: Fix error in comment

ima_file_mprotect does not return EACCES but EPERM.

---
 security/integrity/ima/ima_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_main.c +1 -1
index 9ef748ea829f..716ea29cf897 100644
@@ -409,7 +409,7 @@ int ima_file_mmap(struct file *file, unsigned long prot)
  * this point.  Eliminate this integrity gap by denying the mprotect
  * PROT_EXECUTE change, if an mmap appraise policy rule exists.
  *
- * On mprotect change success, return 0.  On failure, return -EACESS.
+ * On mprotect change success, return 0.  On failure, return -EPERM.
  */
 int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
 {
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Ricardo Ribalda

ima_file_mprotect does not return EACCES but EPERM.

/Jarkko

Quoted 21 lines
---
 security/integrity/ima/ima_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_main.c +1 -1
index 9ef748ea829f..716ea29cf897 100644
@@ -409,7 +409,7 @@ int ima_file_mmap(struct file *file, unsigned long prot)
  * this point.  Eliminate this integrity gap by denying the mprotect
  * PROT_EXECUTE change, if an mmap appraise policy rule exists.
  *
- * On mprotect change success, return 0.  On failure, return -EACESS.
+ * On mprotect change success, return 0.  On failure, return -EPERM.
  */
 int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
 {
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog