Received: by 10.223.176.46 with SMTP id f43csp1054461wra; Fri, 26 Jan 2018 11:04:33 -0800 (PST) X-Google-Smtp-Source: AH8x224sB89u9YEyXjUdizXKt/rm8MSBLw2WXSMFuCEsAiDsSrDboLuK+tEFiInLUmHJuI9bFj4q X-Received: by 10.98.110.202 with SMTP id j193mr19959662pfc.19.1516993472911; Fri, 26 Jan 2018 11:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516993472; cv=none; d=google.com; s=arc-20160816; b=gkufsXraYeFSlKnB+EKvN+FjeqfRt329e7TOOjOu/N3mQIJNs8f2ewEynEKAA5iaGo tQZm3RAxAvAOfItH7qoAu3H3HciKgkwRVItAF35BbCEXQYh+Tz69xLe/6QLQXG7X5w/l vuzFZOWr8PEgjD2PkhV454j29WHLrGVA6pEsGpkJKYXeDg7KLZnHzLG8QJcmB+3YVsUC o6cxbTbqYfrn3FILjVZKGNG/m7ygKjgjJOtHIgB72tbaVwVJG2hNWNzo4Gn543+5Ri3N +suOTRCwc0NeZjgQ31i1PbqY7wpGbvMiIvhdW5qXXXVNE9NQRUUyTyhipIFwXis9Bzbe lYKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=oyUSj/oR23Jndo95du6Gv4R8tPukMuCkjRYWvBJirEQ=; b=sJIdSPfHJltk4ykxY8gmyCyBbCs7yPMLKRm1A6AaTa41gf0H/XDDwNmc/W4if9PCcq J2NHoGAUnQuL0K2T1sS72+OzPNwSlrYySBmpNpzwRuJBiZSiosDIdUpZHRp/cPU+2gRW ahbq+Vrdp1PtW1LQPqhgSoKD+XwmECJVK9xvlSKJj43R9VZCL9hxNxZOCU8mGrlW+eDi yv0/4zxeVGrRKKRUQVMrVW9u0FWUMfcRzKGJRBcTbYN5+U0wiaeNfgpqjX8O6uQ4KeWm q/VxBMasA8OH8AQDZElpbE/7XmQnhzYJ5JSbBMiug7OcjnIcxK+thvLMmQtoM2DZOH6b BcVA== 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 84si6753422pfp.230.2018.01.26.11.04.18; Fri, 26 Jan 2018 11:04:32 -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 S1752590AbeAZTDQ (ORCPT + 99 others); Fri, 26 Jan 2018 14:03:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:60470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488AbeAZTDP (ORCPT ); Fri, 26 Jan 2018 14:03:15 -0500 Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09339217C1 for ; Fri, 26 Jan 2018 19:03:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09339217C1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org Received: by mail-it0-f49.google.com with SMTP id n206so375613itg.1 for ; Fri, 26 Jan 2018 11:03:15 -0800 (PST) X-Gm-Message-State: AKwxytdvF5DNyePjil+fel2mqSDn7HofvDV3+VtL2PSqzktfGm+O0q7A NDPbYPiSXSNLbw+ROWUaj0q4VuM4hwVhI2YAkT2xUw== X-Received: by 10.36.214.9 with SMTP id o9mr820324itg.132.1516993394486; Fri, 26 Jan 2018 11:03:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.137.84 with HTTP; Fri, 26 Jan 2018 11:02:54 -0800 (PST) In-Reply-To: References: <1516976647.5438.6.camel@linux.intel.com> <20180126180722.GA13338@ZenIV.linux.org.uk> From: Andy Lutomirski Date: Fri, 26 Jan 2018 11:02:54 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/retpoline/entry: Disable the entire SYSCALL64 fast path with retpolines on To: Linus Torvalds Cc: Andy Lutomirski , Al Viro , Alan Cox , David Laight , "the arch/x86 maintainers" , LKML , Greg Kroah-Hartman , Jann Horn , Samuel Neves , Dan Williams , Kernel Hardening , Borislav Petkov 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 On Fri, Jan 26, 2018 at 10:54 AM, Linus Torvalds wrote: > On Fri, Jan 26, 2018 at 10:23 AM, Andy Lutomirski wrote: >> >> The issue is that doing it this way gives us, effectively: >> >> long sys_foo(int a, int b) >> { >> body here; >> } >> >> long SyS_foo(const struct pt_regs *regs) >> { >> return sys_foo(regs->di, regs->si); >> } >> >> whereas what we want is *static* long sys_foo(...). > > How about just marking 'sys_foo()' as being always_inline (but still > not static)? Because the case that _matters_ is that SyS_foo(), thing > when this is enabled. > > Sure, you'll get two copies of the code (one in SyS_foo(), the other > being the callable-from C 'sys_foo()' that is exported and almost > never used). But that seems a fairly small price to pay. We could > leave it for later to try to get rid of the unused copies entirely. > I could do that, but Josh Triplett will yell at me. Anyway, I'll fiddle with it. This isn't exactly high priority.