Received: by 10.223.176.5 with SMTP id f5csp3000932wra; Mon, 29 Jan 2018 07:23:56 -0800 (PST) X-Google-Smtp-Source: AH8x2275afc/XDJlTDfYymDro/W74NQgJb1rtEid8vYl/I1h8ZtGgUGRyq5Kwc0icEodcGfqnxpZ X-Received: by 10.98.181.14 with SMTP id y14mr27402793pfe.216.1517239435933; Mon, 29 Jan 2018 07:23:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517239435; cv=none; d=google.com; s=arc-20160816; b=d1eLrTgFnEoss0PtxO4fqJYg4NDtfC/FB5I329WxSo/MyaM93l99UuyXa69BstlD/c DgTfGx/y7n3IiqN+lfocmc+V/zdI6nrb5GCVVJOJeZDQ27+B+YOQpGccilNqKNrXqKgZ GKkOES0bEy6i2iw5dw0ZyGVAcIBeXIJraRWxwxMaSiOCcddleUy9vhdjbYd26y+H0rVa be1EYEXQEM5RwPVmWqbmPyAXa65W2zCdhd9cLEDjPTtsGL/dbIkXIVGa8lgEuooFPJrR n+SjVwiC0OZjl9EOM0FdM9rs3ZaBez81bmb+fZ4uozAMuZPLO53H5o00EZ8Zfus3Gb52 q33g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=NA3DFPfrTLMplX9KnqV7RRIyKh7GR6vA0ZNzIjYCiiQ=; b=E9/P8ayVkFUoVBzvql+LBuqSHVrLrLevE9TJyh7NcF46vkIkpUxuhPiHACGC0Rorn4 Wy1M9chS84d8IwK4ODT0a29ApNQfZUB46/m34QrUhpq2pQ3Kcx87r+wQOT07gQBmIZiP sHWvOII5RmAso4WKWip4iLsPtyFBEOCLC+yUbLu9pnmpa8mJlvT0I4+uGs1nc483fYoH aupCUCWU6ChxHsSHur2jJqWNMYvsvNXfDkiqkjqZH00yhsAO3LxiQI8CHXRNx4Hx3YVx wsCJDmbjisLcZcpsBoV6cb9uajhqj37nhh9YvolWYv1yA4K6ZvEP6/uhi0TGBWtUR8TH cAxQ== 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 v70si1610167pfa.405.2018.01.29.07.23.41; Mon, 29 Jan 2018 07:23:55 -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 S1752027AbeA2PXO convert rfc822-to-8bit (ORCPT + 99 others); Mon, 29 Jan 2018 10:23:14 -0500 Received: from smtp-out4.electric.net ([192.162.216.194]:53026 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbeA2PXL (ORCPT ); Mon, 29 Jan 2018 10:23:11 -0500 Received: from 1egBGi-0006CO-VR by out4a.electric.net with emc1-ok (Exim 4.87) (envelope-from ) id 1egBGu-00070K-UT; Mon, 29 Jan 2018 07:23:00 -0800 Received: by emcmailer; Mon, 29 Jan 2018 07:23:00 -0800 Received: from [156.67.243.126] (helo=AcuMS.aculab.com) by out4a.electric.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.87) (envelope-from ) id 1egBGi-0006CO-VR; Mon, 29 Jan 2018 07:22:48 -0800 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 29 Jan 2018 15:23:40 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 29 Jan 2018 15:23:39 +0000 From: David Laight To: 'Will Deacon' , Andy Lutomirski CC: Linus Torvalds , Al Viro , Alan Cox , "the arch/x86 maintainers" , LKML , "Greg Kroah-Hartman" , 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 Thread-Topic: [PATCH] x86/retpoline/entry: Disable the entire SYSCALL64 fast path with retpolines on Thread-Index: AQHTliQLiwNLQ1OW00eC2UTYOOjDo6OF/9fAgATbzsCAACHawA== Date: Mon, 29 Jan 2018 15:23:39 +0000 Message-ID: References: <1516976647.5438.6.camel@linux.intel.com> <20180126180722.GA13338@ZenIV.linux.org.uk> <20180129131942.GC25549@arm.com> In-Reply-To: <20180129131942.GC25549@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 X-Virus-Status: Scanned by VirusSMART (c) X-Virus-Status: Scanned by VirusSMART (s) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon > Sent: 29 January 2018 13:20 ... > Another issue with this style of macro definition exists on architectures > where the calling convention needs you to carry state around depending on > how you packed the previous parameters. For example, on 32-bit ARM, 64-bit > values are passed in adjacent pairs of registers but the low numbered > register needs to be even. This is what stopped me from trying to use > existing helpers such as syscall_get_arguments to unpack the pt_regs > and it generally means that anything that says "get me argument n" is going > to require constructing arguments 0..n-1 first. > > To do this properly I think we'll either need to pass back the size and > current register offset to the arch code, or just allow the thing to be > overridden per syscall (the case above isn't especially frequent). If you generate a structure from the argument list that might work 'by magic'. Certainly you can add explicit pads to any structure. David