* [PATCH] s390: mmap base does not depend on ADDR_NO_RANDOMIZE personality
@ 2019-04-04 6:19 Alexandre Ghiti
2019-06-01 10:55 ` Heiko Carstens
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Ghiti @ 2019-04-04 6:19 UTC (permalink / raw)
To: Martin Schwidefsky, Heiko Carstens, Kees Cook, Andrew Morton,
Alexandre Ghiti, linux-s390, linux-kernel
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;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] s390: mmap base does not depend on ADDR_NO_RANDOMIZE personality
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
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2019-06-01 10:55 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: Martin Schwidefsky, Kees Cook, Andrew Morton, linux-s390, linux-kernel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-01 10:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).