Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
"Two fixlets for x86:

- Handle WARN_ONs proper with the new UD based WARN implementation

- Disable 1G mappings when 2M mappings are disabled by kmemleak or
debug_pagealloc. Otherwise 1G mappings might still be used,
confusing the debug mechanisms"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Disable 1GB direct mappings when disabling 2MB mappings
x86/debug: Handle early WARN_ONs proper

+8 -4
+1
arch/x86/include/asm/extable.h
··· 29 29 } while (0) 30 30 31 31 extern int fixup_exception(struct pt_regs *regs, int trapnr); 32 + extern int fixup_bug(struct pt_regs *regs, int trapnr); 32 33 extern bool ex_has_fault_handler(unsigned long ip); 33 34 extern void early_fixup_exception(struct pt_regs *regs, int trapnr); 34 35
+1 -1
arch/x86/kernel/traps.c
··· 182 182 return ud == INSN_UD0 || ud == INSN_UD2; 183 183 } 184 184 185 - static int fixup_bug(struct pt_regs *regs, int trapnr) 185 + int fixup_bug(struct pt_regs *regs, int trapnr) 186 186 { 187 187 if (trapnr != X86_TRAP_UD) 188 188 return 0;
+3
arch/x86/mm/extable.c
··· 162 162 if (fixup_exception(regs, trapnr)) 163 163 return; 164 164 165 + if (fixup_bug(regs, trapnr)) 166 + return; 167 + 165 168 fail: 166 169 early_printk("PANIC: early exception 0x%02x IP %lx:%lx error %lx cr2 0x%lx\n", 167 170 (unsigned)trapnr, (unsigned long)regs->cs, regs->ip,
+3 -3
arch/x86/mm/init.c
··· 161 161 162 162 static void __init probe_page_size_mask(void) 163 163 { 164 - #if !defined(CONFIG_KMEMCHECK) 165 164 /* 166 165 * For CONFIG_KMEMCHECK or pagealloc debugging, identity mapping will 167 166 * use small pages. 168 167 * This will simplify cpa(), which otherwise needs to support splitting 169 168 * large pages into small in interrupt context, etc. 170 169 */ 171 - if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled()) 170 + if (boot_cpu_has(X86_FEATURE_PSE) && !debug_pagealloc_enabled() && !IS_ENABLED(CONFIG_KMEMCHECK)) 172 171 page_size_mask |= 1 << PG_LEVEL_2M; 173 - #endif 172 + else 173 + direct_gbpages = 0; 174 174 175 175 /* Enable PSE if available */ 176 176 if (boot_cpu_has(X86_FEATURE_PSE))