Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp870609iog; Mon, 13 Jun 2022 14:59:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vN8/sU939qTX3xzJZS/CTwVvrCfZnTHEyVfysN8vhcLL1IANrsvNAU9FiZEHb/juNuVLis X-Received: by 2002:a17:90b:4d05:b0:1e2:bf91:8af2 with SMTP id mw5-20020a17090b4d0500b001e2bf918af2mr867710pjb.210.1655157594657; Mon, 13 Jun 2022 14:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655157594; cv=none; d=google.com; s=arc-20160816; b=rcO5j9nHHiAKa9gq+BAwRIV5Q8uA2y+ZdLnuT1h3OcuTcLb5aielDZBLS08maOgcZV +91J+6m9BsOPGuYK0nWhAkCI0ygEVtu8nD1Jw8UvNFgidhM2YRjuZdNQblySLNKVoNTY 2iudz3x3ycy2apTKan458YQETXo3IvLipn3E8zu/0P+GOAoOWaWA3fjaQUc2k4Ww8DjF Dm3tyKn7UsYI5+zkj6krYLc0KJOcfkffgVuFf2PZjaHSW2MZGKO4uM9MuHwXN/Tc4oAY op5QtAGCgfWVSs5R+36MYELhmprau9U0kTDvs0huUGmsgisSod28n9b4663ms3yuzDi6 maXg== 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 :dkim-signature; bh=bxgmQMSd9h2I/ZJP96bNaqwZiguF4gJuqAJIQZlZQnM=; b=VHo2i2fxLF9XVSeQHmdfDndQV/4cSNZ7PZWS/Z02/bTyvkwFAEOY38Ox+bs+oAeC8x qvx6ASaQLiQnpZ8HqweVx3Hzx8KT7jxej/wr1NSlDsL5/y9QUu7N0eiqXYrTc6zi5o5s cdr31MD3MdYeOc1UB9xpk3wmFJww04JZDDeZDNkDozN9fCWLhR0z790UzjpIUAOf62+8 8dlhif6m3AdGgx0Jg6kn6zuQiDhzi/vQ4YVGccdNfeFyhCFPIJxf7kQjhyxBmHt5rpOz Llsiws7tZ9dMei5vUZ8EoDxY/Q9t62402vJU0pSCvPdqOro33nw4YrHk8Fu+EsmH4kTS a3wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=ZZiNsJrR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a634a43000000b003fcda8035e6si10114851pgl.263.2022.06.13.14.59.43; Mon, 13 Jun 2022 14:59:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=ZZiNsJrR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352437AbiFMVbi (ORCPT + 99 others); Mon, 13 Jun 2022 17:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353230AbiFMV33 (ORCPT ); Mon, 13 Jun 2022 17:29:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2293BB9F for ; Mon, 13 Jun 2022 14:26:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CA6FBB815A6 for ; Mon, 13 Jun 2022 21:26:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A908C3411C; Mon, 13 Jun 2022 21:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1655155570; bh=ZiPSlVmPdSZv7W3M0Gh742ofWTqMrSKr8lBpme/zFfw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZZiNsJrRHxvmqrf7NM63ryJlMGQiaqpdR10zxOX6IMMmoJAjISs0HoDA8skjf+NbA nznY8vvRKzm7qH1srbvcXTZ0wcSy6sf11tALSEEAtCg1fnV7eKwGEGUepJei5mt8EU l52aGRpE4AJRcrW8Wclmhq4lhokM6VjCZH3J9OH8= Date: Mon, 13 Jun 2022 14:26:09 -0700 From: Andrew Morton To: Stephen Brennan Cc: Baoquan He , linux-kernel@vger.kernel.org, kexec@lists.infradead.org, Nick Desaulniers , Dave Young , Kees Cook , Jiri Olsa , Stephen Boyd , Bixuan Cui , David Vernet , Vivek Goyal , Sami Tolvanen Subject: Re: [PATCH 0/2] Expose kallsyms data in vmcoreinfo note Message-Id: <20220613142609.3e4be0f2f45671341450232d@linux-foundation.org> In-Reply-To: <20220517000508.777145-1-stephen.s.brennan@oracle.com> References: <20220517000508.777145-1-stephen.s.brennan@oracle.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 May 2022 17:05:06 -0700 Stephen Brennan wrote: > The kernel can be configured to contain a lot of introspection or > debugging information built-in, such as ORC for unwinding stack traces, > BTF for type information, and of course kallsyms. Debuggers could use > this information to navigate a core dump or live system, but they need > to be able to find it. > > This patch series adds the necessary symbols into vmcoreinfo, which > would allow a debugger to find and interpret the kallsyms table. Using > the kallsyms data, the debugger can then lookup any symbol, allowing it > to find ORC, BTF, or any other useful data. > > This would allow a live kernel, or core dump, to be debugged without > any DWARF debuginfo. This is useful for many cases: the debuginfo may > not have been generated, or you may not want to deploy the large files > everywhere you need them. Am trying to understand the value of all of this. Can you explain further why carrying the dwarf info is problematic? How problematic are these large files? > I've demonstrated a proof of concept for this at LSF/MM+BPF during a > lighting talk. Using a work-in-progress branch of the drgn debugger, and > an extended set of BTF generated by a patched version of dwarves, I've > been able to open a core dump without any DWARF info and do basic tasks > such as enumerating slab caches, block devices, tasks, and doing > backtraces. I hope this series can be a first step toward a new > possibility of "DWARFless debugging". > > Related discussion around the BTF side of this: > https://lore.kernel.org/bpf/586a6288-704a-f7a7-b256-e18a675927df@oracle.com/T/#u > > Some work-in-progress branches using this feature: > https://github.com/brenns10/dwarves/tree/remove_percpu_restriction_1 > https://github.com/brenns10/drgn/tree/kallsyms_plus_btf What's the story on using gdb with this?