From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ASohI4OYmmr7CSgAWB0awg (envelope-from ) for ; Fri, 04 Sep 2026 06:08:03 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=F66jauAc; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 897961E09B; Fri, 04 Sep 2026 06:08:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,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 vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 BCA4F1E09B for ; Fri, 04 Sep 2026 06:08:02 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3B2748F52CE for ; Fri, 4 Sep 2026 10:08:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3B2748F52CE Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=F66jauAc Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by sourceware.org (Postfix) with ESMTPS id BC32E4855E37 for ; Fri, 4 Sep 2026 10:07:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC32E4855E37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BC32E4855E37 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788516436; cv=none; b=TcixVF1OIlY8EXBl5me0CdQrWUmragI68jB72fMkG+JVqcBeX9TnieemlPRavKkeqRTFzkZWJb6NyJep8mOj+NRCKb3LSYBsHgIZADpZW9Mr98AP8khb3fp4aHMviFnIFwkkRIC7LEnLZoZIVL+7xB2edMmhF30SPtPTMAhAcuc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788516436; c=relaxed/simple; bh=B0j3Q1VeZPhvCVZNWOAy/Lv80XmX9caPJsq3EyAZmcY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vDK+O/P9D2+IAqKyRACBfzp8s9zglcV+se5e9V8JsMTwy2E7peaL+PfJzna/UmhsUKqriiGK6c+0lyD+6q7xwh7WEfFVLbdcWSJU+AW/dzkyKhTUjAYz5jH4pKmUWdz65GP+1+YkckG0bEKud/T9l2uVdm6Vw2cCnYCprX58GP0= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=F66jauAc DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC32E4855E37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788516436; x=1820052436; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B0j3Q1VeZPhvCVZNWOAy/Lv80XmX9caPJsq3EyAZmcY=; b=F66jauAcE3vlMkNj4P4Mgv5y90hsilNeKSMBfvRexHlYMU0VXjfRuDnl KUl5zpefvCO5Go8orTAGeB79m9AyzHthrCTxQDJM0zHxjTQr3yn/q89LQ E7fNWK31Dlnje4T9SZuF8SHmxfYWBMRSw2WKPsvObLIaGMZ9Ufx/ywxgJ 4LRh/S734ApkVxW3YTGlMpncX8sx8MX+W28oO9cQbMuoTQqLJhB33JBex k4ks31DJVE+y8z8X69uagD6W18fMe+L/00PjnRkWTiPaKELc30V/3nJ8h M6Miwg9siFpsppxvrg5Kd6K1sBCtE2GPlLox3ASIUB7+3UJ6JJrbToqWc A==; X-CSE-ConnectionGUID: OWaLT/cjRKyYEvRKZiKxnw== X-CSE-MsgGUID: IXfzxXQoRiKTdYK0wtxjAA== X-IronPort-AV: E=McAfee;i="6800,10657,11895"; a="89069655" X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="89069655" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2026 03:07:16 -0700 X-CSE-ConnectionGUID: nSWX5tPoS4qHMADa2AM/jA== X-CSE-MsgGUID: svWnXtBvSWC2th6q8RtF5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="299871059" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2026 03:07:15 -0700 From: Christina Joos To: gdb-patches@sourceware.org Cc: aburgess@redhat.com Subject: [PATCH 2/2] gdb, testsuite: Handle unexpected PRKU value in linux corefiles. Date: Fri, 4 Sep 2026 12:06:48 +0200 Message-ID: <20260904100648.1705702-3-christina.joos@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260904100648.1705702-1-christina.joos@intel.com> References: <20260904100648.1705702-1-christina.joos@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 I observed that for linux corefiles the value of PKRU register is sometimes the default value (0x55555554), introduced with commit "x86/pkeys: Default to a restrictive init PKRU" [1] in linux kernel v4.9. even though we expect a different value at this point. I have seen the default init value on Ubuntu 24.04.4 LTS with linux kernel version 6.8.0, but the expected value (0x12345678) on Ubuntu 26.04 LTS with linux kernel version 7.0.0. Accepts both values for now until the reason is identified and we can change it to an appropriate xfail. [1] https://github.com/torvalds/linux/commit/acd547b29880800d29222c4632d2c145e401988c --- gdb/testsuite/gdb.arch/i386-pkru.exp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.arch/i386-pkru.exp b/gdb/testsuite/gdb.arch/i386-pkru.exp index c455891b8de..ce9e17a4493 100644 --- a/gdb/testsuite/gdb.arch/i386-pkru.exp +++ b/gdb/testsuite/gdb.arch/i386-pkru.exp @@ -119,7 +119,12 @@ proc test_corefile {core_filename} { gdb_test "core $core_filename" "Core was generated by .*" \ "load corefile" - gdb_test "info register pkru" ".*pkru.*$::val1.*" \ + set pkru_val_re $::val1 + if { [istarget *-*-linux*] } { + # Some linux kernel write the default PKRU value to the register. + set pkru_val_re ($pkru_val_re|0x55555554) + } + gdb_test "info register pkru" ".*pkru.*$pkru_val_re.*" \ "read pkru register" } -- 2.53.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.