projects
/
openwrt
/
staging
/
blogic.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 376ea0d1b2759d2657741f8f8683f77e61a71b2d..4407ac4c1d84396aa17fe7eba988844c7e790114 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);
}