]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0094-x86-entry-64-Remove-the-RESTORE_._REGS-infrastructur.patch
revert buggy SCSI error handler commit
[pve-kernel.git] / patches / kernel / 0094-x86-entry-64-Remove-the-RESTORE_._REGS-infrastructur.patch
1 From 8837585aa116d1aa832e524442a1e9953d17a196 Mon Sep 17 00:00:00 2001
2 From: Andy Lutomirski <luto@kernel.org>
3 Date: Thu, 2 Nov 2017 00:59:06 -0700
4 Subject: [PATCH 094/242] x86/entry/64: Remove the RESTORE_..._REGS
5 infrastructure
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 CVE-2017-5754
11
12 All users of RESTORE_EXTRA_REGS, RESTORE_C_REGS and such, and
13 REMOVE_PT_GPREGS_FROM_STACK are gone. Delete the macros.
14
15 Signed-off-by: Andy Lutomirski <luto@kernel.org>
16 Cc: Borislav Petkov <bpetkov@suse.de>
17 Cc: Brian Gerst <brgerst@gmail.com>
18 Cc: Dave Hansen <dave.hansen@intel.com>
19 Cc: Linus Torvalds <torvalds@linux-foundation.org>
20 Cc: Peter Zijlstra <peterz@infradead.org>
21 Cc: Thomas Gleixner <tglx@linutronix.de>
22 Link: http://lkml.kernel.org/r/c32672f6e47c561893316d48e06c7656b1039a36.1509609304.git.luto@kernel.org
23 Signed-off-by: Ingo Molnar <mingo@kernel.org>
24 (cherry picked from commit c39858de696f0cc160a544455e8403d663d577e9)
25 Signed-off-by: Andy Whitcroft <apw@canonical.com>
26 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
27 (cherry picked from commit d248c62028c5467cd5a5ce06d344e3fb330da3ec)
28 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
29 ---
30 arch/x86/entry/calling.h | 52 ------------------------------------------------
31 1 file changed, 52 deletions(-)
32
33 diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
34 index 0b9dd8123701..1895a685d3dd 100644
35 --- a/arch/x86/entry/calling.h
36 +++ b/arch/x86/entry/calling.h
37 @@ -141,16 +141,6 @@ For 32-bit we have the following conventions - kernel is built with
38 UNWIND_HINT_REGS offset=\offset
39 .endm
40
41 - .macro RESTORE_EXTRA_REGS offset=0
42 - movq 0*8+\offset(%rsp), %r15
43 - movq 1*8+\offset(%rsp), %r14
44 - movq 2*8+\offset(%rsp), %r13
45 - movq 3*8+\offset(%rsp), %r12
46 - movq 4*8+\offset(%rsp), %rbp
47 - movq 5*8+\offset(%rsp), %rbx
48 - UNWIND_HINT_REGS offset=\offset extra=0
49 - .endm
50 -
51 .macro POP_EXTRA_REGS
52 popq %r15
53 popq %r14
54 @@ -172,48 +162,6 @@ For 32-bit we have the following conventions - kernel is built with
55 popq %rdi
56 .endm
57
58 - .macro RESTORE_C_REGS_HELPER rstor_rax=1, rstor_rcx=1, rstor_r11=1, rstor_r8910=1, rstor_rdx=1
59 - .if \rstor_r11
60 - movq 6*8(%rsp), %r11
61 - .endif
62 - .if \rstor_r8910
63 - movq 7*8(%rsp), %r10
64 - movq 8*8(%rsp), %r9
65 - movq 9*8(%rsp), %r8
66 - .endif
67 - .if \rstor_rax
68 - movq 10*8(%rsp), %rax
69 - .endif
70 - .if \rstor_rcx
71 - movq 11*8(%rsp), %rcx
72 - .endif
73 - .if \rstor_rdx
74 - movq 12*8(%rsp), %rdx
75 - .endif
76 - movq 13*8(%rsp), %rsi
77 - movq 14*8(%rsp), %rdi
78 - UNWIND_HINT_IRET_REGS offset=16*8
79 - .endm
80 - .macro RESTORE_C_REGS
81 - RESTORE_C_REGS_HELPER 1,1,1,1,1
82 - .endm
83 - .macro RESTORE_C_REGS_EXCEPT_RAX
84 - RESTORE_C_REGS_HELPER 0,1,1,1,1
85 - .endm
86 - .macro RESTORE_C_REGS_EXCEPT_RCX
87 - RESTORE_C_REGS_HELPER 1,0,1,1,1
88 - .endm
89 - .macro RESTORE_C_REGS_EXCEPT_R11
90 - RESTORE_C_REGS_HELPER 1,1,0,1,1
91 - .endm
92 - .macro RESTORE_C_REGS_EXCEPT_RCX_R11
93 - RESTORE_C_REGS_HELPER 1,0,0,1,1
94 - .endm
95 -
96 - .macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
97 - subq $-(15*8+\addskip), %rsp
98 - .endm
99 -
100 .macro icebp
101 .byte 0xf1
102 .endm
103 --
104 2.14.2
105