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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 9 Nov 2017 17:37:19 +0100
From:   Ulf Magnusson <>
To:,,, Simon Glass <>,
        Masahiro Yamada <>,, Samuel Martin <>,,,,,,,,,,,,,
Subject: [ANNOUNCE] Kconfiglib 2: An improved, more general redesign


A new, much-improved version 2 of Kconfiglib
( is out.

I got tired of some old interface and design mistakes while working on adding
implicit menu support, and decided to redo things the right way.

For a summary of changes, see kconfiglib-2-changes.txt
Highlights include direct access to the menu tree (including implicit menus)
and direct access to symbol properties and their conditions. Expressions can be
inspected directly and use a simple tuple-based format. The API has gotten more
general and less clunky to use.

See the module docstring (at the top of for an
introduction to some Kconfig/Kconfiglib concepts. Maybe some of it would be
nice to have in kconfig-language.txt as well.

It's now pretty easy to implement menuconfig-like functionality on top of
Kconfiglib, like in the the following example/proof-of-concept

  ======== Example Kconfig configuration ========

  [*] Enable loadable module support (MODULES)
      Bool and tristate symbols
          [*] Bool symbol (BOOL)
                  [ ] Dependent bool symbol (BOOL_DEP)
                  < > Dependent tristate symbol (TRI_DEP)
                  [ ] First prompt (TWO_MENU_NODES)
          < > Tristate symbol (TRI)
          [ ] Second prompt (TWO_MENU_NODES)
              *** These are selected by TRI_DEP ***
          < > Tristate selected by TRI_DEP (SELECTED_BY_TRI_DEP)
          < > Tristate implied by TRI_DEP (IMPLIED_BY_TRI_DEP)
      String, int, and hex symbols
          (foo) String symbol (STRING)
          (747) Int symbol (INT)
          (0xABC) Hex symbol (HEX)
      Various choices
          -*- Bool choice (BOOL_CHOICE)
                  --> Bool choice sym 1 (BOOL_CHOICE_SYM_1)
                      Bool choice sym 2 (BOOL_CHOICE_SYM_2)
          {M} Tristate choice (TRI_CHOICE)
                  < > Tristate choice sym 1 (TRI_CHOICE_SYM_1)
                  < > Tristate choice sym 2 (TRI_CHOICE_SYM_2)
          [ ] Optional bool choice (OPT_BOOL_CHOICE)

  Enter a symbol/choice name, "load_config", or "write_config" (or
press CTRL+D to exit): BOOL
  Value for BOOL (available: n, y): n

Printing Kconfig objects now produces reparsable Kconfig output:

  >>> print(kconf.syms["MODULES"])
  menuconfig MODULES
          prompt "Enable loadable module support"
          option modules
            Kernel modules are small pieces of compiled code which can
            be inserted in the running kernel, rather than being
            permanently built into the kernel.  You use the "modprobe"
            tool to add (and sometimes remove) them.  If you say Y here,
            many parts of the kernel can be built as modules (by


Powered by blists - more mailing lists