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  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 <ulfalizer@...il.com>
To:     linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
        corbet@....net, Simon Glass <sjg@...omium.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        bruce.ashfield@...driver.com, Samuel Martin <s.martin49@...il.com>,
        ivan@...ressif.com, dirk@...ders.net, yann.morin.1998@...e.fr,
        randy.dunlap@...cle.com, mmarek@...e.cz, ziegler@...fau.de,
        dl@...fau.de, rothberg@...fau.de, soos.mate@...il.com,
        bergert@...lmers.se, kconfig-sat@...glegroups.com,
        mikew@...gle.com, akpm@...ux-foundation.org
Subject: [ANNOUNCE] Kconfiglib 2: An improved, more general redesign

Hello,

A new, much-improved version 2 of Kconfiglib
(https://github.com/ulfalizer/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
(https://github.com/ulfalizer/Kconfiglib/blob/master/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 kconfiglib.py module docstring (at the top of kconfiglib.py) 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
(examples/menuconfig.py):


  ======== 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
          bool
          prompt "Enable loadable module support"
          option modules
          help
            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
            ...


Cheers,
Ulf

Powered by blists - more mailing lists