From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Q0HZD9nbDGKpLgAAWB0awg (envelope-from ) for ; Wed, 16 Feb 2022 06:11:21 -0500 Received: by simark.ca (Postfix, from userid 112) id 2F3D41F3C9; Wed, 16 Feb 2022 06:11:21 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 49C0E1F0BB for ; Wed, 16 Feb 2022 06:11:20 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62A53385803D for ; Wed, 16 Feb 2022 11:11:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62A53385803D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1645009879; bh=lLTKh4VDUdX3Zs60XWWJHRtC0wybNJ4TcToM28cPWLg=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ncdiJkALJph5pL09ZSqwSY/JJnlYOBLamuU+SLn9DqO8lGRtYiWDc+XR/UXJNrmez CuEikb1wmrb764Ug6E4g6lDtcTCY1T2iuD8UXQoOb3h7A9dzm3arQHzxFIIYESjC1F p4R1KQMArvc97jH0z7T5d9CH2QKEvYO4NoGxnykk= Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by sourceware.org (Postfix) with ESMTPS id DB7953858D3C for ; Wed, 16 Feb 2022 11:10:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DB7953858D3C X-IronPort-AV: E=McAfee;i="6200,9189,10259"; a="250318758" X-IronPort-AV: E=Sophos;i="5.88,373,1635231600"; d="scan'208";a="250318758" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 03:10:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,373,1635231600"; d="scan'208";a="625341625" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by FMSMGA003.fm.intel.com with ESMTP; 16 Feb 2022 03:10:56 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 16 Feb 2022 03:10:55 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 16 Feb 2022 03:10:55 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 16 Feb 2022 03:10:55 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.170) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 16 Feb 2022 03:10:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cRG3C6HqtZuDL95bTowKyNUiCaDHVQb4HDlj03sMnolMcH8Bmys3YqtVmWKmM5ztaL/tvP6v3RIcV2M2dVoUl8QO7NniB//UbCi5OIsMUOXi+nDYW/lObolZcsq8hppC3S1P/A45oKjfqM7vsrwY1wOMD2WXFv6hxBPkvPNPMBqgBIOAkH7C/n/Hlu1wLOTq1sEVRz+I/raCWM1QeudxlrXFaJ84IeYFf8ZnO8nHG3xGNeSLLdiXu4o3jNJwWJz0LYKrhOgZ96USE3Uz1nRBySM7HqvTOwI657FhG8jXgwwZzReTTQmS7hmVjcsZzKULbWmwwI6VN3pIONtHNeNSSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=7a9wNO1v36+D8hvP+kGNRcSZtA9UoxEey6tMwEnPRM0=; b=bqNR3FGbBWfFNz0pXmz0Aq/tjr5bF+XpcGdOi3T8hVTix9YWsualfFA7SQhW0B4y7i2WLpM8lg1psQ5r3YSq2P/mqwoPBG3nrXR513XfLKI5Q3z3WY3Y62OaxnBb33mRIB3Tq97Fz+rUNYku3t0dKKX0vYkuWITNVUVFW3U2K3afe/mrhGTxui5f1FrCH71iBvJODjSTMiYysuqANLPu9+jJnqUIReeMZID5hNQVXaeKQb9C6ju/IWCH/MnlKoaKjAomzKsarCbsUDqpgMgWR4+krd13SPkXraL7jP/B11d/pRYLGv7v7CpA1xOyDA1tqhXWMOPKazHqEyz5XtJ6Ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM8PR11MB5749.namprd11.prod.outlook.com (2603:10b6:8:10::15) by CO1PR11MB5105.namprd11.prod.outlook.com (2603:10b6:303:9f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.15; Wed, 16 Feb 2022 11:10:53 +0000 Received: from DM8PR11MB5749.namprd11.prod.outlook.com ([fe80::8072:5ca1:297a:f7f9]) by DM8PR11MB5749.namprd11.prod.outlook.com ([fe80::8072:5ca1:297a:f7f9%3]) with mapi id 15.20.4975.017; Wed, 16 Feb 2022 11:10:53 +0000 To: Kevin Buettner Subject: RE: [PATCH v3] Support glibc multiple namespace extension Thread-Topic: [PATCH v3] Support glibc multiple namespace extension Thread-Index: AQHXt841fh++1mKyOUOwLwh6jA+2FKyONpeAgACJUSA= Date: Wed, 16 Feb 2022 11:10:53 +0000 Message-ID: References: <20220210160823.35a8508e@f35-zws-1> In-Reply-To: <20220210160823.35a8508e@f35-zws-1> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f21579f6-d159-42d6-b118-08d9f13cff4a x-ms-traffictypediagnostic: CO1PR11MB5105:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:747; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Pq3cIq6aBmsCZGMFi/XU7w6naF4DM1D2/91bY/RdY6Fq/o3tuw7lM5uDIG44zmD33XDM6V9JoBac6xX7ddA9WFjHjTh38EN795OLIHGI8cY6P7RPfglWHw/H4MQTFuEu7YEg4oQyJnpqn4zHSOKqCCXy3gYAx/FomG/lNzzFaNpkdXiHSPljo6GXpOgrfzvwZyFqrpul7LDzYYrPqwWvrD5u1e76vNBvHk6TrTj/kyRLLzrqE01rDrstvLBMnCJPyiuPFas2Ck9wxk1WdtYurqx/ETOlGeMj4Gj8t0cPvK5Y+FQoLk3mJVHbnGBgs8xZYba8UTN4YAtHrgJXKuN4+oi9pUNdig3RbbWDeimnh9je4tI94P7q6zn/jkG6G5puWEvTlvPOIjIlV6SDVknAR4oyJ92bcPzcJEluoGFm1RzUqNs49+mBylT6FqbPvg5LsKvBtd3Aun0+5LMVTyCslm33/lGXLp7kwjD7oYOEVv439sU6UgbVQS9mxCfpXUPBJ/lp+fy2cZ764Tg48HuTiTF/LLFM83aqKob5sbFF40tr/cVhUm6Q5niiKKEZ7SaRWwCxOuLEfBkhCijiIpJ0We+/dmcJowZfJOiJHwUIYDv1RY5j8YJkBfyJSrKBx4TEoeEpX+9plqyGLAZLBgOyQy9YsgE/8SbwdgA5P2WgKJUrl7hZgFLoP2eunIMHx2wuNCLLTJY2tqF2mcgnFc8Cz8VWx/V/DToHMtiA8hPRUYcj8pvVRHjzjQsHpsLJJO/hcIABqWLTkDgTwD3pj1dPamp6wVQZIPLaFD+5A6fTZ5Kqboj570E1XXFiChd3W12613D0JDIiY/8q02DspGQsJA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5749.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(122000001)(6506007)(55016003)(7696005)(52536014)(26005)(9686003)(38070700005)(966005)(71200400001)(38100700002)(508600001)(33656002)(186003)(4326008)(83380400001)(82960400001)(86362001)(2906002)(8676002)(316002)(76116006)(8936002)(66946007)(66476007)(64756008)(66556008)(66446008)(6916009)(54906003)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/tXJ2ndmTrXZziVh6aRtJYBoksfLXDeHRDZRVq5h5iktxV+qvmV6IX0P0Haq?= =?us-ascii?Q?Y9PCd+OMAjgjsPku6Z6hN4Bl9mgN4zOC5q7KfbTdhA/rd8nk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D+AYBLKPhEZ5kjIbyvy7wcbpF5onrWs0AXuLmP2TrmIXo0jSqi?= =?us-ascii?Q?KhI38E7n6IkdgCDMy/1upU6bG0Rvx4pjXGspNPB2L7CXiTqrg+h3rJVeAAhr?= =?us-ascii?Q?WJ+yTRcFbdQlvwAjtcZImtnKrbaQlQgl2i8SAFLF18Xn/0NejacULTkXjPf9?= =?us-ascii?Q?LiAgTQ3/fu9L8sLaFvOPvnYpyK7QWJHxHKiHxxsXx9I5T4p59cUNh5kjMfAU?= =?us-ascii?Q?SXVTFQuicF09kkRl5Sr8gLv1MXqz5ebVhLCX4eTArLfLQUqWBfzFhzptQhkj?= =?us-ascii?Q?+KFzExKXR1MXqWj25pDRmOPoL2kAy70IyH2M2vhY4V6hiAmbWEzCWamGH6uY?= =?us-ascii?Q?n14w/J32Cbj/JVdt3dIrjtvvx9+nWgLZU7cFrBFXNdWx2RdHFJd1SyJP7vZs?= =?us-ascii?Q?3fPHQo0Cj94fq42wkovh0S7Tl+Z9os1FHsU0tb7H4Aw2MRPKxm6VN+a3WE2x?= =?us-ascii?Q?dZ1X25b9OTTIqFZ3A3X3WHukPu96HzIhPHqeiv1LcLemKGjJ6B/JYNTAmPK/?= =?us-ascii?Q?v84hkVqDrfg07oKStBQFjej/1/yMqo7ktDCHjZwDkzG9DQfLVkqg18QOqbpP?= =?us-ascii?Q?niCyj4mf+suSXZX+/gFgEKflF+hsgAOOjPQ6mm3mmtCJgRdbFK+V+Qm4fLvc?= =?us-ascii?Q?349daJx36AIrITnZdyO5LQhCeenxmusoKdifua8jIRgnsdnIJYEr+ph93j6E?= =?us-ascii?Q?qG7SZw=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5749.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f21579f6-d159-42d6-b118-08d9f13cff4a X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Feb 2022 11:10:53.2115 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FwjvseJ1gTiCIhKUuZcc4jEFYKWYKbvWjrRuzH1Ofsow8vgI+ax0WXk2KSc4PD1GpQMBiQnfZTW/pOUPIIdPEJRepBJ+oVRAOpylciEzhhk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5105 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Metzger, Markus T via Gdb-patches" Reply-To: "Metzger, Markus T" Cc: "H.J. Lu via Gdb-patches" Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hello Kevin, There's a newer version of this patch https://sourceware.org/pipermail/gdb-patches/2021-November/183498.html that already addresses the style concerns you raise. >> @@ -1727,8 +1771,15 @@ solist_update_incremental (struct svr4_info *info, >CORE_ADDR lm) >> for (tail =3D info->solib_list; tail->next !=3D NULL; tail =3D tail->= next) >> /* Nothing. */; >> >> - lm_info_svr4 *li =3D (lm_info_svr4 *) tail->lm_info; >> - prev_lm =3D li->lm_addr; >> + /* Don't check shared libraries in other namespaces when updating >> + shared libraries in a new namespace. */ > >Shared libraries in other namespaces aren't being neglected though, >right? They're not, but this code ... /* Walk to the end of the list. */ for (tail =3D info->solib_list; tail->next !=3D NULL; tail =3D tail->next) /* Nothing. */; /* Don't check shared libraries in other namespaces when updating shared libraries in a new namespace. */ if (debug_base =3D=3D info->debug_base) { lm_info_svr4 *li =3D (lm_info_svr4 *) tail->lm_info; prev_lm =3D li->lm_addr; } else prev_lm =3D 0; ... looks a bit odd to me. We're adding to the same solib_list, yet we use different prev_lm. Let me look into this some more. Regards, Markus. >-----Original Message----- >From: Kevin Buettner >Sent: Friday, February 11, 2022 12:08 AM >To: H.J. Lu via Gdb-patches >Cc: H.J. Lu ; Metzger, Markus T > >Subject: Re: [PATCH v3] Support glibc multiple namespace extension > >Hi H.J., > >This work looks pretty good to me. I found a couple of coding style nits >and have a question/request; see below. > >On Sat, 2 Oct 2021 13:43:40 -0700 >"H.J. Lu via Gdb-patches" wrote: > >[...] >> diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c >> index 3de1bb9c7f7..9d851ba8930 100644 >> --- a/gdb/solib-svr4.c >> +++ b/gdb/solib-svr4.c >[...] >> @@ -1335,6 +1366,18 @@ svr4_current_sos_direct (struct svr4_info *info) >> if (lm) >> svr4_read_so_list (info, lm, 0, &link_ptr, 0); >> >> + /* Get the next namespace from the r_next field. */ >> + lm =3D solib_svr4_r_next (info->debug_base); >> + while (lm) > >Due to the GDB coding standard, this test needs to be turned into an >explicit comparison against 0. See: > >https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding- >Standards#Comparison_With_nullptr_And_Zero > >(FWIW, I don't really like this part of our standard; I personally >find it more readable to code it the way that you did. Also, I do >realize that there are existing implicit tests against 0 in this file >and elsewhere and that they do not conform to GDB's current coding >standard. I'm in no hurry to fix them - but, obviously, I won't >object if someone does.) > >> + { >> + /* Get the link map in this namespace. */ >> + CORE_ADDR link_map =3D solib_svr4_r_map (lm); >> + if (link_map) > >Likewise, for the check above. > >> + svr4_read_so_list (info, link_map, 0, &link_ptr, 0); >> + /* Go to the next namespace. */ >> + lm =3D solib_svr4_r_next (lm); >> + } >> + >> cleanup.release (); >> >> if (head =3D=3D NULL) >> @@ -1706,7 +1749,8 @@ solist_update_full (struct svr4_info *info) >> failure. */ >> >> static int >> -solist_update_incremental (struct svr4_info *info, CORE_ADDR lm) >> +solist_update_incremental (struct svr4_info *info, CORE_ADDR debug_base, >> + CORE_ADDR lm) >> { >> struct so_list *tail; >> CORE_ADDR prev_lm; >> @@ -1727,8 +1771,15 @@ solist_update_incremental (struct svr4_info *info, >CORE_ADDR lm) >> for (tail =3D info->solib_list; tail->next !=3D NULL; tail =3D tail->= next) >> /* Nothing. */; >> >> - lm_info_svr4 *li =3D (lm_info_svr4 *) tail->lm_info; >> - prev_lm =3D li->lm_addr; >> + /* Don't check shared libraries in other namespaces when updating >> + shared libraries in a new namespace. */ > >Shared libraries in other namespaces aren't being neglected though, >right? > >Assuming that's true, could you add a sentence or two to your comment >addressing this concern? > >Kevin Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928