mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 12:25:08 +07:00
eedb92abb9
We need to be able to adjust virtual memory layout at runtime to be able to switch between 4- and 5-level paging at boot-time. KASLR already has movable __VMALLOC_BASE, __VMEMMAP_BASE and __PAGE_OFFSET. Let's re-use it. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180214111656.88514-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
14 lines
314 B
C
14 lines
314 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_KASLR_H_
|
|
#define _ASM_KASLR_H_
|
|
|
|
unsigned long kaslr_get_random_long(const char *purpose);
|
|
|
|
#ifdef CONFIG_RANDOMIZE_MEMORY
|
|
void kernel_randomize_memory(void);
|
|
#else
|
|
static inline void kernel_randomize_memory(void) { }
|
|
#endif /* CONFIG_RANDOMIZE_MEMORY */
|
|
|
|
#endif
|