]> git.karo-electronics.de Git - karo-tx-linux.git/blob - include/linux/elf-randomize.h
Merge branch 'linux-4.4' of https://github.com/skeggsb/linux into drm-fixes
[karo-tx-linux.git] / include / linux / elf-randomize.h
1 #ifndef _ELF_RANDOMIZE_H
2 #define _ELF_RANDOMIZE_H
3
4 struct mm_struct;
5
6 #ifndef CONFIG_ARCH_HAS_ELF_RANDOMIZE
7 static inline unsigned long arch_mmap_rnd(void) { return 0; }
8 # if defined(arch_randomize_brk) && defined(CONFIG_COMPAT_BRK)
9 #  define compat_brk_randomized
10 # endif
11 # ifndef arch_randomize_brk
12 #  define arch_randomize_brk(mm)        (mm->brk)
13 # endif
14 #else
15 extern unsigned long arch_mmap_rnd(void);
16 extern unsigned long arch_randomize_brk(struct mm_struct *mm);
17 # ifdef CONFIG_COMPAT_BRK
18 #  define compat_brk_randomized
19 # endif
20 #endif
21
22 #endif