linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Alexandre Ghiti <alex@ghiti.fr>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390: mmap base does not depend on ADDR_NO_RANDOMIZE personality
Date: Sat, 1 Jun 2019 12:55:35 +0200	[thread overview]
Message-ID: <20190601105534.GG3600@osiris> (raw)
In-Reply-To: <20190404061956.25507-1-alex@ghiti.fr>

On Thu, Apr 04, 2019 at 02:19:56AM -0400, Alexandre Ghiti wrote:
> randomize_stack_top() checks for current task flag PF_RANDOMIZE in order
> to use stack randomization and PF_RANDOMIZE is set when
> ADDR_NO_RANDOMIZE is unset, so no need to check for ADDR_NO_RANDOMIZE
> in stack_maxrandom_size.
> 
> Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
> ---
>  arch/s390/mm/mmap.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
> index 687f2a4d3459..5185ed0a0463 100644
> --- a/arch/s390/mm/mmap.c
> +++ b/arch/s390/mm/mmap.c
> @@ -24,8 +24,7 @@ static unsigned long stack_maxrandom_size(void)
>  {
>  	if (!(current->flags & PF_RANDOMIZE))
>  		return 0;
> -	if (current->personality & ADDR_NO_RANDOMIZE)
> -		return 0;
> +
>  	return STACK_RND_MASK << PAGE_SHIFT;

Applied, thanks.


      reply	other threads:[~2019-06-01 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04  6:19 [PATCH] s390: mmap base does not depend on ADDR_NO_RANDOMIZE personality Alexandre Ghiti
2019-06-01 10:55 ` Heiko Carstens [this message]

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=20190601105534.GG3600@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).