From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EAA9C433E1 for ; Wed, 26 Aug 2020 16:46:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 590072074A for ; Wed, 26 Aug 2020 16:46:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 590072074A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E86786B0003; Wed, 26 Aug 2020 12:46:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E35E46B000E; Wed, 26 Aug 2020 12:46:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D4C648D0001; Wed, 26 Aug 2020 12:46:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0125.hostedemail.com [216.40.44.125]) by kanga.kvack.org (Postfix) with ESMTP id C05E56B0003 for ; Wed, 26 Aug 2020 12:46:13 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E17458248D51 for ; Wed, 26 Aug 2020 16:46:12 +0000 (UTC) X-FDA: 77193297384.15.men90_2f1817627066 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id A78C91814B0C9 for ; Wed, 26 Aug 2020 16:46:12 +0000 (UTC) X-HE-Tag: men90_2f1817627066 X-Filterd-Recvd-Size: 3859 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 16:46:11 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F0B84101E; Wed, 26 Aug 2020 09:46:10 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3E7093F68F; Wed, 26 Aug 2020 09:46:07 -0700 (PDT) Date: Wed, 26 Aug 2020 17:46:05 +0100 From: Dave Martin To: "Yu, Yu-cheng" Cc: Dave Hansen , Andy Lutomirski , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Weijiang Yang Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack Message-ID: <20200826164604.GW6642@arm.com> References: <20200825002540.3351-1-yu-cheng.yu@intel.com> <20200825002540.3351-26-yu-cheng.yu@intel.com> <2d253891-9393-44d0-35e0-4b9a2da23cec@intel.com> <086c73d8-9b06-f074-e315-9964eb666db9@intel.com> <73c2211f-8811-2d9f-1930-1c5035e6129c@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Rspamd-Queue-Id: A78C91814B0C9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Aug 25, 2020 at 04:34:27PM -0700, Yu, Yu-cheng wrote: > On 8/25/2020 4:20 PM, Dave Hansen wrote: > >On 8/25/20 2:04 PM, Yu, Yu-cheng wrote: > >>>>I think this is more arch-specific.=A0 Even if it becomes a new sys= call, > >>>>we still need to pass the same parameters. > >>> > >>>Right, but without the copying in and out of memory. > >>> > >>Linux-api is already on the Cc list.=A0 Do we need to add more people= to > >>get some agreements for the syscall? > >What kind of agreement are you looking for? I'd suggest just coding i= t > >up and posting the patches. Adding syscalls really is really pretty > >straightforward and isn't much code at all. > > >=20 > Sure, I will do that. Alternatively, would a regular prctl() work here? arch_prctl() feels like a historical weirdness for x86 -- other arches all seem to be using regular prctl(), which allows for 4 args. I don't know the history behind the difference here. (Since prctl() and arch_prctl() use non-clashing command numbers, I had wondered whether it would be worth just merging the x86 calls in with the rest and making the two calls aliases. That's one for later, though...) Cheers ---Dave