From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6tEcEWo6SWgyYAkAWB0awg (envelope-from ) for ; Wed, 11 Jun 2025 04:12:26 -0400 Received: by simark.ca (Postfix, from userid 112) id 2D4CE1E11C; Wed, 11 Jun 2025 04:12:26 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE 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 1A3741E089 for ; Wed, 11 Jun 2025 04:12:25 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AE7113857C6E for ; Wed, 11 Jun 2025 08:12:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE7113857C6E Received: from mailout1.rbg.tum.de (mailout1.rbg.tum.de [131.159.0.201]) by sourceware.org (Postfix) with ESMTPS id 38B6B3858D20 for ; Wed, 11 Jun 2025 08:11:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 38B6B3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sec.in.tum.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sec.in.tum.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 38B6B3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=131.159.0.201 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749629505; cv=none; b=s+1uYslsCH/0rk2LPrCnLK8AeBO3vcumciKOVCcII8wzYGZQD33oNpLWzSnUGZ4G8hg7bPxTJIzsDCkVWWFd2NIRTvUUFaDcsP3cLHIal5ZueQNFZlkUxEjqtwwAr0OjVrTdChaRbj8h6fDsjLpysvXDA2PjfBMud+0LbmDeh4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749629505; c=relaxed/simple; bh=NaULCWCPGq3etV7LPQi4aohBBTjgStq2sRWTQBHDKKk=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=Jw+0kA4/NkJRGyoO+gjNKXMD9x8ZxmoGsThi/mtCO2C9bbr2mSj0WSFzLs9/EbOq3Z2F/Kz/aPyHg/IGJML6zwZvceqBCu+1yv1vemZBs6I92kgU4ESXohakzaAOrG4NBR4pPZq8FgtvXH7p+0M+G/xmfU0TFo4X0bFZxUAtfE4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38B6B3858D20 Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [IPv6:2a09:80c0:254::14]) by mailout1.rbg.tum.de (Postfix) with ESMTPS id 12FF973; Wed, 11 Jun 2025 10:11:43 +0200 (CEST) Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id 0E0BB46; Wed, 11 Jun 2025 10:11:43 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id B5DE510C; Wed, 11 Jun 2025 10:11:38 +0200 (CEST) Received: from services.sec.in.tum.de (services.sec.in.tum.de [131.159.50.242]) by mailrelay1.rbg.tum.de (Postfix) with ESMTPS id B1E4245; Wed, 11 Jun 2025 10:11:38 +0200 (CEST) Received: from [131.159.219.33] (w219-x-v4.eduroam.dynamic.rbg.tum.de [131.159.219.33]) by services.sec.in.tum.de (Postfix) with ESMTPSA id 97D181002EB7F; Wed, 11 Jun 2025 10:11:38 +0200 (CEST) Message-ID: <85608652-8d05-436b-b099-9ea72247079d@sec.in.tum.de> Date: Wed, 11 Jun 2025 10:11:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2][PR GDB/32956] gdb: query inferior's filesystem for build-id debug files To: Andrew Burgess , gdb-patches@sourceware.org References: <20250511150113.3163767-1-kilger@sec.in.tum.de> <20250511150113.3163767-3-kilger@sec.in.tum.de> <877c27i3zb.fsf@redhat.com> <7cdc3a53-8d09-445f-a017-29084769fb76@sec.in.tum.de> <87ecvshshw.fsf@redhat.com> Content-Language: en-US From: Fabian Kilger Autocrypt: addr=kilger@sec.in.tum.de; keydata= xjMEYHltfxYJKwYBBAHaRw8BAQdA7mzpLUfZIcIiMjdx+GBa8RuqZdMp/MUEpu4PDTb2YwXN JEZhYmlhbiBLaWxnZXIgPGtpbGdlckBzZWMuaW4udHVtLmRlPsKLBBMWCAAzFiEETPRi+vRL aNymGJvYr2lqRpshfmkFAmB5bX8CGwMFCwkIBwIGFQgJCgsCBRYCAwEAAAoJEK9pakabIX5p CzcA/ivCFRRbxJfpiwOzV5CvflcHPNN2LmCxSBlcrBpliBhWAP43PcAtWheftijoLpcwy3nD 0TVTDRrJY/hRkKDbvmrWCM44BGB5bX8SCisGAQQBl1UBBQEBB0BtYlZed2qkwQWmV+MaUhC7 8XgZI0ezLuU2nr8bocqXCAMBCAfCeAQYFggAIBYhBEz0Yvr0S2jcphib2K9pakabIX5pBQJg eW1/AhsMAAoJEK9pakabIX5pUNQA/juajzwCYdtbo+sXQUlZufPiPwLiPr6LuJBNZwL6Olbm AQDvyu6h+X9K2gzgLviiNEmcCAddwynvjXiLt3c+oir7AA== In-Reply-To: <87ecvshshw.fsf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------FXxJ8yp2mrDadAhe7zi2IY0p" 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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------FXxJ8yp2mrDadAhe7zi2IY0p Content-Type: multipart/mixed; boundary="------------yuhGXX3iXjaaRI1t0qObewq0"; protected-headers="v1" From: Fabian Kilger To: Andrew Burgess , gdb-patches@sourceware.org Message-ID: <85608652-8d05-436b-b099-9ea72247079d@sec.in.tum.de> Subject: Re: [PATCH 2/2][PR GDB/32956] gdb: query inferior's filesystem for build-id debug files References: <20250511150113.3163767-1-kilger@sec.in.tum.de> <20250511150113.3163767-3-kilger@sec.in.tum.de> <877c27i3zb.fsf@redhat.com> <7cdc3a53-8d09-445f-a017-29084769fb76@sec.in.tum.de> <87ecvshshw.fsf@redhat.com> In-Reply-To: <87ecvshshw.fsf@redhat.com> --------------yuhGXX3iXjaaRI1t0qObewq0 Content-Type: multipart/mixed; boundary="------------r00gycAzuDepEZ9XAvDCHUG5" --------------r00gycAzuDepEZ9XAvDCHUG5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable No problem, thanks for getting back to me. As a first-time contributor I'm a bit confused about the rules regarding merging and pushing. According to gdb/MAINTAINERS, I should not have write access and need to be first added, correct? And according to https://sourceware.org/gdb/wiki/ContributionChecklist a moderator or maintainer needs to send me a form regarding FSF copyright assignment first. I would appreciate some clarifications/instructions on what to do next. I've also prepared a PATCH v2 for the remaining changes, but wasn't sure about some style points I asked about in: https://inbox.sourceware.org/gdb-patches/06881879-1236-4ad7-b983-c195c1c0= a84a@sec.in.tum.de/ Thanks, Fabian On 6/10/25 11:10, Andrew Burgess wrote: > Fabian Kilger writes: >=20 >> Thanks for approving, I'll add the link to the commit message. >> >> If I merge this ahead of #1, can I leave it out in the v2 patch >> submission, or should it be included for completeness' sake - not sure= >> what is desired. >=20 > Sorry, have been side tracked on other tasks. >=20 > I think you should merge this, and any new iteration would not include > this patch as this would now be part of GDB. >=20 > Thanks, > Andrew >=20 >=20 >=20 >> >> Best, >> Fabian >> >> On 5/23/25 20:20, Andrew Burgess wrote: >>> Fabian Kilger writes: >>> >>>> This fixes a bug related to build-id files with linux namespaces. >>>> Specifically, we expect the debug files to be present inside the con= tainer, >>>> thus the container filesystem should be queried if the program is ru= nning >>>> inside one. >>> >>> You should add a bug link to the end of this commit message, like: >>> >>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D32956 >>> >>> With that added, for this patch: >>> >>> Approved-By: Andrew Burgess >>> >>> You are welcome to merge this ahead of patch #1 if you want, as they = are >>> related, but don't depend on each other. >>> >>> Thanks, >>> Andrew >>> >>> >>> >>>> >>>> --- >>>> gdb/build-id.c | 6 ++++-- >>>> 1 file changed, 4 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/gdb/build-id.c b/gdb/build-id.c >>>> index 43a80dd3978..abbd65a7c12 100644 >>>> --- a/gdb/build-id.c >>>> +++ b/gdb/build-id.c >>>> @@ -29,6 +29,7 @@ >>>> #include "gdbsupport/scoped_fd.h" >>>> #include "debuginfod-support.h" >>>> #include "extension.h" >>>> +#include "inferior.h" >>>> =20 >>>> /* See build-id.h. */ >>>> =20 >>>> @@ -128,7 +129,8 @@ build_id_to_debug_bfd_1 (const std::string &orig= inal_link, >>>> if (supports_target_stat !=3D TRIBOOL_FALSE) >>>> { >>>> struct stat sb; >>>> - int res =3D target_fileio_stat (nullptr, link_on_target, &sb= , >>>> + int res =3D target_fileio_stat (current_inferior (), >>>> + link_on_target, &sb, >>>> &target_errno); >>>> =20 >>>> if (res !=3D 0 && target_errno !=3D FILEIO_ENOSYS) >>>> @@ -157,7 +159,7 @@ build_id_to_debug_bfd_1 (const std::string &orig= inal_link, >>>> the path doesn't exist, but we just assume that anything >>>> other than EINVAL indicates the path doesn't exist. */ >>>> std::optional link_target >>>> - =3D target_fileio_readlink (nullptr, link_on_target, >>>> + =3D target_fileio_readlink (current_inferior (), link_on_target, >>>> &target_errno); >>>> if (link_target.has_value () >>>> || target_errno =3D=3D FILEIO_EINVAL) >>>> --=20 >>>> 2.49.0 >>> >> >> --=20 >> Fabian Kilger, M.Sc. >> Wissenschaftlicher Mitarbeiter >> >> Technische Universit=C3=A4t M=C3=BCnchen >> TUM School of Computation, Information and Technology >> Chair of IT Security >> >> Boltzmannstra=C3=9Fe 3 >> 85748 Garching (bei M=C3=BCnchen) >> >> Tel. +49 (0)89 289-18587 >> Fax +49 (0)89 289-18579 >> >> kilger@sec.in.tum.de >> www.sec.in.tum.de >> -----BEGIN PGP PUBLIC KEY BLOCK----- >> >> xjMEYHltfxYJKwYBBAHaRw8BAQdA7mzpLUfZIcIiMjdx+GBa8RuqZdMp/MUEpu4P >> DTb2YwXNJEZhYmlhbiBLaWxnZXIgPGtpbGdlckBzZWMuaW4udHVtLmRlPsKLBBMW >> CAAzFiEETPRi+vRLaNymGJvYr2lqRpshfmkFAmB5bX8CGwMFCwkIBwIGFQgJCgsC >> BRYCAwEAAAoJEK9pakabIX5pCzcA/ivCFRRbxJfpiwOzV5CvflcHPNN2LmCxSBlc >> rBpliBhWAP43PcAtWheftijoLpcwy3nD0TVTDRrJY/hRkKDbvmrWCM44BGB5bX8S >> CisGAQQBl1UBBQEBB0BtYlZed2qkwQWmV+MaUhC78XgZI0ezLuU2nr8bocqXCAMB >> CAfCeAQYFggAIBYhBEz0Yvr0S2jcphib2K9pakabIX5pBQJgeW1/AhsMAAoJEK9p >> akabIX5pUNQA/juajzwCYdtbo+sXQUlZufPiPwLiPr6LuJBNZwL6OlbmAQDvyu6h >> +X9K2gzgLviiNEmcCAddwynvjXiLt3c+oir7AA=3D=3D >> =3DVdeZ >> -----END PGP PUBLIC KEY BLOCK----- >=20 --=20 Fabian Kilger, M.Sc. Wissenschaftlicher Mitarbeiter Technische Universit=C3=A4t M=C3=BCnchen TUM School of Computation, Information and Technology Chair of IT Security Boltzmannstra=C3=9Fe 3 Raum 01.08.053 85748 Garching (bei M=C3=BCnchen) Tel. +49 (0)89 289-18587 Fax +49 (0)89 289-18579 kilger@sec.in.tum.de www.sec.in.tum.de --------------r00gycAzuDepEZ9XAvDCHUG5 Content-Type: application/pgp-keys; name="OpenPGP_0xAF696A469B217E69.asc" Content-Disposition: attachment; filename="OpenPGP_0xAF696A469B217E69.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xjMEYHltfxYJKwYBBAHaRw8BAQdA7mzpLUfZIcIiMjdx+GBa8RuqZdMp/MUEpu4P DTb2YwXNJEZhYmlhbiBLaWxnZXIgPGtpbGdlckBzZWMuaW4udHVtLmRlPsKLBBMW CAAzFiEETPRi+vRLaNymGJvYr2lqRpshfmkFAmB5bX8CGwMFCwkIBwIGFQgJCgsC BRYCAwEAAAoJEK9pakabIX5pCzcA/ivCFRRbxJfpiwOzV5CvflcHPNN2LmCxSBlc rBpliBhWAP43PcAtWheftijoLpcwy3nD0TVTDRrJY/hRkKDbvmrWCM44BGB5bX8S CisGAQQBl1UBBQEBB0BtYlZed2qkwQWmV+MaUhC78XgZI0ezLuU2nr8bocqXCAMB CAfCeAQYFggAIBYhBEz0Yvr0S2jcphib2K9pakabIX5pBQJgeW1/AhsMAAoJEK9p akabIX5pUNQA/juajzwCYdtbo+sXQUlZufPiPwLiPr6LuJBNZwL6OlbmAQDvyu6h +X9K2gzgLviiNEmcCAddwynvjXiLt3c+oir7AA=3D=3D =3DVdeZ -----END PGP PUBLIC KEY BLOCK----- --------------r00gycAzuDepEZ9XAvDCHUG5-- --------------yuhGXX3iXjaaRI1t0qObewq0-- --------------FXxJ8yp2mrDadAhe7zi2IY0p Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQRM9GL69Eto3KYYm9ivaWpGmyF+aQUCaEk6OgUDAAAAAAAKCRCvaWpGmyF+aTbn AP9ilKW/G0o0Oas3xUKUholONhP9aCd/ubbcDGNBNg49nAEAsqcjiJ2yoEb+hoDRshME/WRcIq4Z EFLzhLz3P+heOgM= =Q7XS -----END PGP SIGNATURE----- --------------FXxJ8yp2mrDadAhe7zi2IY0p--