Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1599703pxb; Thu, 4 Mar 2021 15:59:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOS/rwcfTQJ8mBl1AaAsyswvQXlO4ViwiJbDNM/mYCalaKnOQ0G5m473dqWGj8SC2m4a5Y X-Received: by 2002:a5d:9d01:: with SMTP id j1mr5745776ioj.195.1614902370763; Thu, 04 Mar 2021 15:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614902370; cv=none; d=google.com; s=arc-20160816; b=tlqEUt23wF1UbzGU6eWDymCbGyz0QiQXKAU0FqK4BtdfH3026dFkkF9wr9IFxjLXRV PpUM0EgGmIsOpmNFFWpPjr0xRjBSpV/uUUxyqQAFOeyKvM0/WfOVbTtf6Dvm1KxaNwMN us8BDXRFJGhrvyPxuIZ2ogpec12lZdLJ8REJh5e1DEFmyCYJmw2oXFQG8hYRwiuMeorN QanII6I6FXU7fxWhiTPcM9xaURnkXg8GW8lpOveFA/KwG9flHU9xwnBw4DaOKisMfVzP 6LONaY3UYeAb/D2wQ4iMQeXZK+BZvkXPdnrhWvR/Eexqtt8ceFN5ev3OhuhA3RPtETKl cYEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=YI80iVItPuqiQ+L+FaKLcJp1wRIESFyq/zSLTwQKlog=; b=pkkdLRDUd2dcqNfYYNmKzEYzHBwhAg9FPkwPAB7AafnCDrvnQspm1sChTWQaDBM6OS BSF+WRn+oevjo4P1cIt4B/tTcdC5LAjxj5WV/J/J98eAY7WiUWYS/sav2xrGJEZd0TLF 0sJV3CywDLisVyK7ejKL+uOC2cH1dNxV7OdJjzyozL579qMNBKyHuzWZeeDHiFTwUWLA 3Xbf8GNdylNtEtaVFBcxyuKO0n49Luwk1QtTs1n5iI8aRjOazuRlxsvj/Pw+lqbfd4S2 h97O5wijVy6oEjooAAtc6okG/q56LunUXGToBnOM2h5TU0A88qIeIKwc9nZ2LFwPlIXo ScYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si837495jao.12.2021.03.04.15.59.18; Thu, 04 Mar 2021 15:59:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233917AbhCDBVE convert rfc822-to-8bit (ORCPT + 99 others); Wed, 3 Mar 2021 20:21:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:52566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235168AbhCDBUS (ORCPT ); Wed, 3 Mar 2021 20:20:18 -0500 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 44B8064EEF; Thu, 4 Mar 2021 01:19:34 +0000 (UTC) Date: Wed, 3 Mar 2021 20:19:32 -0500 From: Steven Rostedt To: Stephen Boyd Cc: Andy Shevchenko , Petr Mladek , Andrew Morton , linux-kernel@vger.kernel.org, Jiri Olsa , Alexei Starovoitov , Jessica Yu , Evan Green , Hsin-Yi Wang , Sergey Senozhatsky , Rasmus Villemoes , linux-doc@vger.kernel.org Subject: Re: [PATCH 5/7] printk: Make %pS and friends print module build ID Message-ID: <20210303201932.7ac93f12@oasis.local.home> In-Reply-To: <161481830876.1478170.4374239517736205573@swboyd.mtv.corp.google.com> References: <20210301174749.1269154-1-swboyd@chromium.org> <20210301174749.1269154-6-swboyd@chromium.org> <20210303100012.0e6e4de3@gandalf.local.home> <161481830876.1478170.4374239517736205573@swboyd.mtv.corp.google.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 03 Mar 2021 16:38:28 -0800 Stephen Boyd wrote: > I'm starting to feel like nobody read the commit text, or I messed up > somehow and the commit text was confusing? :( > I read it, I'm just unfamiliar with it. I don't use pstore, and I'm not sure what "crashdump" is. Do you mean the kexec/kdump? in which case you can retrieve data within the kernel quite easily. I haven't used debuginfod (never heard of it before actually). > │ This is especially helpful for crash debugging with pstore or crashdump > │ kernels. If we have the build ID for the module in the stacktrace we can > │ request the debug symbols for the module from a remote debuginfod server > │ or parse stacktraces at a later time with decode_stacktrace.sh by > │ downloading the correct symbols based on the build ID. This cuts down on > │ the amount of time and effort needed to find the correct kernel modules > │ for a stacktrace by encoding that information into it. Are you saying it's common to have modules from different builds? > > In some distro (read: non-kernel dev) workflows the vmlinux isn't > shipped on the device and crash handling is done offline or much later. > Using the build ID[1] is a common way to identify the binary that's > running on the device. In conjunction with a debuginfod[2] server you > can download the symbols for a crash automatically if you have the build > ID information. > > I can add a patch that updates decode_stacktrace.sh to show how it can > download the correct vmlinux/modules if it isn't provided on the > commandline. Are you just trying to match modules with the builds that they were created with? > > If the debug symbols are on some public server then in theory we could > have some robot sitting on the mailing list that looks for stacktraces > and automatically replies with information about the line number/file > and even provides the code snippet for the code that's crashing from > that binary, because it's all stored in the full debuginfo builds. Again, I have no idea how buildids are created or what they are used for. This is the first time I've even heard about them. I'm all for helping other people out to make their workflow easier, if it doesn't make a mess for everyone else. -- Steve