Linux debuggers
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-debuggers@vger.kernel.org,
	Mike Christie <michael.christie@oracle.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"Christian Brauner (Microsoft)" <brauner@kernel.org>,
	Petr Mladek <pmladek@suse.com>, Marco Elver <elver@google.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Douglas Anderson <dianders@chromium.org>,
	Maninder Singh <maninder1.s@samsung.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Zhen Lei <thunder.leizhen@huawei.com>,
	Kees Cook <keescook@chromium.org>,
	Zhaoyang Huang <zhaoyang.huang@unisoc.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sami Tolvanen <samitolvanen@google.com>
Subject: Re: [PATCH v3 1/1] kernel/config: Introduce CONFIG_DEBUG_INFO_IKCONFIG
Date: Wed, 1 Nov 2023 12:12:52 -0700	[thread overview]
Message-ID: <ZUKjNJBoglBdRJbg@bombadil.infradead.org> (raw)
In-Reply-To: <20231027171756.1241002-2-stephen.s.brennan@oracle.com>

On Fri, Oct 27, 2023 at 10:17:56AM -0700, Stephen Brennan wrote:
> The option CONFIG_IKCONFIG allows the gzip compressed kernel
> configuration to be included into vmlinux or a module. In these cases,
> debuggers can access the config data and use it to adjust their behavior
> according to the configuration. However, distributions rarely enable
> this, likely because it uses a fair bit of kernel memory which cannot be
> swapped out.
> 
> This means that in practice, the kernel configuration is rarely
> available to debuggers.
> 
> So, introduce an alternative, CONFIG_DEBUG_INFO_IKCONFIG. This strategy,
> which is only available if IKCONFIG is not already built-in, adds a
> section ".debug_linux_ikconfig", to the vmlinux ELF. It will be stripped
> out of the final images, but will remain in the debuginfo files. So
> debuggers which rely on vmlinux debuginfo can have access to the kernel
> configuration, without incurring a cost to the kernel at runtime.
> 
> The configuration is enabled whenever DEBUG_INFO=y and IKCONFIG!=y. The
> added section is not large compared to debug info sizes. It won't affect
> the runtime kernel at all, and this default will ensure that
> distributions intending to create useful debuginfo will get this new
> addition for kernel debuggers.
> 
> Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

Although this begs to support something other than old gz in the future.

  Luis

      parent reply	other threads:[~2023-11-01 19:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 17:17 [PATCH v3 0/1] Introduce CONFIG_DEBUG_INFO_IKCONFIG Stephen Brennan
2023-10-27 17:17 ` [PATCH v3 1/1] kernel/config: " Stephen Brennan
2023-10-27 18:20   ` Arnd Bergmann
2023-11-01 19:12   ` Luis Chamberlain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZUKjNJBoglBdRJbg@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=brauner@kernel.org \
    --cc=dianders@chromium.org \
    --cc=elver@google.com \
    --cc=geert+renesas@glider.be \
    --cc=keescook@chromium.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-debuggers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maninder1.s@samsung.com \
    --cc=michael.christie@oracle.com \
    --cc=ndesaulniers@google.com \
    --cc=pmladek@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=samitolvanen@google.com \
    --cc=stephen.s.brennan@oracle.com \
    --cc=thunder.leizhen@huawei.com \
    --cc=zhaoyang.huang@unisoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox