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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 305D4C433DB for ; Thu, 14 Jan 2021 18:39:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBD7B23B3E for ; Thu, 14 Jan 2021 18:39:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBD7B23B3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LRSrr2jMbqmRI9vgNZqtZusNibYB7LcGOR2j4MCAWZE=; b=w+LPU1a9dAXXdrCOD1Mg9iKE1 6xnbg5cEdpoARVCKB5g3nLbUwgMuBv3bRKvSg/i+Vp4JyZc1bIk8Q9DlA/0PZrRL7G5ldboxz3Yv1 D5GXpUxiwMG5T5KJOUVlOBrrFWryFvLwaDSuzkcjyNaXarpQEbobZjZnEo/LLunDrrUUFSwiiSKG9 nWyUDt32UatC7cvoaJNxZmSOPeuxjCHTigs76eyRAZGGrZhhKkcxTsyv5DhFYAY0avv9I7lm1alj2 h8Zzpp/uiU17WD+t54TJBxfhFkl8tEe+eP5LJxq/c5LCSsazrlp3/WmsR0A+i0j9phi2tYlINJAKQ XwrtGLS7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l07VB-00047D-TR; Thu, 14 Jan 2021 18:37:45 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l07V9-00046Z-E1 for linux-arm-kernel@lists.infradead.org; Thu, 14 Jan 2021 18:37:44 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A80423B1A; Thu, 14 Jan 2021 18:37:39 +0000 (UTC) Date: Thu, 14 Jan 2021 18:37:37 +0000 From: Catalin Marinas To: Marc Zyngier Subject: Re: [PATCH 0/3] arm64: cpufeature: Add filter function to control Message-ID: <20210114183737.GG16561@gaia> References: <1610152163-16554-1-git-send-email-sramana@codeaurora.org> <6dfdf691b5ed57df81c4c61422949af5@misterjones.org> <7b53c01dd5afcb29679c3a9cf72407a9@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7b53c01dd5afcb29679c3a9cf72407a9@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210114_133743_594693_55309C85 X-CRM114-Status: GOOD ( 29.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Srinivas Ramana , linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, pajay@qti.qualcomm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 14, 2021 at 08:20:52AM +0000, Marc Zyngier wrote: > On 2021-01-14 07:15, Srinivas Ramana wrote: > > On 1/11/2021 5:40 AM, Marc Zyngier wrote: > > > On 2021-01-09 00:29, Srinivas Ramana wrote: > > > > This patchset adds a control function for cpufeature framework > > > > so that the feature can be controlled at runtime. > > > > > > > > Defer PAC on boot core and use the filter function added to disable > > > > PAC from command line. This will help toggling the feature on systems > > > > that do not support PAC or where PAC needs to be disabled at runtime, > > > > without modifying the core kernel. [...] > > > I've been working for some time on a similar series to allow a feature > > > set to be disabled during the early boot phase, initially to prevent > > > booting a kernel with VHE, but the mechanism is generic enough to > > > deal with most architectural features. > > > > > > I took the liberty to lift your first patch and to add it to my > > > series[1], > > > further allowing PAuth to be disabled at boot time on top of BTI and > > > VHE. > > > > > > I'd appreciate your comments on this. > > > > Thanks for sending this series. It seems to be more flexible compared > > you what we did. > > Following your discussion on allowing EXACT ftr_reg values. > > > > Btw, do you have plan to add MTE in similar lines to control the > > feature? > > We may be needing this on some systems. > > I don't have any need for this at the moment, as my initial goal was > to enable a different boot flow for VHE. The BTI "support" was added > as a way to demonstrate the use of __read_sysreg_by_encoding(), and > your patches were a good opportunity to converge on a single solution. > > But if you write the patches that do that, I can add them to the series, > and Catalin/Will can decide whether they want to take them. For MTE it's trickier (probably similar to VHE) as we do the setup early in proc.S before we hit the cpufeature infrastructure. So far we haven't agreed on disabling MTE means - is it disabled completely (no Normal Tagged memory type) or we just need to disable tag checking? The former is required if we expect buggy hardware (SoC-level, not necessarily CPU). The latter, at least for the kernel, is already handled via the kasan.mode cmdline. For user, we can disable the tagged address ABI via sysctl (or kernel cmdline) and it indirectly disabled MTE since the C library detects this. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel