From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227/AaxU7lHpin6iSiaWKfXvugKSBErxEvEW6aF+hassTaX2tf7ftpbyjxUL3YoCLwN460R0 ARC-Seal: i=1; a=rsa-sha256; t=1517239391; cv=none; d=google.com; s=arc-20160816; b=cIxuTD36mDExWXIbRr4fQLiPbSgRuQuFXZIdezGllM03+JXuJVxz0v/6o2bu2Di5jR V+bvtVxL7O/7Df2krPL2x7ympc4jXsKEv2AjMKKkc4syo/qQfNy9+61hN0t4BOmNFakI JmCr1myMUqYng6mxjmfuY7pnJ/wNlaAuH/0PwPvR+roO7K/5YC7VncIyRrTueCuSACI2 QbeKo+NWii+NAp/J/5kKbK17no8KxZBQ5usaLVW8Sn4HdZ32Xf1Kz9KcqOHFfE6lmwVk im12VHl/lxqE8ZGdf0yhDaPhpIJznL9I/bn51G0APB5reU/2mLeIv9tfNdPe/GQahrK0 GywQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=k/abti8wdXJcFngnQ+tg70odt+v6hh9wrSeACdXyQko=; b=0SIChWHlblrO/ZjFkeypgdIAegVxGST6PeCNNBRbabvDTMDRA7UXKgAP/0MZus8Fj3 pMya4L6BHHBveEdeXbBghmzWqkc2+vNP34/J2IdHgBn/Qmc8sGmY0CqtdnpCj2TVMwzn xZaQZDjCgRgDvtTxPIxBmn5UBO4Rz8mDIXdleZsNe7M3hKjgDTTO/O4J8VF4BR7e4bns ZsGv+II1/SuG5z6p1iHJte6SBwmcy96TVnrGzXBPCqOiArYrzAWX5bzZg4ULMJSBOBo2 rx8b3LBPdDOl49ch8cUdnFD37HWYHhEos7iOh7CQ5TdQnTDF5AW1kmflWnagwCa3m1vE 1RjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david.laight@aculab.com designates 192.162.216.185 as permitted sender) smtp.mailfrom=David.Laight@aculab.com Authentication-Results: mx.google.com; spf=pass (google.com: domain of david.laight@aculab.com designates 192.162.216.185 as permitted sender) smtp.mailfrom=David.Laight@aculab.com 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: quoted-printable 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590316784671066673?= X-GMAIL-MSGID: =?utf-8?q?1590940812185635190?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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-bi= t > 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 goi= ng > to require constructing arguments 0..n-1 first. >=20 > 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 =09