projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37624b5
)
parisc: Consider stack randomization for mmap base only when necessary
author
Alexandre Ghiti
<alex@ghiti.fr>
Thu, 4 Apr 2019 06:26:22 +0000
(
02:26
-0400)
committer
Helge Deller
<deller@gmx.de>
Fri, 3 May 2019 21:47:38 +0000
(23:47 +0200)
Do not offset mmap base address because of stack randomization if
current task does not want randomization.
Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/sys_parisc.c
patch
|
blob
|
history
diff --git
a/arch/parisc/kernel/sys_parisc.c
b/arch/parisc/kernel/sys_parisc.c
index
376ea0d
..
4407ac4
100644
(file)
--- a/
arch/parisc/kernel/sys_parisc.c
+++ b/
arch/parisc/kernel/sys_parisc.c
@@
-86,7
+86,8
@@
static unsigned long mmap_upper_limit(struct rlimit *rlim_stack)
stack_base = STACK_SIZE_MAX;
/* Add space for stack randomization. */
- stack_base += (STACK_RND_MASK << PAGE_SHIFT);
+ if (current->flags & PF_RANDOMIZE)
+ stack_base += (STACK_RND_MASK << PAGE_SHIFT);
return PAGE_ALIGN(STACK_TOP - stack_base);
}