From nobody Tue Apr 15 18:50:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582290779; cv=none; d=zohomail.com; s=zohoarc; b=SS43Zr6snwDBUBwPNSnt37z0EM8pe7EGQP312FU5FY+RrA/QQniqQ192gmuCaUw1u+JUvN98clk2LZACFV4v96Gjy/qEfBhJWdCiSF16QbJKb7eZHGlmBHs/IAEwXQxI5wGLFSl1iQf/KY4baH1ZOi2kcn1t6VGx29UfwRw3L4g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582290779; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kEbZ0H6BPcwPTKlgGDMsr9sYvm7F+OeNwNzpuyE6fjM=; b=H4MFWWPYF7XaGfs2qIa0NdQxN2Pq7gSqLebBkBJoeoywsebDewtsf+P9lmmOYGbZsGnC3nRpBe2rlijZrf6AnjF3KG+GuSQRPw9FfxsfsOmpMRcbhqfG2fzaNE6NF2bDA/bwYVlhPfe6qAu/jsFZCHP+9IyhXh8aJ6evpCqoCXQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582290779455512.8321324624608; Fri, 21 Feb 2020 05:12:59 -0800 (PST) Received: from localhost ([::1]:57246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5870-0006wN-9L for importer@patchew.org; Fri, 21 Feb 2020 08:12:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56512) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5829-0006gH-3n for qemu-devel@nongnu.org; Fri, 21 Feb 2020 08:07:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5828-0002Xz-6E for qemu-devel@nongnu.org; Fri, 21 Feb 2020 08:07:57 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5827-0002XZ-VK for qemu-devel@nongnu.org; Fri, 21 Feb 2020 08:07:56 -0500 Received: by mail-wr1-x441.google.com with SMTP id w15so1996689wru.4 for ; Fri, 21 Feb 2020 05:07:55 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id p15sm3598892wma.40.2020.02.21.05.07.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 05:07:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=kEbZ0H6BPcwPTKlgGDMsr9sYvm7F+OeNwNzpuyE6fjM=; b=Cx14x+zdlr4CfYn+gZ/j2E05IpYY52A7kALoVOySYJlgoDy3AIBN6oaijZIYt12nVB UhBz1fz1giuPLTmf3h/xj0e5tZ7t4x3K7F/Grf5Onk6n9T4nVOYqpG+lZr3s12Zica7d z4DA4tLDsmGb5p7vnF0SZBdOlvJTdtVwTYn11otqkVCeXngJWxTZPhj7NwMsRFZWnQNX eBjhibnq68ALOi+c9wDSp++l5chHvKNLnhb5WDVJJEKRBi9XMp7N42/TGnV/qn3EU49X NOFoCN7XgajK5rNoJ8nfVTCwinIEOJ5WLvDI502qZeQbPQM5T0Z6JyUwFGnTMeNmtMU6 iUsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kEbZ0H6BPcwPTKlgGDMsr9sYvm7F+OeNwNzpuyE6fjM=; b=lXjFheqIhAArpdZv4+33teM2q35nzDrnet8feMbPYgkx4QdfadtQEvxdbcjzQJa0xU +dw14Hic43cTGsxcG1cfU3LrV5V+GFtlg+b4IVKBv8yboaJhnUqUJFMTzuTlpAW1nXxx Tk3OANhNpPNpbE1JNPfKexv4Rk4+bhX2QL8uwD0vqSnAz9BEVXfZN2jEUiJbgW1Wc70w EQuzTxwsgr8/uMfzWgj21PlyFKlu4w4wR0P3mch1Z7Aqb0R0JUtzqupJi88cwdSN7yq5 gLFs821CdegumAiUVBBvwVXi3fOy22/uK4VSBwf3BftOfmE3EE7SnFVyJvk8XF6RzjZD LXCg== X-Gm-Message-State: APjAAAUllbGTn/P8KAM2rYTAyIbd9j/XOPbZm/PG11U94EaIvHD/qfU8 08NvjgS9HPHICabtzQvc2+waBunIs5J9Hw== X-Google-Smtp-Source: APXvYqwTuXvWNsIVXXvYLenqZ09snTdL1PsxYOZSpTDMuF6gde9e4SKXoAPnhuvh0zf7yoNH/GRJkg== X-Received: by 2002:adf:b351:: with SMTP id k17mr48286933wrd.199.1582290474574; Fri, 21 Feb 2020 05:07:54 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/52] target/arm: Use bit 55 explicitly for pauth Date: Fri, 21 Feb 2020 13:06:58 +0000 Message-Id: <20200221130740.7583-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200221130740.7583-1-peter.maydell@linaro.org> References: <20200221130740.7583-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Richard Henderson The psuedocode in aarch64/functions/pac/auth/Auth and aarch64/functions/pac/strip/Strip always uses bit 55 for extfield and do not consider if the current regime has 2 ranges. Suggested-by: Peter Maydell Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20200216194343.21331-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/pauth_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index 9746e32bf81..b909630317e 100644 --- a/target/arm/pauth_helper.c +++ b/target/arm/pauth_helper.c @@ -320,7 +320,8 @@ static uint64_t pauth_addpac(CPUARMState *env, uint64_t= ptr, uint64_t modifier, =20 static uint64_t pauth_original_ptr(uint64_t ptr, ARMVAParameters param) { - uint64_t extfield =3D -param.select; + /* Note that bit 55 is used whether or not the regime has 2 ranges. */ + uint64_t extfield =3D sextract64(ptr, 55, 1); int bot_pac_bit =3D 64 - param.tsz; int top_pac_bit =3D 64 - 8 * param.tbi; =20 --=20 2.20.1