From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227SdZdwKRbcMwUpltrd/RdHn2nr7ukLqG3Psh4gke8s8QylyaK5KCACJCfUXtM6QHguiN6K ARC-Seal: i=1; a=rsa-sha256; t=1516914307; cv=none; d=google.com; s=arc-20160816; b=YfXv8knLFgly9N6D9xxYvIg9K3eBXAqIOCFiHtiV7a2NrOzQ4/kiCheN074Ii0aYlv 9XwJTYtAodJc1CSFPTcvigEW71abIHB0EjNcKbOCdVMZ9H6raIM1LZbT5vlEB3JV00NG SHI572FytdSIv1yj47ANt+PFuOsWjKG4NHd8QHG4VvoGjJW9K6rE/AoKg4tDV5yrJMF0 35mVXp7ZGeON+Tx5vSSkFKPKP2whE2kLmH7Occ7SLCORdY/WVFcbRxxB3J4FU4J/mxUL VkQiGuGh43LDCniBLYsuipRdxvsNnhGVmFnUFkUXigIgr3lS6rRPuabzTjxIDdPq0pKn KnUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:arc-authentication-results; bh=UtCW8eiHDqTO9nLN194NZIdt/W902/aWPRXS3cBGByc=; b=Nkjuz9HaO77n8BH8zHufEWuKucQT8Th7Gqnv2aa0vEqQagn3A5R+nd4IEil7BlsdUo PwwLucD6TdMOPQ5AFpi1yeVwrqG0BGJkyXC6ZZ2aAtoCj7S8AUFNdM6ir0QczJpTGPaX RPpSJYpa3rAXCUwiCPBVHHLBiJxXK6skXSZOBKV4Do6HC2WUyxtQsF19QdyJuo1/pG9n Qwrd0j7B7PmAyb3AnkvFxvpesxEs95WaUveZCp1b5Pam2GwCsmRc7VGNbA4i1fNFmYDY Ld3K8BAcfTFTkd+BGZ9kXylTb70qlQQkbFloXGXJk9rCFZKerS8Td6Ohx2gDO2U8/npG tl2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of tglx@linutronix.de designates 146.0.238.70 as permitted sender) smtp.mailfrom=tglx@linutronix.de Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of tglx@linutronix.de designates 146.0.238.70 as permitted sender) smtp.mailfrom=tglx@linutronix.de 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590316784671066673?= X-GMAIL-MSGID: =?utf-8?q?1590599937285781041?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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