]> git.itanic.dy.fi Git - linux-stable/commit
kaiser: x86: Fix NMI handling
authorJiri Kosina <jkosina@suse.cz>
Wed, 3 Jan 2018 14:20:04 +0000 (15:20 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 9 Jan 2018 00:35:20 +0000 (00:35 +0000)
commit8eb0a71f15bd4e5b798c3fbe2f9932a69318a437
tree40b53636a396ad8f820c1c8d1ca7a0aa02a8a998
parent6ea3e97f1db2adeb219fcdc451ab6ec85f6eb0ad
kaiser: x86: Fix NMI handling

On Mon, 4 Dec 2017, Hugh Dickins wrote:

> kaiser-3.18.72.tar

Hi Hugh,

this hunk from 0024-kaiser-merged-update.patch:

-       SWITCH_KERNEL_CR3_NO_STACK
+       /*
+        * percpu variables are mapped with user CR3, so no need
+        * to switch CR3 here.
+        */
        cld
        movq    %rsp, %rdx
        movq    PER_CPU_VAR(kernel_stack), %rsp

is problematic, as the patchset actually never user-maps kernel_stack
percpu variable, and therefore crashes on NMIs.

The patch below is needed to make NMIs work properly.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kernel/cpu/common.c