From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8Z98DNcfm2rVXykAWB0awg (envelope-from ) for ; Fri, 04 Sep 2026 15:45:27 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=ROfDDCa/; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TYKzP0DH; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=dxBbvzxy; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=AGPbEVAt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2D3331E033; Fri, 04 Sep 2026 15:45:27 -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 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 1A3451E033 for ; Fri, 04 Sep 2026 15:45:26 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 95D9E4BB58A5 for ; Fri, 4 Sep 2026 19:45:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95D9E4BB58A5 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=ROfDDCa/; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TYKzP0DH; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=dxBbvzxy; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=AGPbEVAt Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id D9E304BA23F9 for ; Fri, 4 Sep 2026 19:45:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9E304BA23F9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D9E304BA23F9 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788551101; cv=none; b=R/3lkQaoAEtMTOQA2taR6FSGlpkdeKayqWPTs4+/E7rbLvJiWA10z0XqFKyuZxdchhtQ6CkngPV98g/bJZxpgUDHaURm9SfqcbUYBT4/iSYIGUDYoGWGLWOOyYJyHrSSx1N3zmaqZdZS8I80RkmgFwrNep+/wxygXaGS9ceJPog= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788551101; c=relaxed/simple; bh=aNys+LcMWZuShoiakmz6Nh3OKRxgzPEJiXERaacIZG0=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:From:Subject:To; b=oUfyo2QlVjQn9oBySEXg/b1Z5jGZ2oZu3jbGo4GDR3gCzkB8K6HEqeGVUuO/fiaPTzh0VsrSdIgXSP/CZUZwF67PicTQ+SE8/VBPGvaiZRl6qh4LSqK6NfYo5MG4dsbKQy1eLmbWWbJfd1C1nMjn0xKbGmpZr1w153UE7DreKcM= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=ROfDDCa/; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TYKzP0DH; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=dxBbvzxy; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=AGPbEVAt DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9E304BA23F9 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A612820419; Fri, 4 Sep 2026 19:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1788551095; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wfGw2cOfotSfFA4qUdHW5xMDWrXNX7PDhXkuHGt22Go=; b=ROfDDCa/5x7Gmi3o3AixDJ+J++Ea0Av2c+qiPPWGdmCbYzyFP9ER0llna1krJtTbcBfU95 oxCUXnX7zyKtHoO+UVTyMP4fWEw69IqLoKZ3gQSZHVn53bWAIbzixfRev9vKXGl5l0n6Y8 TfmFxaSlytj05bM4HEtIFCa4H9ni9fI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1788551095; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wfGw2cOfotSfFA4qUdHW5xMDWrXNX7PDhXkuHGt22Go=; b=TYKzP0DHb1Cgy+kPryYs1HEre6E1gUddb4lqpqOgmjk+LBNEVHpsa3g1ggLvgDUSPx5kE9 a96nWNabvMoWSQBQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1788551091; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wfGw2cOfotSfFA4qUdHW5xMDWrXNX7PDhXkuHGt22Go=; b=dxBbvzxyGG9/Q7HcvYCjcI0hpeIAjInrbceJLTpGXbUdZhpXx+Fc39cv2pHekThAWsvQbv cuOqmMeUVKAz941gbt19U4LJ/q0KB+A3BDzAInbAcfqFJLsziomAw5BxMmGzC9dXou2k6M dvalQMNKidziYzSo6SKXJGoIt5v6pmQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1788551091; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wfGw2cOfotSfFA4qUdHW5xMDWrXNX7PDhXkuHGt22Go=; b=AGPbEVAtV2wePzdIgkXdYOUryhQJFmsXcNS9HXF9wAG5Aatj9d/H6YNEohF9V3v+8q2fHu UgELelqHaffjCXCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 57F9513678; Fri, 4 Sep 2026 19:44:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id zk+TE7Mfm2rABgAAD6G6ig (envelope-from ); Fri, 04 Sep 2026 19:44:51 +0000 Message-ID: <1b400ad2-969c-44e8-82cd-e0738a82a3d6@suse.de> Date: Fri, 4 Sep 2026 21:44:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Tom de Vries Subject: Re: [RFC] [gdb] Work around zero l_addr/l_ld To: Andrew Burgess , gdb-patches@sourceware.org References: <20260818071434.2121734-1-tdevries@suse.de> <87ecf9rwq1.fsf@redhat.com> Content-Language: en-US In-Reply-To: <87ecf9rwq1.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.996]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, almalinux.org:url, suse.de:mid, suse.de:email] 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 9/4/26 3:07 PM, Andrew Burgess wrote: > Tom de Vries writes: > >> On ppc64le-linux (AlmaLinux 9.8), I run into: >> ... >> FAIL: gdb.mi/mi-dlmopen.exp: still-in-use fields were all correct >> ... >> >> While investigating this, I stumbled on this warning emitted during the >> calculation of allow_dlmopen_tests: >> ... >> (gdb) run ^M >> Starting program: allow_dlmopen_tests.x ^M >> [Thread debugging using libthread_db enabled]^M >> Using host libthread_db library "/lib64/libthread_db.so.1".^M >> warning: .dynamic section for "/lib64/ld64.so.2" is not at the expected \ >> address (wrong library or version mismatch?)^M >> dlmopen debug supported.^M >> ... >> >> The warning is mentioned in this glibc commit 88361b408b: >> ... >> elf: Copy l_addr/l_ld when adding ld.so to a new namespace >> >> When add ld.so to a new namespace, we don't actually load ld.so. We >> create a new link map and refers the real one for almost everything. >> Copy l_addr and l_ld from the real ld.so link map to avoid GDB warning: >> >> warning: .dynamic section for ".../elf/ld-linux-x86-64.so.2" is not at \ >> the expected address (wrong library or version mismatch?) >> >> when handling shared library loaded by dlmopen. >> ... >> >> So, AFAICT the setup is: >> - the glibc package is based on v2.34 >> - it contains a backport of commit a93d9e03a3 ("Extend struct r_debug to >> support multiple namespaces [BZ #15971]") >> - it doesn't contain a backport of commit 88361b408b ("elf: Copy l_addr/l_ld >> when adding ld.so to a new namespace") >> - both commits are part of v2.35 >> >> What happens is: >> - when probing for l_addr and l_ld in svr4_solib_ops::read_lm_info, both get >> the value 0 >> - in svr4_solib_ops::lm_addr_check, the 0 value propagates to l_dynaddr, and >> "l_addr = l_dynaddr - dynaddr" then underflows, and things go downhill from >> there, resulting in the warning and eventually the FAIL. >> >> Fix this by replicating the missing glibc commit in >> svr4_solib_ops::read_lm_info. >> >> I've enabled the fix only for the configuration I can test, for all others I >> disabled it using "lmo.l_real_offset = -1". >> >> This is an RFC. My question is: is the added complexity worth the trouble for >> what looks like a cornercase? > > My take on this would be no, it's not worth the complexity. It sounds > like the problem is caused by a glibc that has back-ported one part of a > fix, but missed the second part. I would suggest that a better solution > would be to raise a bug against the downstream glibc port and get them > to back-port the second part of the fix (commit 88361b408b). Hi Andrew, thanks for the review. Your reasoning makes sense, and I can live with it. I've submitted a bug ( https://bugs.almalinux.org/view.php?id=667 ). Thanks, - Tom