Skip to contentSkip to conversation

security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

PATCH In review Colin Cross 5 participants 6 messages Feb 4, 2014 – Feb 5, 2014 Security (LSM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

Binaries compiled for arm may run on arm64 if CONFIG_COMPAT is selected. Set LSM_MMAP_MIN_ADDR to 32768 if ARM64 && COMPAT to prevent selinux failures launching 32-bit static executables that are mapped at 0x8000.

---
 security/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/Kconfig +1 -1
index e9c6ac724fef..beb86b500adf 100644
@@ -103,7 +103,7 @@ config INTEL_TXT
 config LSM_MMAP_MIN_ADDR
 	int "Low address space for LSM to protect from user allocation"
 	depends on SECURITY && SECURITY_SELINUX
-	default 32768 if ARM
+	default 32768 if ARM || (ARM64 && COMPAT)
 	default 65536
 	help
 	  This is the portion of low virtual memory which should be protected
Signature · 1 line
1.9.0.rc1.175.g0b1dcb5
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Colin Cross

Binaries compiled for arm may run on arm64 if CONFIG_COMPAT is selected. Set LSM_MMAP_MIN_ADDR to 32768 if ARM64 && COMPAT to prevent selinux failures launching 32-bit static executables that are mapped at 0x8000.

---
 security/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/Kconfig +0 -0
index e9c6ac724fef..beb86b500adf 100644

security/Kconfig config INTEL_TXT · line 109

Quoted 8 lines
security/Kconfig +1 -1
@@ -103,7 +103,7 @@ config INTEL_TXT
 config LSM_MMAP_MIN_ADDR
 	int "Low address space for LSM to protect from user allocation"
 	depends on SECURITY && SECURITY_SELINUX
-	default 32768 if ARM
+	default 32768 if ARM || (ARM64 && COMPAT)
 	default 65536
 	help
 	  This is the portion of low virtual memory which should be protected

Since ARM64 && COMPAT implies 4k pages, this change looks ok to me.

Will

Acked-by
#2 lore raw
Quoted 34 lines · Will Deacon
Quoted 15 lines · Colin Cross

Binaries compiled for arm may run on arm64 if CONFIG_COMPAT is selected. Set LSM_MMAP_MIN_ADDR to 32768 if ARM64 && COMPAT to prevent selinux failures launching 32-bit static executables that are mapped at 0x8000.

---
 security/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/Kconfig +0 -0
index e9c6ac724fef..beb86b500adf 100644

security/Kconfig config INTEL_TXT · line 109

Quoted 8 lines
security/Kconfig +1 -1
@@ -103,7 +103,7 @@ config INTEL_TXT
 config LSM_MMAP_MIN_ADDR
      int "Low address space for LSM to protect from user allocation"
      depends on SECURITY && SECURITY_SELINUX
-     default 32768 if ARM
+     default 32768 if ARM || (ARM64 && COMPAT)
      default 65536
      help
        This is the portion of low virtual memory which should be protected

Since ARM64 && COMPAT implies 4k pages, this change looks ok to me.

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer Acked-by
#4 lore raw
Quoted 9 lines · Catalin Marinas
Quoted 6 lines · Colin Cross

Binaries compiled for arm may run on arm64 if CONFIG_COMPAT is selected. Set LSM_MMAP_MIN_ADDR to 32768 if ARM64 && COMPAT to prevent selinux failures launching 32-bit static executables that are mapped at 0x8000.

Probably makes sense to push this through the arm tree.

Signature · 2 lines
James Morris
<[email protected]>
#5 lore raw
Quoted 8 lines · James Morris
Quoted 6 lines · Catalin Marinas
Quoted 5 lines · Colin Cross

Binaries compiled for arm may run on arm64 if CONFIG_COMPAT is selected. Set LSM_MMAP_MIN_ADDR to 32768 if ARM64 && COMPAT to prevent selinux failures launching 32-bit static executables that are mapped at 0x8000.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Probably makes sense to push this through the arm tree.

With your ack, I'm happy to take it ;)

Thanks.

Signature · 1 line
Catalin