Received: by 10.223.176.5 with SMTP id f5csp2828663wra; Mon, 5 Feb 2018 10:32:02 -0800 (PST) X-Google-Smtp-Source: AH8x227P9fTR5inN5AfbXROamcTtM6U0TWY4CSCQqCHxRVduTVUgI/SDzo+aPaMYZZAptE0VbCPw X-Received: by 10.101.82.134 with SMTP id y6mr10208625pgp.101.1517855522463; Mon, 05 Feb 2018 10:32:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517855522; cv=none; d=google.com; s=arc-20160816; b=DZKcjN+P7ZMDbs/kPej4Rmv2q771LV0pHuS+m2E09eo6uHTvcIFs8MLy8xU07TQANF +vUKH0BWo07MEBX0kE2AQ8PAyIxhJEa6xdZK9Z1T2ex92XTJAlJLLUsba0d7bJDTk4wZ RhVKgSyRiyoqA5mts8q7WgCCqrAZIghX0HNIiFyxnOsgadh2rxMtwbglcyk3aaY+OHkL +eXKRsq+PP586Tcm9F0GCXL+YDZrbKbTTSaAa/R/r/MAEn10lxhSLW/eiMJYeLZ3hD6L ZAvlnJ3C2ox5+brV3MfB0RI6DmiSR3irq4oQt8uOEPbU30TdBzP6NzGP5GPENwbUovHi o1kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7FppFZJ0XjGzFzriq9QxexfeVVPzJIGqsVIHc60Ygvo=; b=oqZdenIpQfIgCmREyRT6Uidpv70dVGu+PjJIAQLWpKk4CUNW6QxvWXvYc4pvKiEQCs e/X7s+omtAzsKnAOiPwwvvrYQ0BVbWhofAR9VHbMnfevQriyPX2AcBlTxgVFpe+w1KaI 35vBffhc39SjrybU1hCWWyv7z0qLGQJvokiLscyVjr1Gd+UtixI7Ijl7S18U/appxiJw lDUgFpjhfrfdsxP5vlskiu/p2QiNJ1yWa+esNfa0dvDAl0ceuJQH3r75ATyPJNWK2ifh ZgMYb/6t9U6OGcdesH9C3IAYLQluZ1r8ipBaJ/hVolOUVGXUk8a7aZcwQvySOX1rLp9J NMww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14si179564pgd.207.2018.02.05.10.31.48; Mon, 05 Feb 2018 10:32:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753994AbeBESab (ORCPT + 99 others); Mon, 5 Feb 2018 13:30:31 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:52602 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753741AbeBESZW (ORCPT ); Mon, 5 Feb 2018 13:25:22 -0500 Received: from localhost (unknown [104.132.1.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C3F011010; Mon, 5 Feb 2018 18:25:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Linus Torvalds , Kernel Hardening Subject: [PATCH 4.15 30/60] x86/entry/64: Push extra regs right away Date: Mon, 5 Feb 2018 10:23:03 -0800 Message-Id: <20180205182215.184295718@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180205182213.902626065@linuxfoundation.org> References: <20180205182213.902626065@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Lutomirski luto@kernel.org commit d1f7732009e0549eedf8ea1db948dc37be77fd46 With the fast path removed there is no point in splitting the push of the normal and the extra register set. Just push the extra regs right away. [ tglx: Split out from 'x86/entry/64: Remove the SYSCALL64 fast path' ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Borislav Petkov Cc: Linus Torvalds Cc: Kernel Hardening Link: https://lkml.kernel.org/r/462dff8d4d64dfbfc851fbf3130641809d980ecd.1517164461.git.luto@kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/x86/entry/entry_64.S | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -236,13 +236,17 @@ GLOBAL(entry_SYSCALL_64_after_hwframe) pushq %r9 /* pt_regs->r9 */ pushq %r10 /* pt_regs->r10 */ pushq %r11 /* pt_regs->r11 */ - sub $(6*8), %rsp /* pt_regs->bp, bx, r12-15 not saved */ - UNWIND_HINT_REGS extra=0 + pushq %rbx /* pt_regs->rbx */ + pushq %rbp /* pt_regs->rbp */ + pushq %r12 /* pt_regs->r12 */ + pushq %r13 /* pt_regs->r13 */ + pushq %r14 /* pt_regs->r14 */ + pushq %r15 /* pt_regs->r15 */ + UNWIND_HINT_REGS TRACE_IRQS_OFF /* IRQs are off. */ - SAVE_EXTRA_REGS movq %rsp, %rdi call do_syscall_64 /* returns with IRQs disabled */