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 tag 'objtool-urgent-2021-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fix from Thomas Gleixner:
"A single objtool fix to handle the PUSHF/POPF validation correctly for
the paravirt changes which modified arch_local_irq_restore not to use
popf"

* tag 'objtool-urgent-2021-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
objtool,x86: Fix uaccess PUSHF/POPF validation

+7 -6
+4 -6
arch/x86/include/asm/smap.h
··· 58 58 unsigned long flags; 59 59 60 60 asm volatile ("# smap_save\n\t" 61 - ALTERNATIVE("jmp 1f", "", X86_FEATURE_SMAP) 62 - "pushf; pop %0; " __ASM_CLAC "\n\t" 63 - "1:" 61 + ALTERNATIVE("", "pushf; pop %0; " __ASM_CLAC "\n\t", 62 + X86_FEATURE_SMAP) 64 63 : "=rm" (flags) : : "memory", "cc"); 65 64 66 65 return flags; ··· 68 69 static __always_inline void smap_restore(unsigned long flags) 69 70 { 70 71 asm volatile ("# smap_restore\n\t" 71 - ALTERNATIVE("jmp 1f", "", X86_FEATURE_SMAP) 72 - "push %0; popf\n\t" 73 - "1:" 72 + ALTERNATIVE("", "push %0; popf\n\t", 73 + X86_FEATURE_SMAP) 74 74 : : "g" (flags) : "memory", "cc"); 75 75 } 76 76
+3
tools/objtool/check.c
··· 2442 2442 if (update_cfi_state(insn, &state->cfi, op)) 2443 2443 return 1; 2444 2444 2445 + if (!insn->alt_group) 2446 + continue; 2447 + 2445 2448 if (op->dest.type == OP_DEST_PUSHF) { 2446 2449 if (!state->uaccess_stack) { 2447 2450 state->uaccess_stack = 1;