mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	mingo@kernel.org, Michal Hocko <mhocko@suse.com>,
	hpa@zytor.com, oleg@redhat.com,
	Thomas Gleixner <tglx@linutronix.de>,
	davej@codemonkey.org.uk, peterz@infradead.org,
	linux-kernel@vger.kernel.org
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap
Date: Fri, 23 Jun 2017 22:35:50 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.20.1706232233020.30709@cbobk.fhfr.pm> (raw)
In-Reply-To: <tip-86b110d2ae6365ce91cabd37588bc8611770421a@git.kernel.org>

On Fri, 23 Jun 2017, tip-bot for Michal Hocko wrote:

> TASK_SIZE (allowed by mmap_base) is pretty much unimited in the real
> life. This would give mmap 20TB of additional address space which is
> quite nice. Especially when it is much more likely to use that address
> space than the reserved stack.
> 
> Digging into the history the original implementation of the randomization:
> 
>   8817210d4d96 ("[PATCH] x86_64: Flexmap for 32bit and randomized mappings for 64bit")
> 
> didn't have this restriction.
> 
> So let's try and remove this assumption - hopefully nothing breaks.
> 
> Signed-off-by: Michal Hocko <mhocko@suse.com>
> Cc: Dave Jones <davej@codemonkey.org.uk>
> Cc: Jiri Kosina <jkosina@suse.cz>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: akpm@linux-foundation.org
> Cc: hughd@google.com
> Cc: linux-mm@kvack.org
> Cc: will.deacon@arm.com
> Link: http://lkml.kernel.org/r/20170614082218.12450-1-mhocko@kernel.org
> [ So I've applied this to tip:x86/mm with a wider Cc: list - if anyone objects to this change please holler. ]
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  arch/x86/mm/mmap.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
> index 19ad095..797295e 100644
> --- a/arch/x86/mm/mmap.c
> +++ b/arch/x86/mm/mmap.c
> @@ -74,9 +74,6 @@ static int mmap_is_legacy(void)
>  	if (current->personality & ADDR_COMPAT_LAYOUT)
>  		return 1;
>  
> -	if (rlimit(RLIMIT_STACK) == RLIM_INFINITY)
> -		return 1;
> -

>From the person who actually added this particular restriction

	Acked-by: Jiri Kosina <jkosina@suse.cz>

I think it was some historical remnant from the times when 32/64 arch code 
split still existed, but can't really recall any details after all those 
years; it doesn't make sense to me any more.

Thanks,

-- 
Jiri Kosina
SUSE Labs

  parent reply	other threads:[~2017-06-23 20:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14  8:22 [RFC PATCH] mmap, aslr: do not enforce legacy mmap on unlimited stacks Michal Hocko
2017-06-23  8:46 ` Michal Hocko
2017-06-23 14:02 ` [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap tip-bot for Michal Hocko
2017-06-23 14:54   ` Oleg Nesterov
2017-06-27  8:00     ` Jiri Kosina
2017-06-27 14:22       ` Oleg Nesterov
2017-06-28  9:40         ` Jiri Kosina
2017-06-23 20:35   ` Jiri Kosina [this message]
2017-06-24  6:43   ` tip-bot for Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.20.1706232233020.30709@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=davej@codemonkey.org.uk \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®