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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D242CC54E58 for ; Mon, 11 Mar 2024 16:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=NBcxG0ICGYGG4FnFHAw2Uc9CQG3SXfISA0KriKM5Id4=; b=noCItyC9dlnAJZ h8QcAoOEvTo3GL6gm6XONGUIVxOZ6YdUVKpNSHjOjFQyEkpUiqaAq5PWUm3bNOe34GtwsmPSRfVCI 0EsHYzJDsGrcfgD1NlAIlq6lHuB/KMGjeasGtZVUTnVX0DU+5TW3hHLmUONeCGJZ+nexB1OFAN24z Rp6Gtz65F23vMZ+ScIqUZulWlcDWxMN8Jric0EsvtelZwKF1qT14ATFGGV/YSWABRwApsLAitWQcI lrxbscBdNZ3yAx43vCIThDL6VUTJwNLvjkhyJnUye4WmUF8DdEUXGLqKTxaF7Ivatrb8+wF0N/FWq hgroacFfHt15bAsTxwBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rji7B-00000002CD3-0Oz0; Mon, 11 Mar 2024 16:03:01 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rji77-00000002CB9-0aQW for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 16:02:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GsaoEzrnF65F/jq//CFfMKCZCdqnwMliOhQvvDSmRxw=; b=vbxXYPeftsodHiDKsyuVSxd2I0 KP97rBZPkk1ZPz4lUpgag2BBRW1aDert6ec3Hw94coUdl2ADjD4+rZzSx2k2U9UOziF/IqozKntTA V/kiDMxurB/6z8M550+9lC3qFhDSSvxhgN4autVApeynSKcTRBpG1YC1u/H5hDHW8BznfAJrTFC0o ZZnDL/LQnnW2Ns/8BErJGMMpynj8PRX10BmYqzuhSJcExxZBeh9BD4eFKv24RoKCniRNrP1dtwDdg CMDNJWy47JUS7lfBCr40SdWqG/YM0zR3mYFO0PbOKWEcpDs7lH5t9jHVzdbHO8ByTclHbdDciaykM eMSovhtA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:43324) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rji6w-0005Pj-2U; Mon, 11 Mar 2024 16:02:46 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rji6u-0002ih-OM; Mon, 11 Mar 2024 16:02:44 +0000 Date: Mon, 11 Mar 2024 16:02:44 +0000 From: "Russell King (Oracle)" To: Linus Walleij Cc: Ard Biesheuvel , Arnd Bergmann , Stefan Wahren , Kees Cook , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, Catalin Marinas Subject: Re: [PATCH v2 3/4] ARM: Reduce the number of #ifdef CONFIG_CPU_SW_DOMAIN_PAN Message-ID: References: <20240221-arm32-lpae-pan-v2-0-991096bba5d8@linaro.org> <20240221-arm32-lpae-pan-v2-3-991096bba5d8@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240221-arm32-lpae-pan-v2-3-991096bba5d8@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240311_090257_200749_9CAE2FD3 X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Wed, Feb 21, 2024 at 12:04:02AM +0100, Linus Walleij wrote: > @@ -24,9 +24,10 @@ > * perform such accesses (eg, via list poison values) which could then > * be exploited for priviledge escalation. > */ > +#if defined(CONFIG_CPU_SW_DOMAIN_PAN) > + > static __always_inline unsigned int uaccess_save_and_enable(void) > { > -#ifdef CONFIG_CPU_SW_DOMAIN_PAN This is an interesting way to reduce the #ifdef count... why switch it from #ifdef to #if defined ? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel