lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 2 Nov 2017 03:51:57 -0700 From: tip-bot for Andy Lutomirski <tipbot@...or.com> To: linux-tip-commits@...r.kernel.org Cc: peterz@...radead.org, hpa@...or.com, tglx@...utronix.de, torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org, luto@...nel.org, brgerst@...il.com, mingo@...nel.org, bpetkov@...e.de, dave.hansen@...el.com Subject: [tip:x86/asm] x86/entry/64: Use POP instead of MOV to restore regs on NMI return Commit-ID: 471ee4832209e986029b9fabdaad57b1eecb856b Gitweb: https://git.kernel.org/tip/471ee4832209e986029b9fabdaad57b1eecb856b Author: Andy Lutomirski <luto@...nel.org> AuthorDate: Thu, 2 Nov 2017 00:59:05 -0700 Committer: Ingo Molnar <mingo@...nel.org> CommitDate: Thu, 2 Nov 2017 11:04:40 +0100 x86/entry/64: Use POP instead of MOV to restore regs on NMI return This gets rid of the last user of the old RESTORE_..._REGS infrastructure. Signed-off-by: Andy Lutomirski <luto@...nel.org> Cc: Borislav Petkov <bpetkov@...e.de> Cc: Brian Gerst <brgerst@...il.com> Cc: Dave Hansen <dave.hansen@...el.com> Cc: Linus Torvalds <torvalds@...ux-foundation.org> Cc: Peter Zijlstra <peterz@...radead.org> Cc: Thomas Gleixner <tglx@...utronix.de> Link: http://lkml.kernel.org/r/652a260f17a160789bc6a41d997f98249b73e2ab.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@...nel.org> --- arch/x86/entry/entry_64.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index b5a0ea6..5b2f0bc 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1559,11 +1559,14 @@ end_repeat_nmi: nmi_swapgs: SWAPGS_UNSAFE_STACK nmi_restore: - RESTORE_EXTRA_REGS - RESTORE_C_REGS + POP_EXTRA_REGS + POP_C_REGS - /* Point RSP at the "iret" frame. */ - REMOVE_PT_GPREGS_FROM_STACK 6*8 + /* + * Skip orig_ax and the "outermost" frame to point RSP at the "iret" + * at the "iret" frame. + */ + addq $6*8, %rsp /* * Clear "NMI executing". Set DF first so that we can easily
Powered by blists - more mailing lists