1 /* SPDX-License-Identifier: GPL-2.0 */ << 2 #ifndef _ELF_RANDOMIZE_H 1 #ifndef _ELF_RANDOMIZE_H 3 #define _ELF_RANDOMIZE_H 2 #define _ELF_RANDOMIZE_H 4 3 5 struct mm_struct; 4 struct mm_struct; 6 5 7 #ifndef CONFIG_ARCH_HAS_ELF_RANDOMIZE 6 #ifndef CONFIG_ARCH_HAS_ELF_RANDOMIZE 8 static inline unsigned long arch_mmap_rnd(void 7 static inline unsigned long arch_mmap_rnd(void) { return 0; } 9 # if defined(arch_randomize_brk) && defined(CO 8 # if defined(arch_randomize_brk) && defined(CONFIG_COMPAT_BRK) 10 # define compat_brk_randomized 9 # define compat_brk_randomized 11 # endif 10 # endif 12 # ifndef arch_randomize_brk 11 # ifndef arch_randomize_brk 13 # define arch_randomize_brk(mm) (mm->b 12 # define arch_randomize_brk(mm) (mm->brk) 14 # endif 13 # endif 15 #else 14 #else 16 extern unsigned long arch_mmap_rnd(void); 15 extern unsigned long arch_mmap_rnd(void); 17 extern unsigned long arch_randomize_brk(struct 16 extern unsigned long arch_randomize_brk(struct mm_struct *mm); 18 # ifdef CONFIG_COMPAT_BRK 17 # ifdef CONFIG_COMPAT_BRK 19 # define compat_brk_randomized 18 # define compat_brk_randomized 20 # endif 19 # endif 21 #endif 20 #endif 22 21 23 #endif 22 #endif 24 23
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.