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' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
"Sorry, meant to push out this batch earlier this weekend"

* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
ftrace/x86: Load ftrace_ops in parameter not the variable holding it

+10 -9
+7 -6
arch/x86/include/asm/fpu-internal.h
··· 293 293 /* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception 294 294 is pending. Clear the x87 state here by setting it to fixed 295 295 values. "m" is a random variable that should be in L1 */ 296 - alternative_input( 297 - ASM_NOP8 ASM_NOP2, 298 - "emms\n\t" /* clear stack tags */ 299 - "fildl %P[addr]", /* set F?P to defined value */ 300 - X86_FEATURE_FXSAVE_LEAK, 301 - [addr] "m" (tsk->thread.fpu.has_fpu)); 296 + if (unlikely(static_cpu_has(X86_FEATURE_FXSAVE_LEAK))) { 297 + asm volatile( 298 + "fnclex\n\t" 299 + "emms\n\t" 300 + "fildl %P[addr]" /* set F?P to defined value */ 301 + : : [addr] "m" (tsk->thread.fpu.has_fpu)); 302 + } 302 303 303 304 return fpu_restore_checking(&tsk->thread.fpu); 304 305 }
+2 -2
arch/x86/kernel/entry_32.S
··· 1082 1082 pushl $0 /* Pass NULL as regs pointer */ 1083 1083 movl 4*4(%esp), %eax 1084 1084 movl 0x4(%ebp), %edx 1085 - leal function_trace_op, %ecx 1085 + movl function_trace_op, %ecx 1086 1086 subl $MCOUNT_INSN_SIZE, %eax 1087 1087 1088 1088 .globl ftrace_call ··· 1140 1140 movl 12*4(%esp), %eax /* Load ip (1st parameter) */ 1141 1141 subl $MCOUNT_INSN_SIZE, %eax /* Adjust ip */ 1142 1142 movl 0x4(%ebp), %edx /* Load parent ip (2nd parameter) */ 1143 - leal function_trace_op, %ecx /* Save ftrace_pos in 3rd parameter */ 1143 + movl function_trace_op, %ecx /* Save ftrace_pos in 3rd parameter */ 1144 1144 pushl %esp /* Save pt_regs as 4th parameter */ 1145 1145 1146 1146 GLOBAL(ftrace_regs_call)
+1 -1
arch/x86/kernel/entry_64.S
··· 88 88 MCOUNT_SAVE_FRAME \skip 89 89 90 90 /* Load the ftrace_ops into the 3rd parameter */ 91 - leaq function_trace_op, %rdx 91 + movq function_trace_op(%rip), %rdx 92 92 93 93 /* Load ip into the first parameter */ 94 94 movq RIP(%rsp), %rdi