Skip to contentSkip to conversation

x86-tip.today (4cdf573) early instaboot

DISCUSSION Mike Galbraith 3 participants 6 messages Apr 10, 2018 – Apr 12, 2018 x86

lore
Share & tools
lore
#0 lore raw

Hi Ingo,

FYI, my i4790 box reboots immediately.. or close enough to it that you see nothing at all before again meeting the bios splash. Master with the ~same config works fine. I haven't poked around yet (work).

-Mike

#1 lore raw
Quoted 5 lines · Mike Galbraith

Hi Ingo,

FYI, my i4790 box reboots immediately.. or close enough to it that you see nothing at all before again meeting the bios splash. Master with the ~same config works fine. I haven't poked around yet (work).

Hm, so there's been a few 'dangerous' pieces of work merged yesterday-ish.

Prime suspects would be:

triton:~/tip> gll linus..x86/pti

0564258fb2cf: x86/pti: Leave kernel text global for !PCID
a5df4f1f0d78: x86/pti: Never implicitly clear _PAGE_GLOBAL for kernel image
e0bb456e3250: x86/pti: Enable global pages for shared areas
efad2b415152: x86/mm: Do not forbid _PAGE_RW before init for __ro_after_init 4ddee6efdcd0: x86/mm: Comment _PAGE_GLOBAL mystery
e71e836f463d: x86/mm: Remove extra filtering in pageattr code 64c80759408f: x86/mm: Do not auto-massage page protections 6baf4bec02db: x86/espfix: Document use of _PAGE_GLOBAL 8a57f4849f4f: x86/mm: Introduce "default" kernel PTE mask 606c7193d5fb: x86/mm: Undo double _PAGE_PSE clearing
d1440b23c922: x86/mm: Factor out pageattr _PAGE_GLOBAL setting
ee1400dda318: Merge branch 'linus' into x86/pti to pick up upstream changes 071ccc966ba5: x86/entry/64: Drop idtentry's manual stack switch for user entries 9820e1c3376c: x86/uapi: Fix asm/bootparam.h userspace compilation errors

... which you could test via 0564258fb2cf: if that insta-reboots too then 9820e1c3376c^1 is expected to work and 4 bisection steps should pinpoint the guilty commit ...

But there's also the syscall rework:

triton:~/tip> gll linus..x86/asm
c76fc9826075: syscalls/x86: Adapt syscall_wrapper.h to the new syscall stub naming convention
d5a00528b58c: syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*() 5ac9efa3c50d: syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention
e145242ea0df: syscalls/core, syscalls/x86: Clean up syscall stub naming convention 6dc936f175cc: syscalls/x86: Extend register clearing on syscall entry to lower registers
f8781c4a2263: syscalls/x86: Unconditionally enable 'struct pt_regs' based syscalls on x86_64
ebeb8c82ffaf: syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32 7303e30ec1d8: syscalls/core: Prepare CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y for compat syscalls
fa697140f9a2: syscalls/x86: Use 'struct pt_regs' based syscall calling convention for 64-bit syscalls 1bd21c6c21e8: syscalls/core: Introduce CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
dfe64506c01e: x86/syscalls: Don't pointlessly reload the system call number

... which you could test via c76fc9826075: if that insta-reboots then dfe64506c01e^1 should be good and 4 bisection steps should suffice.

Thanks,

Ingo

#2 lore raw
Quoted 29 lines · Ingo Molnar
Quoted 5 lines · Mike Galbraith

Hi Ingo,

FYI, my i4790 box reboots immediately.. or close enough to it that you see nothing at all before again meeting the bios splash. Master with the ~same config works fine. I haven't poked around yet (work).

Hm, so there's been a few 'dangerous' pieces of work merged yesterday-ish.

Prime suspects would be:

triton:~/tip> gll linus..x86/pti

0564258fb2cf: x86/pti: Leave kernel text global for !PCID
a5df4f1f0d78: x86/pti: Never implicitly clear _PAGE_GLOBAL for kernel image
e0bb456e3250: x86/pti: Enable global pages for shared areas
efad2b415152: x86/mm: Do not forbid _PAGE_RW before init for __ro_after_init 4ddee6efdcd0: x86/mm: Comment _PAGE_GLOBAL mystery
e71e836f463d: x86/mm: Remove extra filtering in pageattr code 64c80759408f: x86/mm: Do not auto-massage page protections <== WOOF 6baf4bec02db: x86/espfix: Document use of _PAGE_GLOBAL 8a57f4849f4f: x86/mm: Introduce "default" kernel PTE mask 606c7193d5fb: x86/mm: Undo double _PAGE_PSE clearing
d1440b23c922: x86/mm: Factor out pageattr _PAGE_GLOBAL setting
ee1400dda318: Merge branch 'linus' into x86/pti to pick up upstream changes 071ccc966ba5: x86/entry/64: Drop idtentry's manual stack switch for user entries 9820e1c3376c: x86/uapi: Fix asm/bootparam.h userspace compilation errors

