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 66FCFCDB47E for ; Fri, 13 Oct 2023 18:05:28 +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=VDm3XImBK+2KlsPgdVPu9yR20zkC5iWvBUfphx1jCfM=; b=lV1DasMlOpZxoF Qxf/KhsT3GoamRe3+Hm+BX6nIKTt1suykF1UZXKsjeN0/T/FlMr18jzyi4AQv7joRffFNk7sEXps5 edtVy6SqM4UHI/58nJc3AoP8FSGQzWmlKN34oE1h9o53PejxTgvjN+TQKc/FEspFd8X13CgPgv58q /u5XE3A9IgzrkiHhNGS7isYIovbPP+V5LVZI5DvnXbNjNtJEdpsqel3LMEoncDmM0i4Sr2H9tnbb5 wSNjVitvi1ELsi2pQDVZCfh0vNEYgBLagcrjvas4Ix0d3/tuap1gthJMfDQQIwaIK4vU1oFvP3Fao pbgvjVR+gDZJ7fLcQj3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrMX3-0041TL-1x; Fri, 13 Oct 2023 18:05:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qrMX1-0041Si-2e for linux-arm-kernel@lists.infradead.org; Fri, 13 Oct 2023 18:05:05 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E8AF6621CB; Fri, 13 Oct 2023 18:05:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 953A0C433C9; Fri, 13 Oct 2023 18:04:59 +0000 (UTC) Date: Fri, 13 Oct 2023 19:04:57 +0100 From: Catalin Marinas To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org, bertrand.marquis@arm.com, boris.ostrovsky@oracle.com, broonie@kernel.org, daniel.lezcano@linaro.org, james.morse@arm.com, jgross@suse.com, kristina.martsenko@arm.com, maz@kernel.org, oliver.upton@linux.dev, pcc@google.com, sstabellini@kernel.org, suzuki.poulose@arm.com, tglx@linutronix.de, vladimir.murzin@arm.com, will@kernel.org Subject: Re: [PATCH v3 33/38] arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_1742098 Message-ID: References: <20231010103139.3113421-1-mark.rutland@arm.com> <20231010103139.3113421-34-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231013_110503_922521_DA2402B3 X-CRM114-Status: GOOD ( 17.93 ) 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 Fri, Oct 13, 2023 at 11:53:53AM +0100, Mark Rutland wrote: > On Tue, Oct 10, 2023 at 11:31:34AM +0100, Mark Rutland wrote: > > static void elf_hwcap_fixup(void) > > { > > -#ifdef CONFIG_ARM64_ERRATUM_1742098 > > - if (cpus_have_const_cap(ARM64_WORKAROUND_1742098)) > > + if (cpus_have_cap(ARM64_WORKAROUND_1742098)) > > compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES; > > -#endif /* ARM64_ERRATUM_1742098 */ > > } > > The kbuild test robot pointed out that this is broken for CONFIG_COMPAT=n, > since compat_elf_hwcap2 is only defined when CONFIG_COMPAT=y. As > CONFIG_ARM64_ERRATUM_1742098 depends on CONFIG_COMPAT, this worked prior to this patch. > > I've changed that locally to: > > | static void elf_hwcap_fixup(void) > | { > | #ifdef CONFIG_COMPAT > | if (cpus_have_cap(ARM64_WORKAROUND_1742098)) > | compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES; > | #endif /* CONFIG_COMPAT */ > | } > > ... since the ifdeffery is protecting the use of 'compat_elf_hwcap2', and the > cpucap is now elided by virtue of cpucap_is_possible(). > > Catalin, aside from the minor fixup above, are you happy to pick this for v6.7? > > I can post a v4 with that change (and the commit message updated accordingly). I can pick it up and fold the above in. Not sure what you want to update the commit message to (just mention the need for #ifdef CONFIG_COMPAT?) -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel