linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64
@ 2014-02-04  2:15 Colin Cross
  2014-02-04  9:38 ` Will Deacon
  2014-02-05 11:48 ` Catalin Marinas
  0 siblings, 2 replies; 6+ messages in thread
From: Colin Cross @ 2014-02-04  2:15 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 security/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/Kconfig b/security/Kconfig
index e9c6ac724fef..beb86b500adf 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -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
-- 
1.9.0.rc1.175.g0b1dcb5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64
  2014-02-04  2:15 [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64 Colin Cross
@ 2014-02-04  9:38 ` Will Deacon
  2014-02-05  9:27   ` Eric Paris
  2014-02-05 11:48 ` Catalin Marinas
  1 sibling, 1 reply; 6+ messages in thread
From: Will Deacon @ 2014-02-04  9:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Feb 04, 2014 at 02:15:32AM +0000, Colin Cross wrote:
> 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>
> ---
>  security/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/Kconfig b/security/Kconfig
> index e9c6ac724fef..beb86b500adf 100644
> --- a/security/Kconfig
> +++ b/security/Kconfig
> @@ -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.

  Acked-by: Will Deacon <will.deacon@arm.com>

Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64
  2014-02-04  9:38 ` Will Deacon
@ 2014-02-05  9:27   ` Eric Paris
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Paris @ 2014-02-05  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

Acked-by: Eric Paris <eparis@redhat.com>

On Tue, Feb 4, 2014 at 4:38 AM, Will Deacon <will.deacon@arm.com> wrote:
> On Tue, Feb 04, 2014 at 02:15:32AM +0000, Colin Cross wrote:
>> 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>
>> ---
>>  security/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/security/Kconfig b/security/Kconfig
>> index e9c6ac724fef..beb86b500adf 100644
>> --- a/security/Kconfig
>> +++ b/security/Kconfig
>> @@ -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.
>
>   Acked-by: Will Deacon <will.deacon@arm.com>
>
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64
  2014-02-04  2:15 [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64 Colin Cross
  2014-02-04  9:38 ` Will Deacon
@ 2014-02-05 11:48 ` Catalin Marinas
  2014-02-05 14:02   ` James Morris
  1 sibling, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2014-02-05 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Feb 04, 2014 at 02:15:32AM +0000, Colin Cross wrote:
> 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: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64
  2014-02-05 11:48 ` Catalin Marinas
@ 2014-02-05 14:02   ` James Morris
  2014-02-05 14:57     ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: James Morris @ 2014-02-05 14:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 5 Feb 2014, Catalin Marinas wrote:

> On Tue, Feb 04, 2014 at 02:15:32AM +0000, Colin Cross wrote:
> > 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: Catalin Marinas <catalin.marinas@arm.com>

Acked-by: James Morris <james.l.morris@oracle.com>

Probably makes sense to push this through the arm tree.


-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64
  2014-02-05 14:02   ` James Morris
@ 2014-02-05 14:57     ` Catalin Marinas
  0 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2014-02-05 14:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 05, 2014 at 02:02:22PM +0000, James Morris wrote:
> On Wed, 5 Feb 2014, Catalin Marinas wrote:
> 
> > On Tue, Feb 04, 2014 at 02:15:32AM +0000, Colin Cross wrote:
> > > 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: Catalin Marinas <catalin.marinas@arm.com>
> 
> Acked-by: James Morris <james.l.morris@oracle.com>
> 
> Probably makes sense to push this through the arm tree.

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

Thanks.

-- 
Catalin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-05 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04  2:15 [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64 Colin Cross
2014-02-04  9:38 ` Will Deacon
2014-02-05  9:27   ` Eric Paris
2014-02-05 11:48 ` Catalin Marinas
2014-02-05 14:02   ` James Morris
2014-02-05 14:57     ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).