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=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 9E98CC433EF for ; Thu, 2 Sep 2021 22:42:36 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E913E600EF for ; Thu, 2 Sep 2021 22:42:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E913E600EF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A22BA83502; Fri, 3 Sep 2021 00:42:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="If7hKB/m"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CDE1D832B4; Fri, 3 Sep 2021 00:41:58 +0200 (CEST) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2BA93834E5 for ; Fri, 3 Sep 2021 00:41:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf34.google.com with SMTP id p17so2145074qvo.8 for ; Thu, 02 Sep 2021 15:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xHoTZ1lZEbtOA03dglfn/XCfTPJROXxO6eaEtgOZ8to=; b=If7hKB/mMkxKc66mrTInmCiQ5SC7zZdkz/+Uba1kc0aAcM7IYQ+t9u6tS6FLNCIZe1 zoDMK0d5SIda6BiaEo9uUQYbmXxLauZOHTJdYv+bjCCaPPjJGWAdzn0nsg0UzsY4ttwm ACsf1HJX02a8VHIE22yZOm7s46NbJpEh9TeJo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xHoTZ1lZEbtOA03dglfn/XCfTPJROXxO6eaEtgOZ8to=; b=RFZ6FgE9nFV3CDv4h6znijKCrdZH1WugeuLGUPCChe3aIRfA02wXYYjQNnyEnonyB/ 6ivinNox1BbqOLWWy25Pu6qs45cA3mDo13HQmmSQF+8C6x1YPG+R6A4RNmQ/N2hdK6LM LEvbohntDh6Hveg8HS7x7ErLFFv528Mb0OBJ7tNIpIqmw9y8PTya8bXeSFghAvt/5Yoe STIIUugsOO5VwkU48oXMUn3xghabS6C3kR0GCycv14pvxQBmcjLdubYKuCpN3FPluWjc D9zi4sD3OdaZHJ4axBYwfbb2pdQwJ0SaFiwvglAK+vjMVyBUH8xewbnmHQ9gox4uPWXM xRGw== X-Gm-Message-State: AOAM531EPdLgYpi7DC4SU6ruObMwS2u/DKjU/Ay9OjOdMeHsmi7SKAHL hgaezbqJHAUR5oyGQ8azL7DRBg== X-Google-Smtp-Source: ABdhPJxD2YjK1PKGLXPOpDMDfRDrZesT4DQ5aSxo5Icu5rgvwQflZTqq2hwqb+oG1JI1bW+lZXxFRA== X-Received: by 2002:ad4:476a:: with SMTP id d10mr593296qvx.61.1630622509848; Thu, 02 Sep 2021 15:41:49 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-95b1-4c42-35f4-d991.res6.spectrum.com. [2603:6081:7b01:cbda:95b1:4c42:35f4:d991]) by smtp.gmail.com with ESMTPSA id j18sm2468614qkl.12.2021.09.02.15.41.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Sep 2021 15:41:49 -0700 (PDT) Date: Thu, 2 Sep 2021 18:41:47 -0400 From: Tom Rini To: Peter Hoyes Cc: u-boot@lists.denx.de, patrick.delaunay@foss.st.com, sjg@chromium.org, andre.przywara@arm.com, diego.sueiro@arm.com Subject: Re: [PATCH v2 1/6] armv8: Disable pointer authentication traps for EL1 Message-ID: <20210902224147.GT858@bill-the-cat> References: <20210819155314.1787973-1-peter.hoyes@arm.com> <20210819155314.1787973-2-peter.hoyes@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vAPNIlwpSSjkmR2r" Content-Disposition: inline In-Reply-To: <20210819155314.1787973-2-peter.hoyes@arm.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --vAPNIlwpSSjkmR2r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 19, 2021 at 04:53:09PM +0100, Peter Hoyes wrote: > From: Peter Hoyes >=20 > The use of ARMv8.3 pointer authentication (PAuth) is governed by fields > in HCR_EL2, which trigger a 'trap to EL2' if not enabled. The reset > value of these fields is 'architecturally unknown' so we must ensure > that the fields are enabled (to disable the traps) if we are entering > the kernel at EL1. >=20 > The APK field disables PAuth instruction traps and the API field > disables PAuth register traps >=20 > Add code to disable the traps in armv8_switch_to_el1_m. Prior to doing > so, it checks fields in the ID_AA64ISAR1_EL1 register to ensure pointer > authentication is supported by the hardware. >=20 > The runtime checks require a second temporary register, so add this to > the EL1 transition macro signature and update 2 call sites. >=20 > Signed-off-by: Peter Hoyes Applied to u-boot/next, thanks! --=20 Tom --vAPNIlwpSSjkmR2r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmExUysACgkQFHw5/5Y0 tyw8Gwv+NPDOMzv6EYnQaUpaiihTVYGp28DorMjHasITt9Zi28djsjaXinCMNN4k Th3rtbMW40ZtNI7y8eT6CYg1oO6VoTqy5Yhvf2Crt1NgxaMbbyHlTrQcQLer363r 8eV4r/aeKAVA6fuepJTReYQ9RfhaOaFZslCvJdr4BePf7T89czrAKeUN/16HJv4V 5nlOGpNXPGppJkFWYd04K2kZVz9rO9NQblHjnm8kbd3c+65s77lCfxIOUN9XbYHC 4CxP/mubZIfPHSkBr6RIyvVbOuqPrckA0Fwp3GgGhMB18pXhiUvzwwGzeL0wjPlA 3AsqBQUEja1wVWanp9csWtdC4d2FunMfgNWoGaszy9de2V9S/2oqrz+6DnKPnP2A OwXrle1+C5q9t9jl50AjiXENMrmj63BYn6s25AZRKB/R76qT2slu+bAC/GlT5Ohf MnT6VFZTQ067xQHCMWwlOY1M1doE0ul+cOWY7lahJ/emP7Mf/UtIvmmC0z7shuMS fk4fsLTR =kH2+ -----END PGP SIGNATURE----- --vAPNIlwpSSjkmR2r--