From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id JIymG3Y+Y2ozQCsAWB0awg (envelope-from ) for ; Fri, 24 Jul 2026 06:29:10 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ixv7R2J0; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ixv7R2J0; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4E9B51E09E; Fri, 24 Jul 2026 06:29:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 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 1D8F41E099 for ; Fri, 24 Jul 2026 06:29:08 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E26E4BA2E11 for ; Fri, 24 Jul 2026 10:29:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E26E4BA2E11 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ixv7R2J0; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ixv7R2J0 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11011005.outbound.protection.outlook.com [52.101.65.5]) by sourceware.org (Postfix) with ESMTPS id DFBFA4BA540B for ; Fri, 24 Jul 2026 10:28:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DFBFA4BA540B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DFBFA4BA540B Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.65.5 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1784888920; cv=pass; b=HuMY84oB2ASXSs8JvRd4WxtbjyNos0jnI/+lClduitlFJKBKg4bRsuyjMg0nb6nI/+VRdPjnMhFoMXsI8QUGy1UOxHWxq0RB+i52CJlnth21jvZx7xOv3aYDALOrir60q86eSb4/uHjg2A2EmlJ2VNvhOgj+GWKGas2FxDkgNvI= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1784888920; c=relaxed/simple; bh=/QpoceHHjP5Xyum6JhmnevXeR0TUm174uu9YYDIJDFo=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=EFK+HKMJ4uPi0xcmhzhoLaV1qBCiFbqUpblbxGpCuLOZe/0nNL8KeZ4/aW/PaMT+jn1Z/ZczX72guJMf9uTJ4yF0geoAEWkBxIi+lF941jW/VjdzXKYGraNBtM3+N330Hw+pc0TZShHrK0Z1gpDj0xGX7s48Cv/DFQ3hPeTJ4IQ= ARC-Authentication-Results: i=3; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ixv7R2J0; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ixv7R2J0 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFBFA4BA540B ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=GNZkgRd/RaNhD1J1xDYr+37DKzMegszElRpTO1isOknE4mOLd63f0OldnSnmxqEt3gSEqfXOnzbLsd4T7xFmQP06yEuBg6dOWKw5omIxoV6vbuMX7vO9BCAPar2FvnY0pT8CDGPvlzL6RpFJFLUW4uXDe9R5sShS9goAvHNtcnOQMVDQGKLHXRJJO15WzXzAnppJ0abYIZWwbgr5yL9/J29SedA8+TK/G7dsmx8nRGTTUo4+6TV0pntshsLzgg1FAUXxib658tIlgd2Lb62GiRUW6/5zpjgd1FygDprnvTIysThpgMJBdRUL1GGB0o5nvxMaejSq+4Sn9kO7YkxvLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Drrr0+P0hBJZTo6pdrgto2o+XQhUqwmFMRYIaJ45tEs=; b=MhBsWqHEzoP6wQoqwOFivUf+STDzzVZV38GC8AB6ToZcCBnv5QvqfLBZt1/gDeV+bsj/+k7oxkbB0sCE1YeRhBbQRQmjmeWDBeX0nDevEAciUbXgxIMzBZWcXUrcjEuUjUE2kK1ACkKWfPmqsLcSTlUsjl81O5x9aWoQMSmrOFPVcnE1wFWUzvR5G1e2b/ZDc2doXjy1ssN/NjNBw+zB6NgbPxJDmCbDYe5yer3bTrHzOW+T+ZtNp51M5R7mZkSVN5qLzctxm/utwmktDcQAUyHkouf2dUVeBGlBMyF8uN7JJQAeHVWFPElDSMKHakjFIJUKFonpU5ZbxuTCbVVJMA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=linaro.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Drrr0+P0hBJZTo6pdrgto2o+XQhUqwmFMRYIaJ45tEs=; b=Ixv7R2J0RFEmR0eA1NSLntmRiAHeG6A0g7QCiRvxvmCuXsvXIWZdWvjoEry6NuZ0KFe1CefaKVapXrX/LeCrOa9Aw4hDUZKH7Zhx65CoiWLx8qCwMV4yOVA+eo7h+SqeWrSuPGTt5MuDsiVKOplo3JFFUc08Y/T9XRFYGnHt1oQ= Received: from AS4P191CA0031.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:657::13) by AM8PR08MB6420.eurprd08.prod.outlook.com (2603:10a6:20b:314::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.11; Fri, 24 Jul 2026 10:28:33 +0000 Received: from AMS1EPF0000004E.eurprd04.prod.outlook.com (2603:10a6:20b:657:cafe::9d) by AS4P191CA0031.outlook.office365.com (2603:10a6:20b:657::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.245.11 via Frontend Transport; Fri, 24 Jul 2026 10:28:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by AMS1EPF0000004E.mail.protection.outlook.com (10.167.16.139) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Fri, 24 Jul 2026 10:28:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x5PthGhswr/sh46PflyykbVx0sguUPdp6CgbtzhfJ36Q88mlo/bj2+LvlsklfGT2cFt3fh2PfnnrGMz8z9kmGnH7WvIRnLldGQWejxPdbatjKnnfB7n9l1sjgSlcVYezF7qnY6acz+4UndqAiq6jeH2FXaHngL1R/mSfOlUyEHzCRySxGGpKOerVyZ4jS0t4YZ5BWornTunIzNdk9U0d6tzn4AmujZ2SsQQ6oEtJZprarUBxMx42TUV1oHcKvfqRdYC8amosMxJgwLG3NntSKMm+8aR9i1Q1YdZ9okL0sm0nWjlXqHsa1xK5qYPSDvMKuZcjhomB4vNWTkDezxvucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Drrr0+P0hBJZTo6pdrgto2o+XQhUqwmFMRYIaJ45tEs=; b=RP8kDKjgaQ3iDLqeYHKFNx7IS6i56xYeUqAG8x0mQwKwulhgx9x1GinCiKIQgeUUeDjBPaNUoqvmEqAMxJ080aaKrcZiKJlGoriIG9pUn3jZJrCa2RF4shMGqAKFT60T0sPJ0kllzZVutVOm1/2QmKSlKwy43xir6yOWzV2GvC3KV4BkiJ5AMzhoQgwlEGIwg4aEhUl2jtV1bkAoJZinAur4A1V2br2nsrSswp22EV0ATEu4A6UeEdlMDixK7P7WyP2OS1EV7lt+kvFyGN/T2vcbuKXvFpxDaZVXC5oIDUUrXG/uo2ONs4hqXf2Qsz1LvD0evSU4JWLO3euRKcuwKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=linaro.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Drrr0+P0hBJZTo6pdrgto2o+XQhUqwmFMRYIaJ45tEs=; b=Ixv7R2J0RFEmR0eA1NSLntmRiAHeG6A0g7QCiRvxvmCuXsvXIWZdWvjoEry6NuZ0KFe1CefaKVapXrX/LeCrOa9Aw4hDUZKH7Zhx65CoiWLx8qCwMV4yOVA+eo7h+SqeWrSuPGTt5MuDsiVKOplo3JFFUc08Y/T9XRFYGnHt1oQ= Received: from AS4P195CA0005.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:5e2::14) by DUYPR08MB11992.eurprd08.prod.outlook.com (2603:10a6:10:660::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.10; Fri, 24 Jul 2026 10:27:29 +0000 Received: from AMS1EPF00000046.eurprd04.prod.outlook.com (2603:10a6:20b:5e2:cafe::3d) by AS4P195CA0005.outlook.office365.com (2603:10a6:20b:5e2::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.245.11 via Frontend Transport; Fri, 24 Jul 2026 10:27:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by AMS1EPF00000046.mail.protection.outlook.com (10.167.16.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Fri, 24 Jul 2026 10:27:29 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX03.Arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Fri, 24 Jul 2026 10:27:25 +0000 Received: from arm.com (10.57.42.169) by mail.arm.com (10.240.25.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29 via Frontend Transport; Fri, 24 Jul 2026 10:27:24 +0000 Date: Fri, 24 Jul 2026 11:27:23 +0100 From: Yury Khrustalev To: Thiago Jung Bauermann CC: Matthieu Longo , , Luis Machado , Luis Machado , Andrew Burgess , "Pedro Alves" , Tom Tromey , Srinath Parvathaneni Subject: Re: [PATCH v1 09/10] gdb/linux-tdep: parse ProtectionKey in /proc/PID/smaps Message-ID: References: <20260707154900.94542-1-matthieu.longo@arm.com> <20260707154900.94542-10-matthieu.longo@arm.com> <87qzlczms3.fsf@linaro.org> <042de0a8-d0e4-4ad3-880a-684ab6a22077@arm.com> <87wluldrfl.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <87wluldrfl.fsf@linaro.org> X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS1EPF00000046:EE_|DUYPR08MB11992:EE_|AMS1EPF0000004E:EE_|AM8PR08MB6420:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b747676-8f82-47cc-094f-08dee96e4ff6 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|36860700016|1800799024|82310400026|23010399003|10067099003|4143699003|5023799004|11063799006|6133799003|56012099006|3023799007|22082099003|18002099003|13003099007; X-Microsoft-Antispam-Message-Info-Original: aPNvHHQsFrjxUGfr42TKvNXCuG3VzGKefr2lvMYSKBdljwDWv07TTk0iB2bKZogBOD49OZgoPid2XToLGzEbETAxx0Wm8s6ezcHTJ88hO0kpgN8b7i66FoSrc7STXYvMzPWt5Y86vRhBpUie77bY2jXgCfcjdgKbDu6/a4MwW6vzFUgoiDyczaseo6IsNszBp6LI5PQ58F65nhwDGq444RVNuGjxAi1j+EkmWQJFx5YVYQ1Wu2M7bo1OYxskyehjyN8y0Uldn0x4iDWRW+/nk2wTETv/6sZLnkGRf/Vpo3eI5oVNvRhw7vc/27vJZ3OO5Nn1YH8nS1w4H0vzBTX8dKQaB/b3Sw4Ab91fll098176ia50fLqscBxbsvIi+2swURP3Nt8DqsFBgaJb6RsaFlAX34BL2sC81EgK73UDYy5OERSW8bWEt29Wz+kwydP7iQKeqwLak12SFzrklRaKg2emuAHpKOzHFzW0Pq3bSfgt6OD0y5jPRZhrvXCc0ZVJLAASj299Rj02qOX2PANis5LZXMbvk8NTkyJxj6k+CGbVSElxlrhcaZG7duEvowBpMw9+VHq3fILsG70NT5dazr8Xt66aKu9GEpm06iPOLIw3fHwgGR2IDBEdnnTKSSTjyLzebYJxlRINIg66/fv0hjLYiLYW5yPA6lyZ+2IlLd0= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(36860700016)(1800799024)(82310400026)(23010399003)(10067099003)(4143699003)(5023799004)(11063799006)(6133799003)(56012099006)(3023799007)(22082099003)(18002099003)(13003099007); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: etQsfSyyoRD9z53/4Tq2Wyt2i1sgcvV7KxHU2TgU++7SqRuI5gG8C/vZlr/SzAjMbyYdBAlcP1rV4BUchgH8uooSw5KxExLm7JrND1Fama199IBNfcQQgYuxYL+G9biPPxV52JYlB8d0AP+pGbwUWowgmtkeAsn0YQd6LyCFx1I6DJDSwvHrsM9Tz4H5EOSq3sTwXLkHhOQXntSNrwA0OUvLHkk9DCsPLKmXM6DmQVf5+nb0JN9Copnqjv3XKfoJ3wmpa7oBXJLPhK5g8KI0bNo8jH0C1f5SWJXC0Y9BWp80X8Bq6mjQ8zAktc5vQsohUm0440xChWXJVxy/LT/3Tw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUYPR08MB11992 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF0000004E.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9d5055bf-1efe-4d3b-8e41-08dee96e29e1 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|35042699022|14060799003|82310400026|23010399003|376014|36860700016|4143699003|5023799004|56012099006|10067099003|11063799006|6133799003|3023799007|22082099003|18002099003|13003099007; X-Microsoft-Antispam-Message-Info: Mo3PexYJmEKj+MqvMLd63Vd2WI8gYfylenc2Brr0MN84IbNWvmLx8Q2gdzCDvIlOi8x0eBpkD23DTTy1yKIyPlkRgO+UVGLuYbOXeNmuTUiCS3cjIkJfjlDm0eqWb7rWJb7Y4EXUwXN9/wA0iwS156wf6gsYRiby/7Yt4YN5bY004W6m3nTbBd0XXzejRcYxKDL84p/zsnqGDC1RhcmsRN+DWBp5Gl0xiIwAeC/cglEWE3End9CW8vABq4474eHu510QGdLHcyD3CAEJctuaq1uAj/f+zbqEPm5kH0q4gN4WahZrmO79aditIuSaEgBArBFN/LM9woI+Msz7q+bKIaCarai5Yy17/3hpARahedk72+v5Y78opgACnU24olz7gM5fK+BhR+J5b21vEMBGIp4Cwp4YED/UAg3AiFwuIkCbkGP+9FdmtaHn0/SnA8i0loMG3/P1P53ExcI5T+Q37B4qpRM4VhMqrbRrNbWmlUbOG1QN8hLTjzF1ShKRZKMkZ8rp0Pcu/p/WRNYuw8bGEn4e7hmSt6xb0Fr1n9UWTAhsyOlxdqzCitkGj59yuWmPyy3m4FB5Pakdn4JOUHb3jUQKN0e2PkUSIzm+pulFMnQtdko3Dl2xB/HPH1V+JmAprBj851bSeJOdnyNGKpDVnIoVSKrakNhnTeb0SGFLwYc= X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(35042699022)(14060799003)(82310400026)(23010399003)(376014)(36860700016)(4143699003)(5023799004)(56012099006)(10067099003)(11063799006)(6133799003)(3023799007)(22082099003)(18002099003)(13003099007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fYWf9Zypx+X8w2b3yPUYW7Jx9ShSGv30AfoZ9LNqBONltts06sjkS9Pses4P43VWaoAncciradfE3gciIc2+QVKTjJdDKC0sm6QgaWyRc6bNUObbRUHLTMWc2QWZpmzY7bLo/nMsaksJDyd+tbyXHZB3k7L4ZwuI2249NN3qK+rBN1TGsAX37tYKWyXr9p0I5rS7ulQFbLmJ/X51CLPFZ/i/+J3oxIj5zEYpddWzelZFuEMHm+Q47BTaiBk9+j5mCYIZQecBSUKTytyr2IMMxmjGsWQ7KI4iPuzrkL7LH4fYwyvwm7QjA3enKwZ66joJw9/rNTqg6+keAQ30srQrTZ1B5545oMTI0zw7nQ9PIYgtjyKJ/v83W6IbrL64S8gDqUl/2ORoJ0qElFyR1NZdOdX6g1CiZa9AQjaHbHWRV5vapWA+CcWh6p56aEMAV0jY X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2026 10:28:32.9480 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b747676-8f82-47cc-094f-08dee96e4ff6 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF0000004E.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6420 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 On Fri, Jul 24, 2026 at 02:58:38AM +0000, Thiago Jung Bauermann wrote: > Matthieu Longo writes: > > > On 14/07/2026 10:12, Matthieu Longo wrote: > >> On 09/07/2026 07:42, Thiago Jung Bauermann wrote: > >>> > >>> There's nothing in this patch series that uses the parsed pkey, so IMHO > >>> (other maintainers may disagree) it makes more sense if this patch is > >>> committed together with a patch that makes use of the field. > >> > >> Nothing uses it yet because it is still unclear how to expose it to the users. > >> I assume that "info proc mappings" is a good place to do it. > > I agree. > > >> As a reminder those are the existing columns: > >> Start Addr End Addr Size Offset Perms File > >> > >> Should we add a new column "Protection Key" or "PKey" between "Offset" and "Perms" ? > >> What do you think ? > > I like the idea. A short column name is better to avoid wasting precious > horizontal space. I think "PKey" is hard to guess if one isn't familiar > with the hardware feature, so I'd suggest "ProtKey". What do you think? PKey is a standard recognised term (see [1] for one example), so I think we should use it. [1]: https://www.man7.org/linux/man-pages/man7/pkeys.7.html > > > Additionally, if we were to print the permissions associated with a PKey, what do you > > think about > > the following view ? > > > > Start Addr End Addr Size Offset PKey Perms File > > 0x0000000000400000 0x0000000000483000 0x83000 0x0 0 r-xp /path/to/file > > ... > > 0x00000000004a2000 0x00000000004a7000 0x5000 0x0 1 rw-p > > Thread 1: effective: r-- overlay: r-- > > Thread 3: effective: rw- overlay: rw- > > Thread 4: effective: r-- overlay: r-x > > I like it. Just a few comments: > > > Effective being the effective permissions resulting from the ANDing of the base > > permissions (coming > > from "Perms") AND the overlay permissions attached to a thread (permissions associated to > > the PKey. > > Maybe it's just me, but displaying the overlay permissions after the > effective permissions makes me think that the latter are the actually > effective ones (I guess because English is a left-to-right language). The idea is that effective permissions are always displayed while overlay and any other future types of permissions are optional and might not be present. I think having left-most columns always present and aligned will make it easier to read and parse. > > So to me it's more intuitive either if the effective field comes later, > or alternatively if there's something to indicate that overlay is not > the main field. E.g., by using parentheses: > > Thread 1: effective permissions: r-- (overlay: r--) > > Also, as seen above I think it's clearer if the word "permissions" is > added. I think parentheses and another "permissions" word repeated on every line will only waste horizontal space. The format of output will be documented of anyone is unsure what those symbols mean. > > The look-up of those overlay permissions is platform-specific). > > Considering that there are differences in how protection keys are > implemented in different architectures (e.g., IIUC only Arm has overlay > permissions), the whole "effective: r-- overlay: r--" part of the line > should be printed by a gdbarch hook. > > > If no protection key support exists on the target, the PKey column would not be printed. > > Same for the threads' permissions (effective and overlay). > > Also even if protection key support is available, if there's no > protection key set for any mapping then the column shouldn't be printed > either. Or is there always a key associated with every mapping? I think the column should be just empty or have some placeholder like a hyphen when mapping is not associated with a pkey. > > > Does this approach look fine to you ? > > Yes, I like it. > > > Does it overload the view ? > > If the additional fields only appear for inferiors actively using > protection keys, I don't think it overloads the view. > > > Should the dumping of effective and overlay permissions be part of a generic or > > platform-specific > > command ? > > Considering that several architectures provide this feature, I think it > should be part of a generic command. I agree. Thanks, Yury