Thomas Garnier | d899a7d | 2016-06-21 17:46:58 -0700 | [diff] [blame] | 1 | #ifndef _ASM_KASLR_H_ |
| 2 | #define _ASM_KASLR_H_ |
| 3 | |
| 4 | unsigned long kaslr_get_random_long(const char *purpose); |
| 5 | |
Thomas Garnier | 0483e1f | 2016-06-21 17:47:02 -0700 | [diff] [blame] | 6 | #ifdef CONFIG_RANDOMIZE_MEMORY |
Thomas Garnier | 021182e | 2016-06-21 17:47:03 -0700 | [diff] [blame] | 7 | extern unsigned long page_offset_base; |
Thomas Garnier | a95ae27 | 2016-06-21 17:47:04 -0700 | [diff] [blame] | 8 | extern unsigned long vmalloc_base; |
Thomas Garnier | 25dfe47 | 2016-07-27 08:59:56 -0700 | [diff] [blame] | 9 | extern unsigned long vmemmap_base; |
Thomas Garnier | 021182e | 2016-06-21 17:47:03 -0700 | [diff] [blame] | 10 | |
Thomas Garnier | 0483e1f | 2016-06-21 17:47:02 -0700 | [diff] [blame] | 11 | void kernel_randomize_memory(void); |
| 12 | #else |
| 13 | static inline void kernel_randomize_memory(void) { } |
| 14 | #endif /* CONFIG_RANDOMIZE_MEMORY */ |
| 15 | |
Thomas Garnier | d899a7d | 2016-06-21 17:46:58 -0700 | [diff] [blame] | 16 | #endif |