From patchwork Thu Apr 20 10:04:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 675612 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp222088wrs; Thu, 20 Apr 2023 03:09:15 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4WWCEXM7CiJfq4W3LnlmOjdAUadVJh9mTVKhmISB4Beak2knHfbYeho9QlsCrrmZ9Uk6J X-Received: by 2002:ac8:5d87:0:b0:3e7:ec0b:f63c with SMTP id d7-20020ac85d87000000b003e7ec0bf63cmr947987qtx.33.1681985355550; Thu, 20 Apr 2023 03:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681985355; cv=none; d=google.com; s=arc-20160816; b=Ri/OIu25yf8yjpsVlVfchQvK4GAIVjG40qFJfAtB2mkjsfQfblteYqHgvXhWCgX2Vj tARBQQ+gMpIwIemkQWTap5rOmurBO4Qmzy/nlKgJpW4YXa+KpODbd8o9hd33cKRpY8OF KfcQauJ3KPUydmS0dioyzxDCrf/1i1VJRC0lq2a4p5GoYVcpn9T7WvHfFP98gYlX+bJp PlRjhmuNIuKQY5lP8w8L13k5ZCYfVsoHXgBVN5xo5zLGPZls4Qr8MGwIOKsxrJlPTtE2 4zAVlMH/lx/9hVHvEW9CbXrcXbRcENXku+weWgt1PsWh9WyHVPdBKmVANCmuxTQW6mzu deRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QXIl1fa++9Ow0aVWNLQPOb6RkM7apUVyviw4bR4/41c=; b=GPhhTBB14uv7aU3nxkifsUGgLJJKkO/vGhn0FMhGaJ+L7oH5bXOYEBbqpBICmGFxOF iIiqP3Ep4v1+fpR3ASteyZEtIQ2mmjVFW2mWM4QA4x27OZ0xeSNF++wIpZtHDT9EcI3b QEswaeeP1EK1xzxFzy7g8cl4iFUVMvPooR6QO+4Z6bZ6u3Ddz907KrA251B4IboKJN3O 5aJz4TzCwGW5a9IwdG/0DYAWEJhmdDrioTKAO9yJh+hQM3xQ/KoR4Euq9Bb9t41cy3uX ig6b+PWBCihO0br8ooZDcw/1esBqpggKEbNSlMKplMVjHyaj4qWnZomegqiYKcp0TZ3n yhuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cySqbOws; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r15-20020a05622a034f00b003eb11d7218csi1158681qtw.121.2023.04.20.03.09.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 03:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cySqbOws; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppRAL-0000l5-Hj; Thu, 20 Apr 2023 06:05:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppRAC-0000bC-En for qemu-devel@nongnu.org; Thu, 20 Apr 2023 06:05:16 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppRA6-0003sK-Cf for qemu-devel@nongnu.org; Thu, 20 Apr 2023 06:05:15 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-2f833bda191so284017f8f.1 for ; Thu, 20 Apr 2023 03:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681985108; x=1684577108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QXIl1fa++9Ow0aVWNLQPOb6RkM7apUVyviw4bR4/41c=; b=cySqbOwsypi2Hry+secQVtW/l/aadWE0Zn1uuGHURn166gCllnUKyAJORBsN1SSFSe QCfo1nOWr67c/sEY25b+0Tm2xXffpRlgjzHi06gEjrFoHznHzktkdxWM/DLkqoLPQvG+ nffCLphGQnrE2wkMUE0b14M+ZG/LZXpCMu9bvYbkSHoMrhsvivJJOeCeOmR9CCqDOF1o 3oMc5GugQLLkOebNUvXUWhcdlWx3WHiOD0vJCt/84aJ3+Rfdh1/20IQAZa5Dmth1dZAQ P8YJakp/N3jmE+uXZqW+BamyZzC4MGno9qGgthvh1LaR6zj2GcGIzGUaAE+wRZJymWJO yihw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681985108; x=1684577108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QXIl1fa++9Ow0aVWNLQPOb6RkM7apUVyviw4bR4/41c=; b=SGYRhJopSs3SOo6XLvDoibzh0DZcJhMx87NR0zlzz9WorXOyDVaCfjFja6jCdXsqJ4 bLFmOpwQPiyH+XmnNPPMigLuZYSyXXlUCDbT3Ry3UxpjVrhPApS9B5T6wbhgHEsCS65y yzobUsLbqhQZeF5scZSlTJgZpB8fQBVXPwE9I2Q4+RDaVD2hXE05k90dv+QRQQ3bypV8 9hhAbDYSjhZjCf5yEVHYQ7mveOsPTbrNRZvDRfGMFUo4K9euRsDggmKRI4VsoxYvwNSb 936G5csiiJac2we6JQYkQOHGD73iVBaSMY44kn6kdzuKOBXBPaZWgMFShY+vupp575Lf fJ/w== X-Gm-Message-State: AAQBX9dTYEZtmygGW44pi1/9bt4amuhoAtd0CNfgD8M1QuXe9MJmPbsY 0CxGWykIZnL6mp6qSqlAYJ1lEEG0EjqpL2MpkPE= X-Received: by 2002:a05:6000:12:b0:2f8:5d92:aa12 with SMTP id h18-20020a056000001200b002f85d92aa12mr916730wrx.66.1681985107918; Thu, 20 Apr 2023 03:05:07 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id o2-20020a5d58c2000000b002fe522117fdsm1556388wrf.36.2023.04.20.03.05.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 03:05:07 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/21] target/arm: Report pauth information to gdb as 'pauth_v2' Date: Thu, 20 Apr 2023 11:04:51 +0100 Message-Id: <20230420100456.944969-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230420100456.944969-1-peter.maydell@linaro.org> References: <20230420100456.944969-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org So that we can avoid the "older gdb crashes" problem described in commit 5787d17a42f7af4 and which caused us to disable reporting pauth information via the gdbstub, newer gdb is going to implement support for recognizing the pauth information via a new feature name: org.gnu.gdb.aarch64.pauth_v2 Older gdb won't recognize this feature name, so we can re-enable the pauth support under the new name without risking them crashing. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230406150827.3322670-1-peter.maydell@linaro.org --- target/arm/gdbstub.c | 9 ++++----- gdb-xml/aarch64-pauth.xml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index 13fbe9b0d7e..03b17c814f6 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -521,18 +521,17 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) aarch64_gdb_set_fpu_reg, 34, "aarch64-fpu.xml", 0); } -#if 0 /* - * GDB versions 9 through 12 have a bug which means they will - * crash if they see this XML from QEMU; disable it for the 8.0 - * release, pending a better solution. + * Note that we report pauth information via the feature name + * org.gnu.gdb.aarch64.pauth_v2, not org.gnu.gdb.aarch64.pauth. + * GDB versions 9 through 12 have a bug where they will crash + * if they see the latter XML from QEMU. */ if (isar_feature_aa64_pauth(&cpu->isar)) { gdb_register_coprocessor(cs, aarch64_gdb_get_pauth_reg, aarch64_gdb_set_pauth_reg, 4, "aarch64-pauth.xml", 0); } -#endif #endif } else { if (arm_feature(env, ARM_FEATURE_NEON)) { diff --git a/gdb-xml/aarch64-pauth.xml b/gdb-xml/aarch64-pauth.xml index 24af5f903c1..0a5c566d668 100644 --- a/gdb-xml/aarch64-pauth.xml +++ b/gdb-xml/aarch64-pauth.xml @@ -6,7 +6,7 @@ notice and this notice are preserved. --> - +