lkml.org 
[lkml]   [2018]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 4.17.x won't boot due to "x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G"
Date
there may be some other reasons which may cause undefined behavior 
(reboot for example):

in arch/x86/boot/compressed/pgtable_64.c in function paging_prepare():

1. structure "paging_config" allocated on stack without setting default
value for flag "l5_required":
>>struct paging_config paging_config = {};
l5_required is set only if CONFIG_X86_5LEVEL is defined

2. reading from memory which may be reserved in case of EFI systems:
>>    ebda_start = *(unsigned short *)0x40e << 4;
>>    bios_start = *(unsigned short *)0x413 << 10;
Also, on EFI system without CSM it will results in all zeros. Which will
place trampoline_start to 0x9d000. And it also may be reserved memory.
In fact I have such system and it is causes instant reboot (when code
starts copying to "trampoline_start").

3. paging_prepare(void) returns "struct paging_config". Copy by value.
Is it really specified by ABI or GCC itself that the second field (which
is flag "l5_required") will go to RDX register?



\
 
 \ /
  Last update: 2018-07-25 19:27    [W:0.248 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site