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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 9E82FC433F5 for ; Tue, 15 Mar 2022 15:07:42 +0000 (UTC) Received: from localhost ([::1]:48196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU8lx-0005FJ-Mn for qemu-devel@archiver.kernel.org; Tue, 15 Mar 2022 11:07:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU8l4-0004HI-7Q; Tue, 15 Mar 2022 11:06:46 -0400 Received: from vps-a2bccee9.vps.ovh.net ([51.75.19.47]:50262 helo=ursule.remlab.net) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU8l2-0005XU-6b; Tue, 15 Mar 2022 11:06:45 -0400 Received: from ursule.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 8FD3EC0233; Tue, 15 Mar 2022 17:06:40 +0200 (EET) Received: from basile.remlab.net ([2001:14ba:a080:a501:23a6:ebae:8f2a:4d73]) by ursule.remlab.net with ESMTPSA id OpAGIICrMGIKLxYAwZXkwQ (envelope-from ); Tue, 15 Mar 2022 17:06:40 +0200 From: =?ISO-8859-1?Q?R=E9mi?= Denis-Courmont To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, Richard Henderson Subject: Re: [PATCH] target/arm: Fix pauth_check_trap vs SEL2 Date: Tue, 15 Mar 2022 17:06:40 +0200 Message-ID: <2620199.mvXUDI8C0e@basile.remlab.net> Organization: Remlab In-Reply-To: <20220315021205.342768-1-richard.henderson@linaro.org> References: <20220315021205.342768-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=51.75.19.47; envelope-from=remi@remlab.net; helo=ursule.remlab.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Le tiistaina 15. maaliskuuta 2022, 4.12.05 EET Richard Henderson a =C3=A9cr= it : > When arm_is_el2_enabled was introduced, we missed > updating pauth_check_trap. >=20 > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/788 > Fixes: e6ef0169264b ("target/arm: use arm_is_el2_enabled() where > applicable") Signed-off-by: Richard Henderson > > --- > target/arm/pauth_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c > index cd6df18150..739aa520dd 100644 > --- a/target/arm/pauth_helper.c > +++ b/target/arm/pauth_helper.c > @@ -390,7 +390,7 @@ static void QEMU_NORETURN pauth_trap(CPUARMState *env, > int target_el, >=20 > static void pauth_check_trap(CPUARMState *env, int el, uintptr_t ra) > { > - if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) { > + if (el < 2 && arm_is_el2_enabled(env)) { > uint64_t hcr =3D arm_hcr_el2_eff(env); > bool trap =3D !(hcr & HCR_API); > if (el =3D=3D 0) { Ack. =2D-=20 R=C3=A9mi Denis-Courmont http://www.remlab.net/