]>
Commit | Line | Data |
---|---|---|
93c5a571 GKH |
1 | From e93c17301ac55321fc18e0f8316e924e58a83c8c Mon Sep 17 00:00:00 2001 |
2 | From: Andy Lutomirski <luto@kernel.org> | |
3 | Date: Mon, 7 Aug 2017 19:43:13 -0700 | |
4 | Subject: x86/asm/64: Clear AC on NMI entries | |
5 | ||
6 | From: Andy Lutomirski <luto@kernel.org> | |
7 | ||
8 | commit e93c17301ac55321fc18e0f8316e924e58a83c8c upstream. | |
9 | ||
10 | This closes a hole in our SMAP implementation. | |
11 | ||
12 | This patch comes from grsecurity. Good catch! | |
13 | ||
14 | Signed-off-by: Andy Lutomirski <luto@kernel.org> | |
15 | Cc: Borislav Petkov <bp@alien8.de> | |
16 | Cc: Brian Gerst <brgerst@gmail.com> | |
17 | Cc: Denys Vlasenko <dvlasenk@redhat.com> | |
18 | Cc: H. Peter Anvin <hpa@zytor.com> | |
19 | Cc: Josh Poimboeuf <jpoimboe@redhat.com> | |
20 | Cc: Linus Torvalds <torvalds@linux-foundation.org> | |
21 | Cc: Peter Zijlstra <peterz@infradead.org> | |
22 | Cc: Thomas Gleixner <tglx@linutronix.de> | |
23 | Link: http://lkml.kernel.org/r/314cc9f294e8f14ed85485727556ad4f15bb1659.1502159503.git.luto@kernel.org | |
24 | Signed-off-by: Ingo Molnar <mingo@kernel.org> | |
25 | Signed-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 |