diff options
author | Helge Deller <deller@gmx.de> | 2016-10-16 00:02:27 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2016-12-12 22:21:21 +0100 |
commit | 18d98a79382cbe5a7569788d5b7b18e7015506f2 (patch) | |
tree | bf5d3b90523528747e7a5d67bc9086c288a94ad5 /arch/parisc/include/asm/elf.h | |
parent | Linux 4.9 (diff) | |
download | linux-18d98a79382cbe5a7569788d5b7b18e7015506f2.tar.xz linux-18d98a79382cbe5a7569788d5b7b18e7015506f2.zip |
parisc: Enable KASLR
Add missing code for userspace executable address randomization, e.g.
applications compiled with the gcc -pie option.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/include/asm/elf.h')
-rw-r--r-- | arch/parisc/include/asm/elf.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h index 78c9fd32c554..a6b2a421571e 100644 --- a/arch/parisc/include/asm/elf.h +++ b/arch/parisc/include/asm/elf.h @@ -348,9 +348,10 @@ struct pt_regs; /* forward declaration... */ #define ELF_HWCAP 0 -#define STACK_RND_MASK (is_32bit_task() ? \ - 0x7ff >> (PAGE_SHIFT - 12) : \ - 0x3ffff >> (PAGE_SHIFT - 12)) +/* Masks for stack and mmap randomization */ +#define BRK_RND_MASK (is_32bit_task() ? 0x07ffUL : 0x3ffffUL) +#define MMAP_RND_MASK (is_32bit_task() ? 0x1fffUL : 0x3ffffUL) +#define STACK_RND_MASK MMAP_RND_MASK struct mm_struct; extern unsigned long arch_randomize_brk(struct mm_struct *); |