security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64
authorColin Cross <ccross@android.com>
Tue, 4 Feb 2014 02:15:32 +0000 (02:15 +0000)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 22 Jul 2014 17:09:56 +0000 (10:09 -0700)
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.

Signed-off-by: Colin Cross <ccross@android.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Eric Paris <eparis@redhat.com>
Acked-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from upstream 3.14 commit 530b099dfe8499d639e7fbcad28c4199e2a720c7)
Change-Id: I05d092d3539380e08e7daf0b9d2faae76147b72b
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/367837
Signed-off-by: John Stultz <john.stultz@linaro.org>
security/Kconfig

index e9c6ac724fef153efb0c8ae3ceea6da99407ae7c..beb86b500adffd406e65b26d0cf9abeab3891703 100644 (file)
@@ -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