Received: by 10.223.176.46 with SMTP id f43csp855108wra; Fri, 26 Jan 2018 07:58:49 -0800 (PST) X-Google-Smtp-Source: AH8x227uFHEtwWfXyy+UUx/SCo+sUhodn0BW09C70Ir7DfzJflmhlTh1/XZumbt3UD1JBtf0KP50 X-Received: by 2002:a17:902:8c86:: with SMTP id t6-v6mr14961044plo.400.1516982329419; Fri, 26 Jan 2018 07:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516982329; cv=none; d=google.com; s=arc-20160816; b=dmLJi0MAIH27nGd0hjWCCSLCrrUziMeis60CCbxU6jrl+rcEw4w4O/+wY7engrxPDK hK6Iq4CVvoRzkNCgQXyfLuQ7LqT4pJeU7JMfFmrMFxNy+Pyws2klHBxMDDoEw3x86kjO eApsY9/BFEOytFaS0y38jHNq29DdVHjEdxb/uOKoKwtJ+tJGm3o7uddRDzrc70rF3TKQ Xmi2FIZKlz2GbjpzqB7Utw21RuU2IqT+hcnYFcAqBajC8S6QlqVR1eR6FRaPN5wu0Dtz qLXOdBMh5phW+RPVTXSVlPqG1M5vLzopFOjtuLB2aIHliBOSKTxRbYxIEXuIVW0NxPIu CNLg== 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=voFWp10v/WJmASBdFNchRBOR604CRHT51EGzr4mBgow=; b=Rj/U/0HOw/SSNQHf0gWJEnnIobIv6NQqtmqllMGW837s0/sK/Px/zz0i2U17M6iZct aS5L7OjhpaDCkcuXO3bzx+Fyc0rCEOp+ctT1hW8YHIp1/yU5dC3sqXZZ9x5ma794eNHa HHHZZWgaCGP6THUEaFee389ABJ6McceAf1K0PpCdDuFES/2/waFTCsCxiw19V4puv3T5 mIxB88NXdSiGOLTqq2CFYOcpJmhitRovc3HpuSYwaHKbzHwdfoGkLqq80W2uemKZapon pmbvGiH87lJKLqGCg4NDz/g5bJsDEWkpXuY2UYhlgn0zhfPU0XE04CNSE5rsOUodRCxt 221g== 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 c81si6505548pfe.306.2018.01.26.07.58.35; Fri, 26 Jan 2018 07:58:49 -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 S1753850AbeAZP57 (ORCPT + 99 others); Fri, 26 Jan 2018 10:57:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:36428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753787AbeAZP55 (ORCPT ); Fri, 26 Jan 2018 10:57:57 -0500 Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) (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 AF8CD2256B for ; Fri, 26 Jan 2018 15:57:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF8CD2256B 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-io0-f181.google.com with SMTP id 25so883189ioj.9 for ; Fri, 26 Jan 2018 07:57:56 -0800 (PST) X-Gm-Message-State: AKwxyteTEg4Q8IhjSbYnuKFUs02uRFFh11vi0ywNPeXdZOXweZwyz9Oj 2G6Nvt4AqgwWtLLl7rxVJjnZW2XW6X2R+AcZ5z6JjA== X-Received: by 10.107.170.132 with SMTP id g4mr15528535ioj.183.1516982276055; Fri, 26 Jan 2018 07:57:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.137.84 with HTTP; Fri, 26 Jan 2018 07:57:35 -0800 (PST) In-Reply-To: <1516976647.5438.6.camel@linux.intel.com> References: <503224b776b9513885453756e44bab235221124e.1516644136.git.luto@kernel.org> <1516976647.5438.6.camel@linux.intel.com> From: Andy Lutomirski Date: Fri, 26 Jan 2018 07:57:35 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/retpoline/entry: Disable the entire SYSCALL64 fast path with retpolines on To: Alan Cox Cc: David Laight , Andy Lutomirski , Linus Torvalds , "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 6:24 AM, Alan Cox wrote: >> NetBSD (and the other BSD?) defines a structure for the arguments to >> each syscall. > > Goes back to v7 or so but they put the syscall arguments into the uarea > so that no pointers were needed (uarea being a per process mapping at a > fixed address) in order to also reduce pointer dereferencing costs (not > that those matter much on modern processors) > I gave the rearrangement like this a try yesterday and it's a bit of a mess. Part of the problem is that there are a bunch of pieces of code that expect sys_xyz() to be actual callable functions. The best way to deal with that is probably to switch to calling normal functions.