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-next>] [day] [month] [year] [list]
Message-Id: <20231027171756.1241002-1-stephen.s.brennan@oracle.com>
Date:   Fri, 27 Oct 2023 10:17:55 -0700
From:   Stephen Brennan <stephen.s.brennan@...cle.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     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 (Microsoft)" <brauner@...nel.org>,
        Petr Mladek <pmladek@...e.com>, Marco Elver <elver@...gle.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Douglas 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>,
        Stephen Brennan <stephen.s.brennan@...cle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Sami Tolvanen <samitolvanen@...gle.com>
Subject: [PATCH v3 0/1] Introduce CONFIG_DEBUG_INFO_IKCONFIG

Hello All,

This adds an alternative for CONFIG_IKCONFIG, which nearly all Linux
distributions disable (probably due to memory considerations). It adds the
section ".debug_linux_ikconfig" to the vmlinux ELF file, which is stripped
out for final images, but retained for debuginfo (objcopy detects the ".debug"
prefix). It is enabled by default whenever IKCONFIG is disabled, so that
debuggers can rely on having the kernel config available.

v1: https://lore.kernel.org/linux-debuggers/20231004165804.659482-1-stephen.s.brennan@oracle.com/T/#t
v2: https://lore.kernel.org/linux-debuggers/20231025223640.1132047-1-stephen.s.brennan@oracle.com/T/#t

Changes v2-v3:

* Added missing dependency on kernel/config_data.gz in kernel/Makefile.

Changes v1-v2:

* I added "default y if IKCONFIG!=y". The result is that whenever DEBUG_INFO=y
  is enabled, and IKCONFIG is not built-in, then DEBUG_INFO_IKCONFIG will get
  enabled automatically. The whole point of this patch is for kernel debuggers
  to be able to rely on having kernel configuration information. The IKCONFIG
  data is quite small compared to kernel debuginfo, and it doesn't change
  anything at runtime. It's safe to enable this automatically, and it's
  important so that distributions (who create debuginfo explicitly to allow
  kernel debugging) will automatically begin creating this info for debuggers.

* Randy Dunlap did review this, but I didn't apply that tag with the update,
  since I understand changing defaults is a major update, and it's a small patch
  to begin with, so I didn't want to misrepresent the review.

Stephen Brennan (1):
  kernel/config: Introduce CONFIG_DEBUG_INFO_IKCONFIG

 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

-- 
2.39.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