From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CP6zKyMJymifSQcAWB0awg (envelope-from ) for ; Tue, 16 Sep 2025 21:04:35 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=XY5AGjoZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 987E41E0BA; Tue, 16 Sep 2025 21:04:35 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C65E61E047 for ; Tue, 16 Sep 2025 21:04:34 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F4323858C39 for ; Wed, 17 Sep 2025 01:04:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F4323858C39 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=XY5AGjoZ Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 706FB3858D33 for ; Wed, 17 Sep 2025 01:03:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 706FB3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 706FB3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758071033; cv=none; b=GSfleYzYj0AVo0gVErcC8UsVzlvb+/OXWcvsZOoxSOkEm04oyZYxxIo4B0LeBnABYhZOttMPMfde3kEPqF/AYJYxD/InSNc3x1zupyABTwU7lmF4+l6LZiKCuBy0ebYVrAHmI6F743PXWUM8QPSzcCP0NwvKyqwCLGppDO2x7ns= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758071033; c=relaxed/simple; bh=WZ5a1HZVtonfzpPxOSNQDetpLdjhxC8o1EXY/eEagb0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ODb+9Y3NMZl5FHkzE3ffmwUZxlp9ZoLjNVwmXM6LMLNDtSPs/lUbWS6xWm/YqIwnttuH8WHRWJ059j7vzOwPlSsDwv/P/zhL36UNFu2zCyR0KPPvAKEWw3eDDinj7yqAPm7t6xmBUoxxk+dcyRePBBb/8XtkWVGw55SKSgVMaZ0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 706FB3858D33 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-b4c3d8bd21eso3981760a12.2 for ; Tue, 16 Sep 2025 18:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758071032; x=1758675832; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7fODL0eq61GJwYrLdGyu/IJMsn9aPPh9FjJVX0z7roA=; b=XY5AGjoZi48wNbxlzrbS+z/TZS4dGvyHLpBbUOjxMz/hPvDM52TbqX3rSoalouCXOB QUVKJck29k3m8hU1by8nawgUx3VagnOWpWS4qwSf94ms0kZwp/UA5zh+RcmddgCFpyu6 gCKUVf5aIil1PFgvKYTWBcVTQaAn6bEKbLh1uIyLzeJ8Z+56lg4MSLoKPAExZAU7ck+U WCDW6hcicvops48HjCp09ihBMnb2pMX6F/mqTD3kJ1y9rOyftC772ARHV2S8UJmL3Bfd i1zBm91/IvF0WbBnkcLtk/0mLUit3ZhGCgi3vaqxQaY75AxJva4tt1AI00QDU3nDU0GI VnUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758071032; x=1758675832; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7fODL0eq61GJwYrLdGyu/IJMsn9aPPh9FjJVX0z7roA=; b=krrq2NEXDlf0zNtETFtzuYp95cskYP+JQ61S44l0HmUU6WR2edF4UZil7CGjFc5kcI 9vI9kD1NuIoSv3Yqab/Z4Eppqy5gHTR3zQeqvX1XAO1RA4Yd/OWnBBVeAZIzK1lkCnNA lfEinesoTP8WWVA+ZvAA+BZq1S3IgJpAZF3vm1RSRWFw8gpvlvn/bnJ/x2cS4KSpu2RH 0TlHMIi4GYMrZsHyUH4PJxL137AxRhQMDnRPzu0DiRy7EncB2g9rwkvepjqXQ5x0Able 5DiczjNIBhd4AAqxzAm3WA25y2sEI7V0VyaxyCuA4DeVx9sStRQ6Dwt9TmRZXy33CEoE hoFA== X-Gm-Message-State: AOJu0YyQBfGXGrY0Zyuu7ZP/vxXTVqkvmyD7nO2C360rAC+Pyg32Iwnh mIuHvKbT8xuiHo785hP7kFgSwqDKCQrgF2WIvL7fbhf0+tb05dZVgSmX7GP7UOHkqqGS0d0jJ6o aLceW X-Gm-Gg: ASbGnctKE11gLnUBPzUNuQ+DJsEVp0A1CLgr5DeAoiUujbF0xq2AH8CUmPBLWGeHVGh Z/BuO+GiVnXTx44+Fi+a/KnmfkXTvL9wPQatBytUOMeamlWgjbdSJ//BocRBqxePk3T+RrDW0mJ bXWqBjp2B80WOA9ItK3WPidKPjHttoQ1FBnP+Gq+uRQB+Z6TeJ6Dr4KZBlPfJYFNLhv7jJ+l6r/ mskNtoDbpwtAnsncc0kYkuX4IyQUjqmLGbNxQ+c32ewPmL1Jfgc+CcsQttpbVPgZQxafN958kRG 8N3GTdTOKl5GRsMdi3VTR2O7jKfkLlE14mubflpCN7S2A2HzuVHWuGtPbzwsUuE97n4SrnYVpKg XivHa9v92loeavCJVhH/YGZizvoiq2DRYQVjF960RCJY= X-Google-Smtp-Source: AGHT+IF8tFoLc+EZ/1uvtLDjI+BcWVQWL4EzZ38YEO+urHj0EZm5sScWwGLcOl3HLGPiViAXscycsw== X-Received: by 2002:a17:902:db02:b0:267:cdb8:c683 with SMTP id d9443c01a7336-268123806c5mr3271295ad.27.1758071032450; Tue, 16 Sep 2025 18:03:52 -0700 (PDT) Received: from localhost ([2804:14d:7e39:88d6:7052:579b:4442:5192]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2651ca21842sm82328585ad.34.2025.09.16.18.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Sep 2025 18:03:51 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Cc: Luis , Joel Brobecker Subject: [PATCH] GDB: aarch64: Use GCS features to calculate hash of struct aarch64_features Date: Tue, 16 Sep 2025 22:03:49 -0300 Message-ID: <20250917010349.263373-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Luis noticed that when adding the gcs and gcs_linux members to struct aarch64_features in my Guarded Control Stack patch series, I neglected to modify struct hash::operator() to take them into account when computing its hash. This can cause GDB to use the wrong aarch64_features object during a debugging session. Regression tested on aarch64-linux-gnu. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33440 Suggested-by: Luis --- This should also be backported to the branch. Unfortunately I'm not able to set the target milestone in Bugzilla. gdb/arch/aarch64.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h index 679d845df74e..0fcdba7fb7d6 100644 --- a/gdb/arch/aarch64.h +++ b/gdb/arch/aarch64.h @@ -94,6 +94,10 @@ namespace std /* SME2 feature. */ h = h << 1 | features.sme2; + + h = h << 1 | features.gcs; + h = h << 1 | features.gcs_linux; + return h; } };