mirror of https://gitee.com/openkylin/linux.git
x86/boot/compressed/64: Rename kaslr_64.c to ident_map_64.c
The file contains only code related to identity-mapped page tables. Rename the file and compile it always in. Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20200907131613.12703-15-joro@8bytes.org
This commit is contained in:
parent
64e682638e
commit
5f2bb01682
|
@ -84,7 +84,7 @@ vmlinux-objs-y := $(obj)/vmlinux.lds $(obj)/kernel_info.o $(obj)/head_$(BITS).o
|
||||||
vmlinux-objs-$(CONFIG_EARLY_PRINTK) += $(obj)/early_serial_console.o
|
vmlinux-objs-$(CONFIG_EARLY_PRINTK) += $(obj)/early_serial_console.o
|
||||||
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/kaslr.o
|
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/kaslr.o
|
||||||
ifdef CONFIG_X86_64
|
ifdef CONFIG_X86_64
|
||||||
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/kaslr_64.o
|
vmlinux-objs-y += $(obj)/ident_map_64.o
|
||||||
vmlinux-objs-y += $(obj)/idt_64.o $(obj)/idt_handlers_64.o
|
vmlinux-objs-y += $(obj)/idt_64.o $(obj)/idt_handlers_64.o
|
||||||
vmlinux-objs-y += $(obj)/mem_encrypt.o
|
vmlinux-objs-y += $(obj)/mem_encrypt.o
|
||||||
vmlinux-objs-y += $(obj)/pgtable_64.o
|
vmlinux-objs-y += $(obj)/pgtable_64.o
|
||||||
|
|
|
@ -29,6 +29,15 @@
|
||||||
#define __PAGE_OFFSET __PAGE_OFFSET_BASE
|
#define __PAGE_OFFSET __PAGE_OFFSET_BASE
|
||||||
#include "../../mm/ident_map.c"
|
#include "../../mm/ident_map.c"
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_5LEVEL
|
||||||
|
unsigned int __pgtable_l5_enabled;
|
||||||
|
unsigned int pgdir_shift = 39;
|
||||||
|
unsigned int ptrs_per_p4d = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Used by PAGE_KERN* macros: */
|
||||||
|
pteval_t __default_kernel_pte_mask __read_mostly = ~0;
|
||||||
|
|
||||||
/* Used to track our page table allocation area. */
|
/* Used to track our page table allocation area. */
|
||||||
struct alloc_pgt_data {
|
struct alloc_pgt_data {
|
||||||
unsigned char *pgt_buf;
|
unsigned char *pgt_buf;
|
|
@ -40,17 +40,8 @@
|
||||||
#include <asm/setup.h> /* For COMMAND_LINE_SIZE */
|
#include <asm/setup.h> /* For COMMAND_LINE_SIZE */
|
||||||
#undef _SETUP
|
#undef _SETUP
|
||||||
|
|
||||||
#ifdef CONFIG_X86_5LEVEL
|
|
||||||
unsigned int __pgtable_l5_enabled;
|
|
||||||
unsigned int pgdir_shift __ro_after_init = 39;
|
|
||||||
unsigned int ptrs_per_p4d __ro_after_init = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern unsigned long get_cmd_line_ptr(void);
|
extern unsigned long get_cmd_line_ptr(void);
|
||||||
|
|
||||||
/* Used by PAGE_KERN* macros: */
|
|
||||||
pteval_t __default_kernel_pte_mask __read_mostly = ~0;
|
|
||||||
|
|
||||||
/* Simplified build-specific string for starting entropy. */
|
/* Simplified build-specific string for starting entropy. */
|
||||||
static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
|
static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
|
||||||
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION;
|
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION;
|
||||||
|
|
|
@ -134,6 +134,14 @@ int count_immovable_mem_regions(void);
|
||||||
static inline int count_immovable_mem_regions(void) { return 0; }
|
static inline int count_immovable_mem_regions(void) { return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* ident_map_64.c */
|
||||||
|
#ifdef CONFIG_X86_5LEVEL
|
||||||
|
extern unsigned int __pgtable_l5_enabled, pgdir_shift, ptrs_per_p4d;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Used by PAGE_KERN* macros: */
|
||||||
|
extern pteval_t __default_kernel_pte_mask;
|
||||||
|
|
||||||
/* idt_64.c */
|
/* idt_64.c */
|
||||||
extern gate_desc boot_idt[BOOT_IDT_ENTRIES];
|
extern gate_desc boot_idt[BOOT_IDT_ENTRIES];
|
||||||
extern struct desc_ptr boot_idt_desc;
|
extern struct desc_ptr boot_idt_desc;
|
||||||
|
|
Loading…
Reference in New Issue