]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.45/x86-asm-64-clear-ac-on-nmi-entries.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.45 / x86-asm-64-clear-ac-on-nmi-entries.patch
CommitLineData
93c5a571
GKH
1From e93c17301ac55321fc18e0f8316e924e58a83c8c Mon Sep 17 00:00:00 2001
2From: Andy Lutomirski <luto@kernel.org>
3Date: Mon, 7 Aug 2017 19:43:13 -0700
4Subject: x86/asm/64: Clear AC on NMI entries
5
6From: Andy Lutomirski <luto@kernel.org>
7
8commit e93c17301ac55321fc18e0f8316e924e58a83c8c upstream.
9
10This closes a hole in our SMAP implementation.
11
12This patch comes from grsecurity. Good catch!
13
14Signed-off-by: Andy Lutomirski <luto@kernel.org>
15Cc: Borislav Petkov <bp@alien8.de>
16Cc: Brian Gerst <brgerst@gmail.com>
17Cc: Denys Vlasenko <dvlasenk@redhat.com>
18Cc: H. Peter Anvin <hpa@zytor.com>
19Cc: Josh Poimboeuf <jpoimboe@redhat.com>
20Cc: Linus Torvalds <torvalds@linux-foundation.org>
21Cc: Peter Zijlstra <peterz@infradead.org>
22Cc: Thomas Gleixner <tglx@linutronix.de>
23Link: http://lkml.kernel.org/r/314cc9f294e8f14ed85485727556ad4f15bb1659.1502159503.git.luto@kernel.org
24Signed-off-by: Ingo Molnar <mingo@kernel.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27---
28 arch/x86/entry/entry_64.S | 2 ++
29 1 file changed, 2 insertions(+)
30
31--- a/arch/x86/entry/entry_64.S
32+++ b/arch/x86/entry/entry_64.S
33@@ -1215,6 +1215,8 @@ ENTRY(nmi)
34 * other IST entries.
35 */
36
37+ ASM_CLAC
38+
39 /* Use %rdx as our temp variable throughout */
40 pushq %rdx
41