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 E86C2C433EF for ; Thu, 27 Jan 2022 23:33:00 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dE4iuFYksaK2eYwdi1xJbKV/n/f/tpSCTBSslo4MvVU=; b=whGdDJsVJUwSDq zNBYloJQlrVAghJj37XHCgZbqPOhqOZxyWbE0mCV65OFkDRe9fnvP49oPg3TGI5FVCvd1pbn+Tui1 8kdNhp5WtOjKFvF3GYm4c5zLmwF8/NGFnEsHlY0dWGhYN8bQPgBKYN3DhSi9pqosw9LSoixDQWNIP yelAka5GLJPjZs36F2F6e5aV2qbSo3PQk8oPV5nVD/ILniHjNxhNaVj3ju2HMra5xcf49YF/M26ed 0SVn5TU09t+W1v/e1zoJESYrwPOnn97Qi02DlNFlMH7lPyUNKtGrBhod8aLxm+Toq/wzd62/vlwX6 AyR9vIhoyrsBcXnwEHvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDEEh-00HOBt-Cz; Thu, 27 Jan 2022 23:31:27 +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 1nDEEe-00HOBZ-3Q for linux-arm-kernel@lists.infradead.org; Thu, 27 Jan 2022 23:31:25 +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 EB3011063; Thu, 27 Jan 2022 15:31:21 -0800 (PST) Received: from [10.57.68.47] (unknown [10.57.68.47]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 90BF83F793; Thu, 27 Jan 2022 15:31:20 -0800 (PST) Message-ID: <81bb9590-4741-dc32-e590-628de4078fc4@arm.com> Date: Thu, 27 Jan 2022 23:31:14 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] arm64: errata: Remove AES hwcap for COMPAT tasks on A57 and A72 Content-Language: en-GB To: Arnd Bergmann Cc: Ard Biesheuvel , James Morse , Linux ARM , Catalin Marinas , Will Deacon , Suzuki K Poulose References: <20220127122914.1585008-1-james.morse@arm.com> <3e11270f-7014-4729-13cf-d9331d4bdec7@arm.com> From: Robin Murphy In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220127_153124_297987_09D15AB7 X-CRM114-Status: GOOD ( 22.01 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-01-27 19:55, Arnd Bergmann wrote: > On Thu, Jan 27, 2022 at 7:43 PM Robin Murphy wrote: >> On 2022-01-27 14:52, Arnd Bergmann wrote: >>> On Thu, Jan 27, 2022 at 1:39 PM Ard Biesheuvel wrote: >>>> Cortex-A57 and Cortex-A72 have an erratum where an interrupt that >>>> occurs between a pair of AES instructions in aarch32 mode may corrupt >>>> the ELR. The task will subsequently produce the wrong AES result. >>> >>>> Fortunately, the only A72 that is known to be widely deployed with >>>> 32-bit kernels and/or user space is the Raspberry Pi 4, which does not >>>> implement the crypto extensions. >>> >>> I have previously used Amazon EC2 A1 instances (using Graviton 1, Cortex-A72) >>> to run Debian armhf and armel user space in chroot environments. No idea how >>> common that is for production environments, but there is a good chance that >>> actual users might use e.g. 32-bit docker images for Alpine Linux on the same >>> machines. >>> >>> There are also some early A57/A72 chips used in Android devices that may >>> frequently run 32-bit applications, or even be limited to 32-bit >>> kernels, see [1]. >>> Not sure how likely it is for any of them to get (a backport of) this >>> patch though. >> >> Isn't ChromeOS still notoriously shipping AArch32 userspace? Between >> Mediatek and Rockchip, both A57 and A72 are definitely playing on that >> stage. > > I wouldn't call it "notorious", but indeed that is an important user > that I missed. For some reason I misremembered that both mt8173 and > rk3399 are Cortex-A73 based, but they are A72 as you say. Although it seems I misremembered about A57 - that must have been in a preproduction version of what became MT8173, or I'm imagining it completely. >> I'd concur that 32-bit *kernel* on v8 is a bit of a specialist sport, >> especially these days. IIRC Exynos 5433 might have been one of the more >> common Android setups for that, but 2015 is now an eternity ago in phone >> years.. > > Unfortunately, 32-bit kernels are still a thing on low-end Android phones, > including some very recent Cortex-A55 based products with Android Go > edition and 2GB of RAM or less, and also some highly popular (at the time) > Cortex-A53 Snapdragon 410 phones started shipping before a 64-bit kernel > port was available on Snapdragon. Apologies, I really picked the wrong wording there, my head was buried in the context of this patch and larger cores in general - by "on v8" I think I was trying to imply shorthand for A57 up to A75 (after which it becomes moot anyway), and bare-metal rather than VMs at that. At the lower end and into weird embedded stuff AArch32 is indeed very much alive and well - obviously Cortex-A32 is v8, for starters. Luckily it isn't relevant to this erratum, although there is of course the implication for workarounds in general. > A57/A72 at least disappeared from phones a long time ago because of > both cost and power consumption reasons, so it's only the low end devices > now. I'm not aware of any Android devices actually shipping with a 64-bit > kernel and 32-bit user space, maybe that was never an option in the SDK. FWIW I had the impression that that was pretty common for a while back before Google started actively pushing for 64-bit support, once new SoCs had 64-bit kernels from bringup but Android vendors still didn't like the storage/memory cost of having to carry both sets of runtime libraries around. But then my awareness of Android has always been more from the development end rather than what may have actually ended up going to market. Cheers, Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel