From patchwork Tue Nov 14 19:13:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frank Ch. Eigler" X-Patchwork-Id: 79867 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E7C9138582A0 for ; Tue, 14 Nov 2023 19:13:29 +0000 (GMT) X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from elastic.org (elastic.org [96.126.110.187]) by sourceware.org (Postfix) with ESMTPS id 1A4AA385841B for ; Tue, 14 Nov 2023 19:13:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A4AA385841B Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=elastic.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=elastic.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1A4AA385841B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=96.126.110.187 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699989203; cv=none; b=qq4ftIBdNfM1o6UEWx/c9FDhcyqGEoCuAGLGXFyJgPkRbSaPyT7bRTu2YGcz8FYYw2ZgJEY85i2Xy9D7C2LoGtva6GjwsXZjdW9MbOC3OwVID3LZ1bTiWaVFePxYesepYN4j3mB8zFAS/WUFjSUYw+1PmYB9Q7lIYw4jyzIWYck= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699989203; c=relaxed/simple; bh=iQx9iPn10GVvFR+gwEcKlo1DFMRvELfVppIeuCkNCKM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=E8C9N+gzKvSJ2ioYTHlu0OGE0N+tYjEWwL5ZTHn54+FcLUP9d5j4lQ6iuSwpaWi3QVS15IOW/mmF8/NM8zAOWd881/Idpj94wJBgl+uepF3LcB5YId0eqP+PlkKPVZY/uPZV8Xru/Ng3qZtbIsX5Ck5qCKgJf89T2XpD9FtnjrU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=elastic.org ; s=default2; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Uodthxl5w2KJNUBESUsdml55qvKq89szSfjx7oLcve4=; b=ZW6eQxvmY8MuDRdFP86MAN5U24 GYD0UsmKFVG5kA0n1DzTqnhWLC+Lyw/YyfeN0bX4rZyyv1IXVqsNdbnM/wlF8HLy9KQgH0HlHBbgB NFRbxO3N3Y95ZDH12Bgoq0/kF+xHeFRbI99fo5Lh7Xh4FQ1BLdgiuIpItfxeBg9+CD08rYBhBMi1w AWhjKMLaOdt7g7wuIL1XcvLCy6BSpnS6nDfVv/GLr98BV9qU/2Pr1qxCYHaCqdNnTZ4FPrem4bDGN drKV9U6yIuvWcihf2XAKEoXEsHmhaNSOdfRdm3Zq/g0ocR3npMR3Sala4i/pOjJItf/SKbATO24/L CkCkVnmA==; Received: from vpn-home.elastic.org ([10.0.0.2] helo=elastic.org) by elastic.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1r2yqf-00013W-1F for elfutils-devel@sourceware.org; Tue, 14 Nov 2023 19:13:21 +0000 Received: from very.elastic.org ([192.168.1.1]) by elastic.org with esmtp (Exim 4.96.2) (envelope-from ) id 1r2yqe-000KDO-35 for elfutils-devel@sourceware.org; Tue, 14 Nov 2023 14:13:20 -0500 Received: from fche by very.elastic.org with local (Exim 4.96.1) (envelope-from ) id 1r2yqe-007PfI-2t for elfutils-devel@sourceware.org; Tue, 14 Nov 2023 14:13:20 -0500 Date: Tue, 14 Nov 2023 14:13:20 -0500 From: "Frank Ch. Eigler" To: elfutils-devel@sourceware.org Subject: [patch] debuginfod.8 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Sender-Verification: "" X-Spam-Status: No, score=-107.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, USER_IN_WELCOMELIST, USER_IN_WHITELIST autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org commit 06e0aacb4b288403bd02a0820dd0f87c7f017a2b (HEAD -> master) Author: Frank Ch. Eigler Date: Tue Nov 14 14:09:40 2023 -0500 doc/debuginfod.8: clarify source file handling Added text about the archive common-prefix heuristic, mentioned the new eu-srcfiles tool, and gave some extra debian advice. Signed-off-by: Frank Ch. Eigler diff --git a/doc/debuginfod.8 b/doc/debuginfod.8 index 4f1f04b386bd..d79a193c8d9e 100644 --- a/doc/debuginfod.8 +++ b/doc/debuginfod.8 @@ -48,16 +48,10 @@ file. Source files are matched with DWARF files based on the source files listed in the DWARF may be a path \fIanywhere\fP in the file system, and debuginfod will readily serve their content on demand. (Imagine a doctored DWARF file that lists \fI/etc/passwd\fP -as a source file.) If this is a concern, audit your binaries with -tools such as: +as a source file.) If this is a concern, audit your binaries: .SAMPLE -% eu-readelf -wline BINARY | sed -n '/^Directory.table/,/^File.name.table/p' -or -% eu-readelf -wline BINARY | sed -n '/^Directory.table/,/^Line.number/p' -or even use debuginfod itself: -% debuginfod -vvv -d :memory: -F BINARY 2>&1 | grep 'recorded.*source' -^C +% eu-srcfiles -e BINARY .ESAMPLE If any of the \fB\-R\fP, \fB-U\fP, or \fB-Z\fP options is given, each @@ -65,12 +59,17 @@ file is scanned as an archive file that may contain ELF/DWARF/source files. Archive files are recognized by extension. If \-R is given, ".rpm" files are scanned; if \-U is given, ".deb" and ".ddeb" files are scanned; if \-Z is given, the listed extensions are scanned. -Because of complications such as DWZ-compressed debuginfo, may require -\fItwo\fP traversal passes to identify all source code. Source files -for RPMs are only served from other RPMs, so the caution for \-F does -not apply. Note that due to Debian/Ubuntu packaging policies & -mechanisms, debuginfod cannot resolve source files for DEB/DDEB at -all. + +Because of complications such as DWZ-compressed debuginfo, it may +require \fItwo\fP traversal passes to identify all source code. +Source files for binaries in archives are only served from archives, +so the caution for \-F does not apply. If the same source file may be +found in multiple different archives, a heuristic chooses the one +closest to the archive holding the debuginfo. ("closest" means +"longest common archive name prefix"). Note that due to Debian/Ubuntu +packaging policies & mechanisms, debuginfod cannot resolve source +files for DEB/DDEB at all. Consider using the +\-\-disable\-source\-scan option. If no PATH is listed, or none of the scanning options is given, then \fBdebuginfod\fP will simply serve content that it accumulated into