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 43560C433F5 for ; Wed, 20 Apr 2022 10:16:45 +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=eGQY4TaPtRyY3pZ9J4StqNLi5Wk/RU79l7xCvxGJheU=; b=hxFtLhc/InJPC+ SlSuvo/QYM+cKVOT4qffCZ8aGeOGbXCYCBj3tNS0rJwXM9ulyiiOGUtreMT/xH+UDcjWEV9jBXTwZ XknqPcfVbooxOBwZOChSih4pV7Qe8c1qaRL1D8ViUHK0eYSVKgSXK+YFw9N3aR7vHs68FWT9Ei9dR 9+XDwezs9eAylcerm6OvegaBUOSfXuJC+o63BZdMUEA8GgsZJXexgSZ8JyQPoN5n7vEFNsLtD0RFg UY4RlUemHX1I19vrK/F7pjKyBblXCofHmLLssXBRS182a1yDdcYz18CsNM12Otk0vI3LdY2Z7NpjS tTZvz3G4p4Ha6Nen9rKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh7Mz-008V2L-IA; Wed, 20 Apr 2022 10:15:33 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh7Mw-008V0y-A3 for linux-arm-kernel@lists.infradead.org; Wed, 20 Apr 2022 10:15:31 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 81B2261755; Wed, 20 Apr 2022 10:15:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9ED45C385A0; Wed, 20 Apr 2022 10:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650449728; bh=icRJrApZiG/oU89tKxwaOCBlVnRaEpmSPmfNXS51b9U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IXU2qxDGcP+7JxSvxd3CK7IQWNOYQ/DEp5LUsuoZAPYovsFAUVNhYxVkob07dSTAb CTQ58KAPrcCRlO9t8XyscTtgrCHkgDYHXbPQgjS/r3Iqu+CZsyIga0Zwx9pXtthPuy bXFd5YzkF8Q0/z4bsoRWdyz+6nCwfncgEb8k5w6Mhh7NdQ1r4LyRipy2K6c0u373J2 H0xv//2TOk+OhHNbpa4Q49vfpLS0RubB2hn1qdyCS0K0O3pFXFYFKuyTBcSqkgs41D HjY6DTZR4MyxN7hV9UtAPk28C2UGa6AiIpqi68NNQ7bAccvZCzQd0tEbZhj8k0nDbT /FpkZkfpsaD0Q== Date: Wed, 20 Apr 2022 11:15:23 +0100 From: Will Deacon To: James Morse Cc: linux-arm-kernel@lists.infradead.org, Russell King , Ard Biesheuvel , Catalin Marinas Subject: Re: [PATCH v2 0/2] ARM/arm64: errata: Remove AES hwcap for 32bit tasks on A57/A72 Message-ID: <20220420101523.GA7286@willie-the-truck> References: <20220413170545.3042558-1-james.morse@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220413170545.3042558-1-james.morse@arm.com> 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-20220420_031530_423000_4FC1D329 X-CRM114-Status: GOOD ( 19.52 ) 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, Apr 13, 2022 at 06:05:43PM +0100, James Morse wrote: > 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 ... That seems like a completely sensible thing for userspace to do :/ The Arm ARM states: AES, bits [7:4] Indicates support for AES instructions in AArch64 state. Defined values are: 0b0000 No AES instructions implemented. 0b0001 AESE, AESD, AESMC, and AESIMC instructions implemented. 0b0010 As for 0b0001 , plus PMULL/PMULL2 instructions operating on 64-bit data quantities. So PMULL is defined to include AES. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel