Title: [7658] trunk: Apply upstream patch 239e40d..0583f16 for bug [#5561]
- Revision
- 7658
- Author
- gyang
- Date
- 2009-10-15 23:19:15 -0400 (Thu, 15 Oct 2009)
Log Message
Apply upstream patch 239e40d..0583f16 for bug [#5561]
Modified Paths
Diff
Modified: trunk/include/linux/security.h (7657 => 7658)
--- trunk/include/linux/security.h 2009-10-15 17:12:05 UTC (rev 7657)
+++ trunk/include/linux/security.h 2009-10-16 03:19:15 UTC (rev 7658)
@@ -593,6 +593,7 @@
* @reqprot contains the protection requested by the application.
* @prot contains the protection that will be applied by the kernel.
* @flags contains the operational flags.
+ * @addr contains the mapping address, and should be ignored in NOMMU mode.
* Return 0 if permission is granted.
* @file_mprotect:
* Check permissions before changing memory access permissions.
Modified: trunk/mm/nommu.c (7657 => 7658)
--- trunk/mm/nommu.c 2009-10-15 17:12:05 UTC (rev 7657)
+++ trunk/mm/nommu.c 2009-10-16 03:19:15 UTC (rev 7658)
@@ -1017,7 +1017,7 @@
}
/* allow the security API to have its say */
- ret = security_file_mmap(file, reqprot, prot, flags, addr, 0);
+ ret = security_file_mmap(file, reqprot, prot, flags, 0, 0);
if (ret < 0)
return ret;
Modified: trunk/security/commoncap.c (7657 => 7658)
--- trunk/security/commoncap.c 2009-10-15 17:12:05 UTC (rev 7657)
+++ trunk/security/commoncap.c 2009-10-16 03:19:15 UTC (rev 7658)
@@ -1005,6 +1005,7 @@
{
int ret = 0;
+#ifdef CONFIG_MMU
if (addr < dac_mmap_min_addr) {
ret = cap_capable(current, current_cred(), CAP_SYS_RAWIO,
SECURITY_CAP_AUDIT);
@@ -1012,5 +1013,6 @@
if (ret == 0)
current->flags |= PF_SUPERPRIV;
}
+#endif
return ret;
}
Modified: trunk/security/selinux/hooks.c (7657 => 7658)
--- trunk/security/selinux/hooks.c 2009-10-15 17:12:05 UTC (rev 7657)
+++ trunk/security/selinux/hooks.c 2009-10-16 03:19:15 UTC (rev 7658)
@@ -3028,6 +3028,7 @@
unsigned long addr, unsigned long addr_only)
{
int rc = 0;
+#ifdef CONFIG_MMU
u32 sid = current_sid();
/*
@@ -3042,6 +3043,7 @@
if (rc)
return rc;
}
+#endif
/* do DAC check on address space usage */
rc = cap_file_mmap(file, reqprot, prot, flags, addr, addr_only);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits