linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bump vm.mmap_min_addr on 64-bit
@ 2019-04-01  5:06 Alexey Dobriyan
  2019-04-01 23:05 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2019-04-01  5:06 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm

No self respecting 64-bit program should ever touch that lowly 32-bit
part of address space.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 mm/Kconfig       |    3 ++-
 security/Kconfig |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -306,7 +306,8 @@ config KSM
 config DEFAULT_MMAP_MIN_ADDR
         int "Low address space to protect from user allocation"
 	depends on MMU
-        default 4096
+	default 4096 if !64BIT
+	default 4294967296 if 64BIT
         help
 	  This is the portion of low virtual memory which should be protected
 	  from userspace allocation.  Keeping a user from writing to low pages
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -129,7 +129,8 @@ 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 || (ARM64 && COMPAT)
-	default 65536
+	default 65536 if !64BIT
+	default 4294967296 if 64BIT
 	help
 	  This is the portion of low virtual memory which should be protected
 	  from userspace allocation.  Keeping a user from writing to low pages


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

* Re: [PATCH] Bump vm.mmap_min_addr on 64-bit
  2019-04-01  5:06 [PATCH] Bump vm.mmap_min_addr on 64-bit Alexey Dobriyan
@ 2019-04-01 23:05 ` Andrew Morton
  2019-04-02  5:57   ` Alexey Dobriyan
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2019-04-01 23:05 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: linux-mm

On Mon, 1 Apr 2019 08:06:13 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:

> No self respecting 64-bit program should ever touch that lowly 32-bit
> part of address space.
>
> ...
>
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -306,7 +306,8 @@ config KSM
>  config DEFAULT_MMAP_MIN_ADDR
>          int "Low address space to protect from user allocation"
>  	depends on MMU
> -        default 4096
> +	default 4096 if !64BIT
> +	default 4294967296 if 64BIT
>          help
>  	  This is the portion of low virtual memory which should be protected
>  	  from userspace allocation.  Keeping a user from writing to low pages
> --- a/security/Kconfig
> +++ b/security/Kconfig
> @@ -129,7 +129,8 @@ 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 || (ARM64 && COMPAT)
> -	default 65536
> +	default 65536 if !64BIT
> +	default 4294967296 if 64BIT
>  	help
>  	  This is the portion of low virtual memory which should be protected
>  	  from userspace allocation.  Keeping a user from writing to low pages

Gee.  Do we have any idea what effect this will have upon all userspace
programs, some of which do inexplicably weird things?

What's the benefit?


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

* Re: [PATCH] Bump vm.mmap_min_addr on 64-bit
  2019-04-01 23:05 ` Andrew Morton
@ 2019-04-02  5:57   ` Alexey Dobriyan
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2019-04-02  5:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm

On Mon, Apr 01, 2019 at 04:05:59PM -0700, Andrew Morton wrote:
> On Mon, 1 Apr 2019 08:06:13 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:
> 
> > No self respecting 64-bit program should ever touch that lowly 32-bit
> > part of address space.

> Gee.  Do we have any idea what effect this will have upon all userspace
> programs, some of which do inexplicably weird things?
> 
> What's the benefit?

Note the date :^)


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

end of thread, other threads:[~2019-04-02  5:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01  5:06 [PATCH] Bump vm.mmap_min_addr on 64-bit Alexey Dobriyan
2019-04-01 23:05 ` Andrew Morton
2019-04-02  5:57   ` Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox