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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40A23C433DB for ; Wed, 24 Feb 2021 16:08:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E00A664EDD for ; Wed, 24 Feb 2021 16:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235295AbhBXQIP (ORCPT ); Wed, 24 Feb 2021 11:08:15 -0500 Received: from marcansoft.com ([212.63.210.85]:58396 "EHLO mail.marcansoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235182AbhBXP42 (ORCPT ); Wed, 24 Feb 2021 10:56:28 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 8DD9442463; Wed, 24 Feb 2021 15:55:06 +0000 (UTC) From: Hector Martin To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, Marc Zyngier , Rob Herring , Arnd Bergmann , Olof Johansson , Krzysztof Kozlowski , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210215121713.57687-1-marcan@marcan.st> <20210218143644.GC89209@C02TD0UTHF1T.local> Subject: Re: [PATCH v2 00/25] Apple M1 SoC platform bring-up Message-ID: <7d878de7-cfe8-ed32-ff7c-d1c3e61aa54f@marcan.st> Date: Thu, 25 Feb 2021 00:55:04 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: es-ES Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/02/2021 00.20, Hector Martin wrote: > I haven't tested things at EL0 yet, but it looks like the stateful > instructions known to be usable in EL0 (AMX) already default to trap on > this platform, so we should be safe there. Everything else looks like it > probably either shouldn't work in EL0 (I sure hope the address > translation one doesn't...) or is probably stateless. I'll dig deeper > and test EL0 in the future, but so far things look OK (for some > questionable values of OK :) ). Follow-up: I have EL0 testing scaffolding now, and I found some more mutable state (an IMP-DEF, pre-standard version of FEAT_AFP, using a separate status register for the bits), but thankfully it traps at EL0 by default. And then I found some other mutable IMP-DEF state that does not trap at EL0. And which is a 0-day CVE in macOS, because it doesn't save/restore/clear it either, nor does it trap there. E-mailing security@apple.com... -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub 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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00F08C433E9 for ; Wed, 24 Feb 2021 15:57:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C16564E6C for ; Wed, 24 Feb 2021 15:57:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C16564E6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marcan.st Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:Subject: References:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HSysZAgs5ByTWFHZMpPt5X5Ywr8JEkZbd0u0R/DcnNI=; b=A53pCN5ysHe+9/enYv9JwsaNj EgpeciGMP3LVAhUr5dWWuIYkEFyJqMAdQYra46i5tmiYayLpcmchwTei/cXjE7srCOGBmovhDR9X1 g3yVCVzOUv8TS0upzsVBC2fUtq/5dzcoyEnd1QDTxCVcPelQ1Qs6SgeGOy1znhh3VgPlkyKPxtR1a 8VzLZqq3yVFT7MwkvIL6OzxRCsYGPyFcQopF5acoEwl1r+qs9XlAerGRo3F7iV5WhPJOJNMrmdU1c T12L7OyLI/C2H/hsOy0sac+r23iAjaH0n2MOV3d75+9tk82E/zS5Y8lvuEVqK3nNZfHSIGPxs7hRX BL4wT/SxA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEwVW-0001En-9l; Wed, 24 Feb 2021 15:55:22 +0000 Received: from marcansoft.com ([2a01:298:fe:f::2] helo=mail.marcansoft.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEwVS-0001Dn-P9 for linux-arm-kernel@lists.infradead.org; Wed, 24 Feb 2021 15:55:20 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 8DD9442463; Wed, 24 Feb 2021 15:55:06 +0000 (UTC) From: Hector Martin To: Mark Rutland References: <20210215121713.57687-1-marcan@marcan.st> <20210218143644.GC89209@C02TD0UTHF1T.local> Subject: Re: [PATCH v2 00/25] Apple M1 SoC platform bring-up Message-ID: <7d878de7-cfe8-ed32-ff7c-d1c3e61aa54f@marcan.st> Date: Thu, 25 Feb 2021 00:55:04 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: es-ES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210224_105518_964220_9C645DF8 X-CRM114-Status: GOOD ( 15.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Rob Herring , Tony Lindgren , Marc Zyngier , Linus Walleij , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Alexander Graf , Olof Johansson , Mohamed Mediouni , Stan Skowronek , Will Deacon , linux-arm-kernel@lists.infradead.org, Mark Kettenis 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 22/02/2021 00.20, Hector Martin wrote: > I haven't tested things at EL0 yet, but it looks like the stateful > instructions known to be usable in EL0 (AMX) already default to trap on > this platform, so we should be safe there. Everything else looks like it > probably either shouldn't work in EL0 (I sure hope the address > translation one doesn't...) or is probably stateless. I'll dig deeper > and test EL0 in the future, but so far things look OK (for some > questionable values of OK :) ). Follow-up: I have EL0 testing scaffolding now, and I found some more mutable state (an IMP-DEF, pre-standard version of FEAT_AFP, using a separate status register for the bits), but thankfully it traps at EL0 by default. And then I found some other mutable IMP-DEF state that does not trap at EL0. And which is a 0-day CVE in macOS, because it doesn't save/restore/clear it either, nor does it trap there. E-mailing security@apple.com... -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel