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 13174C433F5 for ; Thu, 27 Jan 2022 14:46:41 +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:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=B/KeHIvhs+4Hrcee2Mw4+4gZ7VmxB2PhXjksUdpkNJ4=; b=zEa+3r5YhyxVz4pBkbhwQzgNg9 XX3P7q/zcn7Y+20q83XLoaHu4kGOVCWLHEJu3FF993BeV1Ep3921/QsM7l9mSDCxA1W20D/57qEkh F1U2wi6/bJap+0CDkGMpP4gM6xmjAfQ837mlXft5hgVGR4tX3sjZFzs9TkHAgbqJrREipwNj1A9G4 T568jpWoXcMcvRr8uarlq44BM0OMzcgYd3x9yx6S1WDikx14TYcYZkTN94SbLBi9k/YqCizyAgULv lxELPhem32Eb7vxXs/PTDrtNQzWlXcPrPFETH6jjt3K9xad9TrjTKUQZI5Nm9m7jtQ6TyF4I/JPpr tUzD7egA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD61k-00G7G6-Ls; Thu, 27 Jan 2022 14:45:32 +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 1nD61f-00G7Ea-TV for linux-arm-kernel@lists.infradead.org; Thu, 27 Jan 2022 14:45:29 +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 641CE1063; Thu, 27 Jan 2022 06:45:26 -0800 (PST) Received: from [10.1.196.218] (unknown [10.1.196.218]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ABB2F3F766; Thu, 27 Jan 2022 06:45:25 -0800 (PST) Subject: Re: [PATCH] arm64: errata: Remove AES hwcap for COMPAT tasks on A57 and A72 To: Ard Biesheuvel Cc: Linux ARM , Catalin Marinas , Will Deacon , Suzuki K Poulose References: <20220127122914.1585008-1-james.morse@arm.com> From: James Morse Message-ID: <680e7a1d-32e4-bf57-d519-a5df2117f94b@arm.com> Date: Thu, 27 Jan 2022 14:45:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220127_064528_043262_A63DD85E X-CRM114-Status: GOOD ( 17.49 ) 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 Hi Ard, On 27/01/2022 12:39, Ard Biesheuvel wrote: > On Thu, 27 Jan 2022 at 13:29, James Morse 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. >> >> The AES instructions are part of the cryptographic extensions, which are >> optional. User-space software will detect the support for these >> instructions from the hwcaps. If the platform doesn't support these >> instructions a software implementation should be used. >> >> Remove the hwcap bits on affected parts to indicate user-space should >> not use the AES instructions. > For this patch, > > Acked-by: Ard Biesheuvel Thanks! > but I will note that > - depending on the C library used, OpenSSL may use SIGILL trapping to > decide whether these instructions are implemented or not, I'd argue that such software is already broken on big/little system. If it tries on a CPU that has a feature, than migrates to one that doesn't, all bets are off. > - the 32-bit kernel should ideally adopt the same approach, I've had a stab at that, it will take me a little while to test it... > 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. Ah, I didn't know folk ran 32bit kernels on these. Thanks, James _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel