lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Oct 2023 20:20:56 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Stephen Brennan" <stephen.s.brennan@...cle.com>
Cc:     Linux-Arch <linux-arch@...r.kernel.org>,
        linux-kernel@...r.kernel.org, linux-debuggers@...r.kernel.org,
        "Mike Christie" <michael.christie@...cle.com>,
        "Geert Uytterhoeven" <geert+renesas@...der.be>,
        "Christian Brauner" <brauner@...nel.org>,
        "Petr Mladek" <pmladek@...e.com>, "Marco Elver" <elver@...gle.com>,
        "Randy Dunlap" <rdunlap@...radead.org>,
        "Doug Anderson" <dianders@...omium.org>,
        "Maninder Singh" <maninder1.s@...sung.com>,
        "Luis Chamberlain" <mcgrof@...nel.org>,
        "Nick Desaulniers" <ndesaulniers@...gle.com>,
        "Zhen Lei" <thunder.leizhen@...wei.com>,
        "Kees Cook" <keescook@...omium.org>,
        "Zhaoyang Huang" <zhaoyang.huang@...soc.com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Sami Tolvanen" <samitolvanen@...gle.com>
Subject: Re: [PATCH v3 1/1] kernel/config: Introduce CONFIG_DEBUG_INFO_IKCONFIG

On Fri, Oct 27, 2023, at 19:17, 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@...cle.com>
> ---
>  include/asm-generic/vmlinux.lds.h |  3 ++-
>  kernel/Makefile                   |  2 ++
>  kernel/configs-debug.S            | 18 ++++++++++++++++++
>  lib/Kconfig.debug                 | 15 +++++++++++++++
>  4 files changed, 37 insertions(+), 1 deletion(-)
>  create mode 100644 kernel/configs-debug.S

For asm-generic:

Acked-by: Arnd Bergmann <arnd@...db.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