From: Randy Dunlap <rdunlap@infradead.org>
To: Stephen Brennan <stephen.s.brennan@oracle.com>,
Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-debuggers@vger.kernel.org
Subject: Re: [PATCH 1/1] kernel/config: Introduce CONFIG_DEBUG_INFO_IKCONFIG
Date: Wed, 4 Oct 2023 10:52:23 -0700 [thread overview]
Message-ID: <2d690a95-67c6-45cb-91a1-4fbac09e1224@infradead.org> (raw)
In-Reply-To: <20231004165804.659482-2-stephen.s.brennan@oracle.com>
Hi,
On 10/4/23 09:58, 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.
x86_64 allmodconfig is 91 KB gzipped... oh well.
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
> 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.
>
> Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
> ---
> include/asm-generic/vmlinux.lds.h | 3 ++-
> kernel/Makefile | 1 +
> kernel/configs-debug.S | 18 ++++++++++++++++++
> lib/Kconfig.debug | 14 ++++++++++++++
> 4 files changed, 35 insertions(+), 1 deletion(-)
> create mode 100644 kernel/configs-debug.S
--
~Randy
next prev parent reply other threads:[~2023-10-04 17:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 16:58 [PATCH 0/1] Introduce CONFIG_DEBUG_INFO_IKCONFIG Stephen Brennan
2023-10-04 16:58 ` [PATCH 1/1] kernel/config: " Stephen Brennan
2023-10-04 17:52 ` Randy Dunlap [this message]
2023-10-04 17:56 ` Stephen Brennan
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=2d690a95-67c6-45cb-91a1-4fbac09e1224@infradead.org \
--to=rdunlap@infradead.org \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-debuggers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stephen.s.brennan@oracle.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;
as well as URLs for NNTP newsgroup(s).