hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/security/integrity/ima/ima_main.c
....@@ -378,7 +378,9 @@
378378 /**
379379 * ima_file_mmap - based on policy, collect/store measurement.
380380 * @file: pointer to the file to be measured (May be NULL)
381
- * @prot: contains the protection that will be applied by the kernel.
381
+ * @reqprot: protection requested by the application
382
+ * @prot: protection that will be applied by the kernel
383
+ * @flags: operational flags
382384 *
383385 * Measure files being mmapped executable based on the ima_must_measure()
384386 * policy decision.
....@@ -386,7 +388,8 @@
386388 * On success return 0. On integrity appraisal error, assuming the file
387389 * is in policy and IMA-appraisal is in enforcing mode, return -EACCES.
388390 */
389
-int ima_file_mmap(struct file *file, unsigned long prot)
391
+int ima_file_mmap(struct file *file, unsigned long reqprot,
392
+ unsigned long prot, unsigned long flags)
390393 {
391394 u32 secid;
392395
....@@ -743,6 +746,7 @@
743746 pr_err("impossible to appraise a module without a file descriptor. sig_enforce kernel parameter might help\n");
744747 return -EACCES; /* INTEGRITY_UNKNOWN */
745748 }
749
+ break;
746750 default:
747751 break;
748752 }