linux/tools/bootconfig
Linus Torvalds 90b754d401 Bootconfig updates for v7.4:
- bootconfig: Parser robustness and validation improvements
  . Skip printing early params to cmdline from bootconfig: Suppress
    early_param keys from /proc/cmdline and warn the user, since bootconfig
    does not invoke early_param handlers and silently ignoring them is
    misleading.
  . Reject unexpected data after null character: Detect and reject non-null
    data following an intermediate null character in the bootconfig buffer,
    preventing silently ignored configuration after an early termination.
 
 - bootconfig: Code cleanups
  . Merge _xbc_exit() into xbc_exit(): Since memblock_free() now handles
    late freeing and NULL addresses, the separate _xbc_exit() helper and
    its early argument are unnecessary. Inline it into xbc_exit().
  . Remove redundant assignment in xbc_parse_array(): The node->child = 0
    assignment after the loop duplicates what xbc_init_node() already did.
  . Skip internal tree sanity checks in kernel: Move the node index bounds
    loop from xbc_verify_tree() into a userspace-only xbc_sanity_check_tree()
    to reduce boot-time overhead, since out-of-bounds indices cannot be
    produced by malformed input.
  . Move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h: Share the
    footer size constant between kernel and user-space tools, replacing the
    hardcoded (BOOTCONFIG_MAGIC_LEN + 8) expression in init/main.c.
 
 - tools/bootconfig: Tooling improvements
  . Remove unused PAGE_SIZE macro from the bootconfig tool.
  . Consolidate xbc_init() to error message wrapper: Use
    init_xbc_with_error() for all bootconfig initialization paths in the
    tool for simpler and more consistent error handling.
 -----BEGIN PGP SIGNATURE-----
 
 iQFPBAABCgA5FiEEh7BulGwFlgAOi5DV2/sHvwUrPxsFAmrX+EEbHG1hc2FtaS5o
 aXJhbWF0c3VAZ21haWwuY29tAAoJENv7B78FKz8bSdEIAKQhVr/CRW7/50NFdHB7
 XnyJFjGgAmY0DYEhlfv0v2S0YjDcicrTzrV1qMeNF/MwZ/2rMEOZhAnVUVlM3eIi
 28k/mEUixMmZGBeLtUUmdrbF8OkvptdmwtjWYdXF2PUDqRlxfvUV/vWqvVuL5EAu
 xcDykilReFxmHLUWTJIn8EhfcXP96Lm+wOMhbLI97cAVaP/swtegqHEefIBPvSj4
 YIkZtetAWJQIJKGeq97gQHA7SAlIdZEQW5YgUqr7eKAdK8ffIOk0+nr7bmNIER+m
 fBe6DHO7Ho3B4EzH/u5MiQBDmYcZ0Akp7meP3h6VXvEpfuCeuqhzsO8+szzkmjbe
 4UQ=
 =hhPo
 -----END PGP SIGNATURE-----

Merge tag 'bootconfig-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull bootconfig updates from Masami Hiramatsu:
 "Parser robustness and validation improvements:

   - Skip printing early params to cmdline from bootconfig

     Suppress early_param keys from /proc/cmdline and warn the user,
     since bootconfig does not invoke early_param handlers and silently
     ignoring them is misleading

   - Reject unexpected data after null character

     Detect and reject non-null data following an intermediate null
     character in the bootconfig buffer, preventing silently ignored
     configuration after an early termination

  Code cleanups:

   - Merge _xbc_exit() into xbc_exit()

     Since memblock_free() now handles late freeing and NULL addresses,
     the separate _xbc_exit() helper and its early argument are
     unnecessary. Inline it into xbc_exit()

   - Remove redundant assignment in xbc_parse_array()

     The node->child = 0 assignment after the loop duplicates what
     xbc_init_node() already did

   - Skip internal tree sanity checks in kernel

     Move the node index bounds loop from xbc_verify_tree() into a
     userspace-only xbc_sanity_check_tree() to reduce boot-time
     overhead, since out-of-bounds indices cannot be produced by
     malformed input

   - Move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h

     Share the footer size constant between kernel and user-space tools,
     replacing the hardcoded (BOOTCONFIG_MAGIC_LEN + 8) expression in
     init/main.c

  Tooling improvements:

   - Remove unused PAGE_SIZE macro from the bootconfig tool

   - Consolidate xbc_init() to error message wrapper

     Use init_xbc_with_error() for all bootconfig initialization paths
     in the tool for simpler and more consistent error handling"

* tag 'bootconfig-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  bootconfig: Move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h
  bootconfig: Skip internal tree sanity checks in kernel
  tools/bootconfig: Consolidate xbc_init() to error message wrapper
  bootconfig: Reject unexpected data after null character
  bootconfig: Skip printing early params to cmdline from bootconfig
  tools/bootconfig: remove unused PAGE_SIZE macro
  bootconfig: remove redundant assignment in xbc_parse_array()
  bootconfig: merge _xbc_exit() into xbc_exit()
2026-10-23 12:20:54 -10:00
..
include/linux
samples bootconfig: Add bootconfig tests about braces 2026-03-13 17:49:30 +09:00
scripts tools/bootconfig: Ignore comment lines in dynamic_events/kprobe_events file 2026-07-14 22:43:16 +09:00
.gitignore
main.c Bootconfig updates for v7.4: 2026-10-23 12:20:54 -10:00
Makefile bootconfig: clean build-time tools/bootconfig from make clean 2026-07-02 21:15:45 +09:00
test-bootconfig.sh bootconfig: Reject unexpected data after null character 2026-10-11 10:29:43 +09:00