Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull misc x86 fixes from Ingo Molnar: "This contains: - EFI fixes - a boot printout fix - ASLR/kASLR fixes - intel microcode driver fixes - other misc fixes Most of the linecount comes from an EFI revert" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/ASLR: Avoid PAGE_SIZE redefinition for UML subarch x86/microcode/intel: Handle truncated microcode images more robustly x86/microcode/intel: Guard against stack overflow in the loader x86, mm/ASLR: Fix stack randomization on 64-bit systems x86/mm/init: Fix incorrect page size in init_memory_mapping() printks x86/mm/ASLR: Propagate base load address calculation Documentation/x86: Fix path in zero-page.txt x86/apic: Fix the devicetree build in certain configs Revert "efi/libstub: Call get_memory_map() to obtain map and desc sizes" x86/efi: Avoid triple faults during EFI mixed mode calls
This commit is contained in:
@@ -122,6 +122,8 @@
|
||||
unsigned long max_low_pfn_mapped;
|
||||
unsigned long max_pfn_mapped;
|
||||
|
||||
bool __read_mostly kaslr_enabled = false;
|
||||
|
||||
#ifdef CONFIG_DMI
|
||||
RESERVE_BRK(dmi_alloc, 65536);
|
||||
#endif
|
||||
@@ -425,6 +427,11 @@ static void __init reserve_initrd(void)
|
||||
}
|
||||
#endif /* CONFIG_BLK_DEV_INITRD */
|
||||
|
||||
static void __init parse_kaslr_setup(u64 pa_data, u32 data_len)
|
||||
{
|
||||
kaslr_enabled = (bool)(pa_data + sizeof(struct setup_data));
|
||||
}
|
||||
|
||||
static void __init parse_setup_data(void)
|
||||
{
|
||||
struct setup_data *data;
|
||||
@@ -450,6 +457,9 @@ static void __init parse_setup_data(void)
|
||||
case SETUP_EFI:
|
||||
parse_efi_setup(pa_data, data_len);
|
||||
break;
|
||||
case SETUP_KASLR:
|
||||
parse_kaslr_setup(pa_data, data_len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -832,10 +842,14 @@ static void __init trim_low_memory_range(void)
|
||||
static int
|
||||
dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
|
||||
{
|
||||
pr_emerg("Kernel Offset: 0x%lx from 0x%lx "
|
||||
"(relocation range: 0x%lx-0x%lx)\n",
|
||||
(unsigned long)&_text - __START_KERNEL, __START_KERNEL,
|
||||
__START_KERNEL_map, MODULES_VADDR-1);
|
||||
if (kaslr_enabled)
|
||||
pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n",
|
||||
(unsigned long)&_text - __START_KERNEL,
|
||||
__START_KERNEL,
|
||||
__START_KERNEL_map,
|
||||
MODULES_VADDR-1);
|
||||
else
|
||||
pr_emerg("Kernel Offset: disabled\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user