Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7464048rwb; Tue, 15 Nov 2022 12:43:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf5x+QqylyS1QoAKQPCTMC7jrLIyNixJYxj3X6ntaUp71SJhe9E1ovX0Y2NMBPfsHq20dtCo X-Received: by 2002:a17:906:6a18:b0:7a5:e944:9e48 with SMTP id qw24-20020a1709066a1800b007a5e9449e48mr16265080ejc.109.1668544988595; Tue, 15 Nov 2022 12:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668544988; cv=none; d=google.com; s=arc-20160816; b=Pd2UqY+oS7ZJX6JKn1/GtzjCi3E8H+eHXQ3CO3FzXvWM6x7blj+2SFizoEXOAIR0nH jNY3FJzWsVxrqeuYYSG+q7J65LC0AjtF2+wjgPlmRYohkxRVSwBYKV0KJtWy1qe0LdLr +05mrvK/tGdQdn7dQTZuVWyV+8XK8lftjfpAYfXMTu90yPDEDLJR6FEjF7REkIFKXcEN kqajephi4UW6d3IRRAEI2PSxswOl6BHjjqt99WvsF49F2FhBQtITcp9diSRAaRW9JAr5 cU1ETRWIVxQtkeD+BcRzoyEGlgNN6SCFtXrhSxSrMQIb4+Ntll43bcWPl0oClwrDR9Qm qygQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QR6n+vA00Dlok+NeJO2qYZC04d5g39W8pXVCw+YOkug=; b=gV9t/TZK7Je3to2xqxQa9GMn96Z46KJbUFfeOqVGK8P2Ug7tkMM04FIFMpjARs/Op2 oFtC5eimBDYRFVgaRsGaiayQqQ9qHgrbeKnplxsl6aIUCORty/Q4x3jPLfQtUoZ211Af kNmIZ1XkA5sRdyugwYv6MVUQL4f6PPwog1wX885ByV2J4Jf1xsi9j/d1g7KHj+l+Xz0R UFjQOlPu6IrkSOS0JzENEy8y1WAkIoMcT+cKeg2ZO/23AIpY2ccbLvv+BqFC/uKiUGGB AV6CSkZShWefl45a36VfSpYql3EwN8fTFI0FURLUN9Cu0o71YfkL97xk8tl8lMzAEmEO eFBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=hj+ppKnT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id by12-20020a0564021b0c00b00461cd4b5a01si10401085edb.419.2022.11.15.12.42.45; Tue, 15 Nov 2022 12:43:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=hj+ppKnT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbiKOTe3 (ORCPT + 90 others); Tue, 15 Nov 2022 14:34:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbiKOTeS (ORCPT ); Tue, 15 Nov 2022 14:34:18 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF36A198; Tue, 15 Nov 2022 11:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QR6n+vA00Dlok+NeJO2qYZC04d5g39W8pXVCw+YOkug=; b=hj+ppKnTzlA4/rLNRkRsmj84g4 rBmfHU+K7gBrv/4esPsOcYckFekm8hkTs4ZHZM5NpqAjEn7RIrg49OmU+LB0LIfcA4AucT0Ou+ii1 nMMQz4/w4wOPgdPsEltcsGtDqThJ34kPGFUn1EO2uDNFND4UNrbKICVVFFBRLCfOKGYnHZi89GvNY opHKCutTO9hp/95pRKWMvcWwPSezcDL9qCKql1mT1tJvX6T+VR9xdZq4nyHQycQVBfhaIRlu70MFr qu7zWNcyr+Ocl8GMz+ZTB+68H4O/9FThRnNV9m5GMT7zMbJrUb4nD29HrmtGT2YqfHWRNVXCaRwpZ K83+u31A==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ov1gX-0015JT-1w; Tue, 15 Nov 2022 19:33:29 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 904E0300422; Tue, 15 Nov 2022 13:26:23 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 76E4D2C368970; Tue, 15 Nov 2022 13:26:23 +0100 (CET) Date: Tue, 15 Nov 2022 13:26:23 +0100 From: Peter Zijlstra To: Rick Edgecombe Cc: x86@kernel.org, "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , 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 , Randy Dunlap , "Ravi V . Shankar" , Weijiang Yang , "Kirill A . Shutemov" , John Allen , kcc@google.com, eranian@google.com, rppt@kernel.org, jamorris@linux.microsoft.com, dethoma@microsoft.com, akpm@linux-foundation.org Subject: Re: [PATCH v3 24/37] x86: Introduce userspace API for CET enabling Message-ID: References: <20221104223604.29615-1-rick.p.edgecombe@intel.com> <20221104223604.29615-25-rick.p.edgecombe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221104223604.29615-25-rick.p.edgecombe@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 04, 2022 at 03:35:51PM -0700, Rick Edgecombe wrote: > From: "Kirill A. Shutemov" > > Add three new arch_prctl() handles: > > - ARCH_CET_ENABLE/DISABLE enables or disables the specified > feature. Returns 0 on success or an error. > > - ARCH_CET_LOCK prevents future disabling or enabling of the > specified feature. Returns 0 on success or an error > > The features are handled per-thread and inherited over fork(2)/clone(2), > but reset on exec(). > > This is preparation patch. It does not implement any features. Urgh... so much for sharing with other architectures I suppose :/ The ARM64 BTI thing is very similar to IBT (except I think their approach to the legacy bitmap is much saner). Given that IBT isn't supported and needs the whole legacy bitmap mess, do we really want to call this CET ? Why not just make a Shadow Stack API and tackle IBT independently.