<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/kconfig, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/scripts/kconfig?h=v3.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/scripts/kconfig?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-10T23:06:46Z</updated>
<entry>
<title>Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild</title>
<updated>2013-07-10T23:06:46Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-07-10T23:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b202c0d5205662fd96f7151afa83f891f2f4d542'/>
<id>urn:sha1:b202c0d5205662fd96f7151afa83f891f2f4d542</id>
<content type='text'>
Pull kconfig updates from Michal Marek:
 - dependency solver fix for make defconfig
 - randconfig fixes, one of which had to be reverted again
 - more user-friendly sorting of search results
 - hex and range keywords support longs
 - fix for [mn]conf not to rely on particular behavior of the LINES and
   COLS variables
 - cleanup of magic constants in kconfig/lxdialog
 - [mn]conf formatting fixes
 - fix for scripts/config's help text in out-of-tree usage (under a
   different name)

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: allow "hex" and "range" to support longs
  Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"
  kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG
  kconfig: loop as long as we changed some symbols in randconfig
  kconfig/[mn]conf: make it explicit in the search box that a regexp is possible
  kconfig: sort found symbols by relevance
  kconfig/conf: print the seed used to initialise the RNG for randconfig
  kconfig/conf: accept a base-16 seed for randconfig
  kconfig/conf: fix randconfig setting multiple symbols in a choice
  scripts/config: replace hard-coded script name by a dynamic value
  mconf/nconf: mark empty menus/menuconfigs different from non-empty ones
  nconf: use function calls instead of ncurses' variables LINES and COLS
  mconf: use function calls instead of ncurses' variables LINES and COLS
  kconfig/lxdialog: handle newline characters in print_autowrap()
  kconfig/lxdialog: Use new mininimum resize definitions in conf_choice()
  kconfig/lxdialog: Add definitions for mininimum (re)size values
  kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on
</content>
</entry>
<entry>
<title>kconfig: allow "hex" and "range" to support longs</title>
<updated>2013-06-29T13:30:17Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-06-28T19:56:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b57caaaed2bd127fe656e6c145970ed6a05c0125'/>
<id>urn:sha1:b57caaaed2bd127fe656e6c145970ed6a05c0125</id>
<content type='text'>
The parsing routines for Kconfig files use strtol(), but store and
render values as int. Switch types and formating to long to support a
wider range of values. For example, 0x80000000 wasn't representable.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"</title>
<updated>2013-06-26T13:49:00Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-06-25T21:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=490f16171119a16e05d670306c105f3b45c38837'/>
<id>urn:sha1:490f16171119a16e05d670306c105f3b45c38837</id>
<content type='text'>
This reverts commit 8357b48549e17b3e4e402c7f977b65708922e60f.

It breaks more stuff than it fixes.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Reported-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Cc: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG</title>
<updated>2013-06-24T18:03:31Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-06-18T17:35:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8357b48549e17b3e4e402c7f977b65708922e60f'/>
<id>urn:sha1:8357b48549e17b3e4e402c7f977b65708922e60f</id>
<content type='text'>
Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG
is specified.

