Received: by 10.223.176.46 with SMTP id f43csp2653930wra; Thu, 25 Jan 2018 13:06:17 -0800 (PST) X-Google-Smtp-Source: AH8x224ia8z+3MuzZTx06sc0xorPMCS/VXIp9a4Vvyyy34pZHmkAZBkYLFTonPX4DqXHYy6DIlm9 X-Received: by 10.98.131.200 with SMTP id h191mr17052128pfe.149.1516914377587; Thu, 25 Jan 2018 13:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516914377; cv=none; d=google.com; s=arc-20160816; b=eRj5SCI2GG82uJugwrvON/kjmG+qkeEbhePRfkfS2SwdA0O/uGCVxrvYB0QQ4RvSQa Wn2SDelfYL4PQrTKvGW7R+4+sOB0pAbN99+hP9UsZGCrYRABawQtSkcIKFoRYRQdIU+4 8Acj5yuU8IMtVE2J6bmC4BCCv3y8usu1HscNmO3YLen9Xhz6PkIV6PmpA31kH5oZ3Jp+ DttnCh8iaZ5DmCmDrrbKkY+B28jiGM3rLA/Zk/yuz1rzxPFQy+1BXlC2NBAjM1BIJuR+ xA21mNKPX9UO3DMbGreF5YCay83eWu0KZ9COrKK5yrlr+oEszX3ISXYrcRacb1JlpVZP 9/Sg== 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 :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=UtCW8eiHDqTO9nLN194NZIdt/W902/aWPRXS3cBGByc=; b=FuRHYq2l+aLCx1csv/Jqs8VHvX1PC/oBLS1o06GiSGnf7TY6jGePszeCh5jMcKrp9r MKqSvqe9HpAJWsYLlaxUlBthVQCBCJ5tlmboLTQXpm25V6PB1PHUOfhD8sZhHjzjpSN7 jYfH2Cdvlw+WypxjvrMJ6BiyTW/C0oorz5dOSsiSydjryItx8XIs2B1Bfts2c6HE+I2M hBlmWIiGuYvqT56x6Wp5BLvwyj7IDfFJyHGoqnbKiYYx7IrCcOaHJxh0N96QM1t5kA/q fXdJVoVaB1r7B6hnzxs9iCh3is2lp7AceHqUc7K94C/YRvdXn2PbOAUi09GjxZ/aywbZ ZYxg== 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 w3si1994003pgb.739.2018.01.25.13.05.58; Thu, 25 Jan 2018 13:06:17 -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 S1751404AbeAYVFK (ORCPT + 99 others); Thu, 25 Jan 2018 16:05:10 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:36116 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbeAYVFJ (ORCPT ); Thu, 25 Jan 2018 16:05:09 -0500 Received: from p4fea5f09.dip0.t-ipconnect.de ([79.234.95.9] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1eeof9-0006su-SU; Thu, 25 Jan 2018 22:02:24 +0100 Date: Thu, 25 Jan 2018 22:05:05 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: Linus Torvalds , the arch/x86 maintainers , LKML , Greg Kroah-Hartman , Alan Cox , Jann Horn , Samuel Neves , Dan Williams , Kernel Hardening , Borislav Petkov Subject: Re: [PATCH] x86/retpoline/entry: Disable the entire SYSCALL64 fast path with retpolines on In-Reply-To: Message-ID: References: <503224b776b9513885453756e44bab235221124e.1516644136.git.luto@kernel.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Jan 2018, Andy Lutomirski wrote: > On Thu, Jan 25, 2018 at 10:48 AM, Linus Torvalds > wrote: > > On Mon, Jan 22, 2018 at 10:55 AM, Linus Torvalds > > wrote: > >> > >> Honestly, I'd rather get rid of the fast-path entirely. Compared to > >> all the PTI mess, it's not even noticeable. > > > > So I looked at how that would be. > > > > Patch attached. Not really "tested", but I'm running the kernel with > > this patch now, and 'strace' etc works, and honestly, it seems very > > obvious. > > > > Also, code generation for 'do_syscall_64()' does not look horrible. In > > fact, it doesn't look all that much worse than the fast-path ever did. > > > > So the biggest impact of this is the extra register saves > > (SAVE_EXTRA_REGS) from setting up the full ptregs. And honestly, I > > hate how that stupid macro still uses "movq reg,off(%rsp)" instead of > > "pushq %reg". > > > > Considering the diffstat: > > > > 2 files changed, 2 insertions(+), 121 deletions(-) > > > > and how those 100+ lines are nasty assembly code, I do think we should > > just do it. > > Feel free to Acked-by: Andy Lutomirski that patch. > > Or I can grab it and send it to -tip. That would be nice, so we can route it through x86/pti which provides it for backporting cleanly. Thanks, tglx