Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-05 Thread Catalin Marinas
On Wed, Feb 05, 2014 at 02:02:22PM +, James Morris wrote:
> On Wed, 5 Feb 2014, Catalin Marinas wrote:
> 
> > On Tue, Feb 04, 2014 at 02:15:32AM +, 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 
> > 
> > Acked-by: Catalin Marinas 
> 
> Acked-by: James Morris 
> 
> Probably makes sense to push this through the arm tree.

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

Thanks.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-05 Thread James Morris
On Wed, 5 Feb 2014, Catalin Marinas wrote:

> On Tue, Feb 04, 2014 at 02:15:32AM +, 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 
> 
> Acked-by: Catalin Marinas 

Acked-by: James Morris 

Probably makes sense to push this through the arm tree.


-- 
James Morris

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-05 Thread Catalin Marinas
On Tue, Feb 04, 2014 at 02:15:32AM +, 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 

Acked-by: Catalin Marinas 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-05 Thread Eric Paris
Acked-by: Eric Paris 

On Tue, Feb 4, 2014 at 4:38 AM, Will Deacon  wrote:
> On Tue, Feb 04, 2014 at 02:15:32AM +, 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 
>> ---
>>  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
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-security-module" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-05 Thread Eric Paris
Acked-by: Eric Paris epa...@redhat.com

On Tue, Feb 4, 2014 at 4:38 AM, Will Deacon will.dea...@arm.com wrote:
 On Tue, Feb 04, 2014 at 02:15:32AM +, 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 ccr...@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.dea...@arm.com

 Will
 --
 To unsubscribe from this list: send the line unsubscribe 
 linux-security-module in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-05 Thread Catalin Marinas
On Tue, Feb 04, 2014 at 02:15:32AM +, 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 ccr...@android.com

Acked-by: Catalin Marinas catalin.mari...@arm.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-05 Thread James Morris
On Wed, 5 Feb 2014, Catalin Marinas wrote:

 On Tue, Feb 04, 2014 at 02:15:32AM +, 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 ccr...@android.com
 
 Acked-by: Catalin Marinas catalin.mari...@arm.com

Acked-by: James Morris james.l.mor...@oracle.com

Probably makes sense to push this through the arm tree.


-- 
James Morris
jmor...@namei.org
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

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

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

Thanks.

-- 
Catalin
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-04 Thread Will Deacon
On Tue, Feb 04, 2014 at 02:15:32AM +, 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 
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-04 Thread Will Deacon
On Tue, Feb 04, 2014 at 02:15:32AM +, 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 ccr...@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.dea...@arm.com

Will
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-03 Thread 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.

Signed-off-by: Colin Cross 
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] security: select correct default LSM_MMAP_MIN_ADDR on arm on arm64

2014-02-03 Thread 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.

Signed-off-by: Colin Cross ccr...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/