Quoted 3 lines

... which you could test via 0564258fb2cf: if that insta-reboots too then 9820e1c3376c^1 is expected to work and 4 bisection steps should pinpoint the guilty commit ...

Thanks. I already had a full bisect running, so ended up doing more than 4 steps, but ended up at the above.

-Mike

#3 lore raw
Quoted 30 lines · Mike Galbraith
Quoted 29 lines · Ingo Molnar
Quoted 5 lines · Mike Galbraith

Hi Ingo,

FYI, my i4790 box reboots immediately.. or close enough to it that you see nothing at all before again meeting the bios splash. Master with the ~same config works fine. I haven't poked around yet (work).

Hm, so there's been a few 'dangerous' pieces of work merged yesterday-ish.

Prime suspects would be:

triton:~/tip> gll linus..x86/pti

0564258fb2cf: x86/pti: Leave kernel text global for !PCID
a5df4f1f0d78: x86/pti: Never implicitly clear _PAGE_GLOBAL for kernel image
e0bb456e3250: x86/pti: Enable global pages for shared areas
efad2b415152: x86/mm: Do not forbid _PAGE_RW before init for __ro_after_init 4ddee6efdcd0: x86/mm: Comment _PAGE_GLOBAL mystery
e71e836f463d: x86/mm: Remove extra filtering in pageattr code 64c80759408f: x86/mm: Do not auto-massage page protections <== WOOF 6baf4bec02db: x86/espfix: Document use of _PAGE_GLOBAL 8a57f4849f4f: x86/mm: Introduce "default" kernel PTE mask 606c7193d5fb: x86/mm: Undo double _PAGE_PSE clearing
d1440b23c922: x86/mm: Factor out pageattr _PAGE_GLOBAL setting
ee1400dda318: Merge branch 'linus' into x86/pti to pick up upstream changes 071ccc966ba5: x86/entry/64: Drop idtentry's manual stack switch for user entries 9820e1c3376c: x86/uapi: Fix asm/bootparam.h userspace compilation errors

Quoted 6 lines
Quoted 3 lines

... which you could test via 0564258fb2cf: if that insta-reboots too then 9820e1c3376c^1 is expected to work and 4 bisection steps should pinpoint the guilty commit ...

Thanks. I already had a full bisect running, so ended up doing more than 4 steps, but ended up at the above.

Just out of curiosity, can you try the following patch and see if it fixes your reboot issue:

(quoted diff) +0 -0

b/arch/x86/boot/compressed/kaslr.c
index c5196d2..a0a50b9 100644

arch/x86/boot/compressed/kaslr.c +1 -1
@@ -55,7 +55,7 @@
 extern unsigned long get_cmd_line_ptr(void);
 
 /* Used by PAGE_KERN* macros: */
-pteval_t __default_kernel_pte_mask __read_mostly;
+pteval_t __default_kernel_pte_mask __read_mostly = ~0;
 
 /* Simplified build-specific string for starting entropy. */
 static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"

Thanks,
Tom

Quoted 3 lines

-Mike

#4 lore raw
Quoted 3 lines · Tom Lendacky

Just out of curiosity, can you try the following patch and see if it fixes your reboot issue:

Yup, all better.

Quoted 14 lines
arch/x86/boot/compressed/kaslr.c +1 -1
index c5196d2..a0a50b9 100644
@@ -55,7 +55,7 @@
 extern unsigned long get_cmd_line_ptr(void);
 
 /* Used by PAGE_KERN* macros: */
-pteval_t __default_kernel_pte_mask __read_mostly;
+pteval_t __default_kernel_pte_mask __read_mostly = ~0;
 
 /* Simplified build-specific string for starting entropy. */
 static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
#5 lore raw
Quoted 15 lines · Mike Galbraith
Quoted 3 lines · Tom Lendacky

Just out of curiosity, can you try the following patch and see if it fixes your reboot issue:

Yup, all better.

Quoted 8 lines
arch/x86/boot/compressed/kaslr.c +0 -0
index c5196d2..a0a50b9 100644
@@ -55,7 +55,7 @@
 extern unsigned long get_cmd_line_ptr(void);
 
Quoted 6 lines

arch/x86/boot/compressed/kaslr.c line 61

Quoted 6 lines
arch/x86/boot/compressed/kaslr.c +1 -1
 /* Used by PAGE_KERN* macros: */
-pteval_t __default_kernel_pte_mask __read_mostly;
+pteval_t __default_kernel_pte_mask __read_mostly = ~0;
 
 /* Simplified build-specific string for starting entropy. */
 static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"

Thanks guys!

I ended up back-merging this fix (and another fix) into:

fb43d6cb91ef: x86/mm: Do not auto-massage page protections

I added credits as:

- printk format warning fix from: Arnd Bergmann <[email protected]>
- boot crash fix from: Tom Lendacky <[email protected]>
- crash bisected by: Mike Galbraith <[email protected]>

...

Thanks,

Ingo