For example, given those two files (Thomas' test-case):

    ---8&lt;--- Config.test.in
    config OPTIONA
        bool "Option A"

    choice
        prompt "This is a choice"

    config CHOICE_OPTIONA
        bool "Choice Option A"

    config CHOICE_OPTIONB
        bool "Choice Option B"

    endchoice

    config OPTIONB
        bool "Option B"
    ---8&lt;--- Config.test.in

    ---8&lt;--- config.defaults
    CONFIG_OPTIONA=y
    ---8&lt;--- config.defaults

And running:
    ./scripts/kconfig/conf --randconfig Config.test.in

does properly randomise the two choice symbols (and the two booleans).

However, running:
    KCONFIG_ALLCONFIG=config.defaults \
    ./scripts/kconfig/conf --randconfig Config.test.in

does *not* reandomise the two choice entries, and only CHOICE_OPTIONA
will ever be selected. (OPTIONA will always be set (expected), and
OPTIONB will be be properly randomised (expected).)

This patch defers setting that a choice has a value until a symbol for
that choice is indeed set, so that choices are properly randomised when
KCONFIG_ALLCONFIG is set, but not if a symbol for that choice is set.

Reported-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;

---
Changes v3 -&gt; v4
  - fix previous issue where some choices would not be set, which would
    cause silentoldconfig to ask for them and was then breaking this
    workflow (as reported by Arnd and Sedat):
        KCONFIG_ALLCONFIG=foo.defconfig make randconfig
        make silentoldconfig &lt;/dev/nullo
    which I have tested (3h28min!) with:
        touch defconfig
        for(( i=0; i&lt;10000; i++ )); do
            KCONFIG_ALLCONFIG=$(pwd)/defconfig make randconfig &gt;/dev/null 2&gt;&amp;1
            make silentoldconfig &lt;/dev/null &gt;/dev/null 2&gt;&amp;1 || break
        done
    which did not break at all.
  - change done in v3 (below) is already fixed by a previous patch

Changes v2 -&gt; v3
  - ensure only one symbol is set in a choice

Changes v1 -&gt; v2:
  - further postpone setting that a choice has a value until
    one is indeed set
  - do not print symbols that are part of an invisible choice
</content>
</entry>
<entry>
<title>kconfig: loop as long as we changed some symbols in randconfig</title>
<updated>2013-06-24T18:03:30Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-04-28T20:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b9a19e08960e5cdad5253998637653e592a3c29'/>
<id>urn:sha1:3b9a19e08960e5cdad5253998637653e592a3c29</id>
<content type='text'>
Because of choice-in-a-choice constructs, it can happen that not all
symbols are assigned a value during randconfig, leading in rare cases
to this situation:

    ---8&lt;--- choice-in-choice.in
    choice
        bool "A/B/C"
    config A
        bool "A"

    config B
        bool "B"
    if B
    choice
        bool "E/F"
    config E
        bool "E"
    config F
        bool "F"
    endchoice
    endif # B

    config C
        bool "C"
    endchoice
    ---8&lt;---

    $ ./scripts/kconfig/conf --randconfig choice-in-choice.in
    [--SNIP--]
    $ ./scripts/kconfig/conf --silentoldconfig choice-in-choice.in &lt;/dev/null
    [--SNIP--]
    A/B/C
      1. A (A)
    &gt; 2. B (B)
      3. C (C)
    choice[1-3]: 2
      E/F
      &gt; 1. E (E) (NEW)
        2. F (F) (NEW)
      choice[1-2]: aborted!

    Console input/output is redirected. Run 'make oldconfig' to update
    configuration.

Fix this by looping in randconfig for as long as some symbol gets assigned
a value.

Note: this was spotted with the USB EHCI Debug Device Gadget (USB_G_DBGP),
which uses this choice-in-a-choice construct, and exhibits this problem.
The example above is just a stripped-down minimalist test-case.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>kconfig/[mn]conf: make it explicit in the search box that a regexp is possible</title>
<updated>2013-06-24T18:01:37Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-06-24T18:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a1ce636f560336ba007bfabb15b167ff31b592cf'/>
<id>urn:sha1:a1ce636f560336ba007bfabb15b167ff31b592cf</id>
<content type='text'>
Reported-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>kconfig: sort found symbols by relevance</title>
<updated>2013-06-24T17:57:45Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-05-06T12:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=193b40aeb537b59eaa36e3dfaabedc2025332ebf'/>
<id>urn:sha1:193b40aeb537b59eaa36e3dfaabedc2025332ebf</id>
<content type='text'>
When searching for symbols, return the symbols sorted by relevance.

Sorting is done as thus:
  - first, symbols that match exactly
  - then, alphabetical sort

Since the search can be a regexp, it is possible that more than one symbol
matches exactly. In this case, we can't decide which to sort first, so we
fallback to alphabeticall sort.

Explain this (new!) sorting heuristic in the documentation.

Reported-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Roland Eggner &lt;edvx1@systemanalysen.net&gt;
Cc: Wang YanQing &lt;udknight@gmail.com&gt;

--
Changes v1-&gt;v2:
  - drop the previous, complex heuristic in favour of a simpler heuristic
    that is both easier to understand, *and* to maintain (Jean)
  - explain sorting heuristic in the doc  (Jean)
</content>
</entry>
<entry>
<title>kconfig/conf: print the seed used to initialise the RNG for randconfig</title>
<updated>2013-06-18T21:59:01Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-05-20T21:09:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a5f6d795f5941e97e757b643a6482968a66c6150'/>
<id>urn:sha1:a5f6d795f5941e97e757b643a6482968a66c6150</id>
<content type='text'>
... so the user has a chance to reproduce a test-case.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>kconfig/conf: accept a base-16 seed for randconfig</title>
<updated>2013-06-18T21:59:00Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-05-20T21:17:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e85ac12443da72d79dbf7c55c12e4b16b8923d87'/>
<id>urn:sha1:e85ac12443da72d79dbf7c55c12e4b16b8923d87</id>
<content type='text'>
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>kconfig/conf: fix randconfig setting multiple symbols in a choice</title>
<updated>2013-06-18T21:59:00Z</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2013-04-28T15:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e6abf12a77bc56dceeb4cba557b726268e71350e'/>
<id>urn:sha1:e6abf12a77bc56dceeb4cba557b726268e71350e</id>
<content type='text'>
Currently, randconfig may set more than one symbol in a given choice.
Given this config file:
    config A
        bool "A"
    if A
    choice
        bool "B/C/D"
    config B
        bool "B"
    config C
        bool "C"
    config D
        bool "D"
    endchoice
    endif # A

Then randconfig generates such .config files (case where A is not set is not
shown below for brevity), and where only the right-most .config is valid:
  CONFIG_A=y                  CONFIG_A=y                  CONFIG_A=y
  CONFIG_B=y                  CONFIG_B=y                  CONFIG_B=y
  CONFIG_C=y                  # CONFIG_C is not set       # CONFIG_C is not set
  # CONFIG_D is not set       CONFIG_D=y                  # CONFIG_D is not set

That is, in a randomised choice, the first symbol is always selected,
and at most one other symbol may be selected.

This is due to symbol randomised in a choice not being properly flagged
as having a value.

Fix that by flagging those symbols adequately: have a user-defined value,
and be not valid (to force recalculation of the symbol).

Note: if the choice is not conditional, then the randomisation is properly
done.

Reported-by: Matthieu CASTET &lt;matthieu.castet@parrot.com&gt;
Signed-off-by: Matthieu CASTET &lt;matthieu.castet@parrot.com&gt;
[yann.morin.1998@free.fr: independently re-done the same patch as Matthieu,
                          as pointed out by Sedat]
Cc: Arnaud Lacombe &lt;lacombar@gmail.com&gt;
Cc: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
</feed>
