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 907A3C433F5 for ; Wed, 13 Apr 2022 17:07:06 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4c4/5NVTnCBQ2LBbfbxdUbONunF7AIUp9UMez1zInGw=; b=YAZwxvv+Gobzer brquLW5xgRlplOoQH9t0zS11oM4SOff+6Hr39ieOI2ND1BJWFAEq7F7OAx5Op/5sOCHk9dTSkBS8Q PWlgUsaDIQNieYsFfBBp47xN4iuXAQGYAnQ9l5ULYNlAD3VtGk/Nr7uOb9Ip0BL3IciCAx/En1fE8 nmvXsNrYqitlJ+8rWVKUtSCUAQRRmGjdry0GhyZKod56OiNM4tuy7f6pdcnofVTSEFDli2HWv+ATZ yorbSVMBTJ24llqSG2IhWm80lksnYTAgF7mfoFU7QkOqbew8YcbxqBWOSuhQlXes+6XrDX2PDb7wp tQyTINnwWlc3u2UgjKmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1negRN-001sfF-TG; Wed, 13 Apr 2022 17:06:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1negRK-001scn-39 for linux-arm-kernel@lists.infradead.org; Wed, 13 Apr 2022 17:05:59 +0000 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 D122A1576; Wed, 13 Apr 2022 10:05:54 -0700 (PDT) Received: from eglon.cambridge.arm.com (eglon.cambridge.arm.com [10.1.196.218]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 13F573F73B; Wed, 13 Apr 2022 10:05:53 -0700 (PDT) From: James Morse To: linux-arm-kernel@lists.infradead.org Cc: Russell King , Ard Biesheuvel , Catalin Marinas , Will Deacon Subject: [PATCH v2 0/2] ARM/arm64: errata: Remove AES hwcap for 32bit tasks on A57/A72 Date: Wed, 13 Apr 2022 18:05:43 +0100 Message-Id: <20220413170545.3042558-1-james.morse@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_100558_212772_152B2C87 X-CRM114-Status: GOOD ( 11.67 ) 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 Hello, These patches remove the AES HWCAP on A57 and A72 for aarch32 user-space processes due to erratum #1742098 and #1655431. An interrupt between two instructions will cause these parts to get the wrong result. These extensions are optional, so software should have a fallback implementation. The 32bit patch is new for v2, as Ard points out the behaviour should be the same here. Operating on the HWCAP bitmap directly avoids affecting KVM, which was the problem with v1. But it does mean HWCAP_PMULL is still visible to aarch32 processes. This isn't affected by the erratum, but is detected from the same field in the ID register. PMULL is value '2', AES is value '1'. User-space would be crazy to let PMULL imply AES, right ... There is no dependency between the two patches. [v1] https://lore.kernel.org/linux-arm-kernel/20220127122914.1585008-1-james.morse@arm.com/ [A57] https://developer.arm.com/documentation/epm049219/2300 #1742098 [A72 https://developer.arm.com/documentation/epm012079/11 #1655431 Thanks, James Morse (2): arm64: errata: Remove AES hwcap for COMPAT tasks ARM: Remove AES hwcap for parts affected by errata Documentation/arm64/silicon-errata.rst | 4 ++++ arch/arm/kernel/setup.c | 9 +++++++++ arch/arm64/Kconfig | 16 ++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 16 ++++++++++++++++ arch/arm64/kernel/cpufeature.c | 11 ++++++++++- arch/arm64/tools/cpucaps | 1 + 6 files changed, 56 insertions(+), 1 deletion(-) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel