1. 21 1月, 2018 2 次提交
    • U
      kconfig: Fix automatic menu creation mem leak · ae7440ef
      Ulf Magnusson 提交于
      expr_trans_compare() always allocates and returns a new expression,
      giving the following leak outline:
      
      	...
      	*Allocate*
      	basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no);
      	...
      	for (menu = parent->next; menu; menu = menu->next) {
      		...
      		*Copy*
      		dep2 = expr_copy(basedep);
      		...
      		*Free copy*
      		expr_free(dep2);
      	}
      	*basedep lost!*
      
      Fix by freeing 'basedep' after the loop.
      
      Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 344,376 bytes in 14,349 blocks
      	   ...
      
      Summary after the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 44,448 bytes in 1,852 blocks
      	   ...
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      ae7440ef
    • U
      kconfig: Don't leak main menus during parsing · 0724a7c3
      Ulf Magnusson 提交于
      If a 'mainmenu' entry appeared in the Kconfig files, two things would
      leak:
      
      	- The 'struct property' allocated for the default "Linux Kernel
      	  Configuration" prompt.
      
      	- The string for the T_WORD/T_WORD_QUOTE prompt after the
      	  T_MAINMENU token, allocated on the heap in zconf.l.
      
      To fix it, introduce a new 'no_mainmenu_stmt' nonterminal that matches
      if there's no 'mainmenu' and adds the default prompt. That means the
      prompt only gets allocated once regardless of whether there's a
      'mainmenu' statement or not, and managing it becomes simple.
      
      Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 344,568 bytes in 14,352 blocks
      	   ...
      
      Summary after the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 344,440 bytes in 14,350 blocks
      	   ...
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      0724a7c3
  2. 11 1月, 2018 2 次提交
    • U
      kconfig: Don't leak 'option' arguments during parsing · bc28fe1d
      Ulf Magnusson 提交于
      The following strings would leak before this change:
      
      	- option env="LEAKED"
      	- option defconfig_list="LEAKED"
      
      These come in the form of T_WORD tokens and are always allocated on the
      heap in zconf.l. Free them.
      
      Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 344,616 bytes in 14,355 blocks
      	   ...
      
      Summary after the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 344,568 bytes in 14,352 blocks
      	   ...
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      bc28fe1d
    • U
      kconfig: Don't leak 'source' filenames during parsing · 24161a67
      Ulf Magnusson 提交于
      The 'source_stmt' nonterminal takes a 'prompt', which consists of either
      a T_WORD or a T_WORD_QUOTE, both of which are always allocated on the
      heap in zconf.l and need to have their associated strings freed. Free
      them.
      
      The existing code already makes sure to always copy the string, but add
      a warning to sym_expand_string_value() to make it clear that the string
      must be copied, just in case.
      
      Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 387,504 bytes in 15,545 blocks
      	   ...
      
      Summary after the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 344,616 bytes in 14,355 blocks
      	   ...
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      24161a67
  3. 10 1月, 2018 1 次提交
    • U
      kconfig: Don't leak symbol names during parsing · 26e47a3c
      Ulf Magnusson 提交于
      Prior to this fix, zconf.y did not free symbol names from zconf.l in
      these contexts:
      
      	- After T_CONFIG ('config LEAKED')
      	- After T_MENUCONFIG ('menuconfig LEAKED')
      	- After T_SELECT ('select LEAKED')
      	- After T_IMPLY ('imply LEAKED')
      	- After T_DEFAULT in a choice ('default LEAKED')
      
      All of these come in the form of T_WORD tokens, which always have their
      associated string allocated on the heap in zconf.l and need to be freed.
      
      Fix by introducing a new nonterminal 'nonconst_symbol' which takes a
      T_WORD, fetches the symbol, and then frees the T_WORD string. The
      already existing 'symbol' nonterminal works the same way but also
      accepts T_WORD_QUOTE, corresponding to a constant symbol. T_WORD_QUOTE
      should not be accepted in any of the contexts above, so the 'symbol'
      nonterminal can't be reused here.
      
      Fetching the symbol in 'nonconst_symbol' also removes a bunch of
      sym_lookup() calls from actions.
      
      Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 711,571 bytes in 37,756 blocks
      	   ...
      
      Summary after the fix:
      
      	LEAK SUMMARY:
      	   definitely lost: 387,504 bytes in 15,545 blocks
                 ...
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      26e47a3c
  4. 16 12月, 2017 2 次提交
    • M
      kconfig: generate lexer and parser during build instead of shipping · 29c83306
      Masahiro Yamada 提交于
      zconf.lex.c is generated by flex, zconf.tab.c by bison.  Instead of
      running flex and bison during the kernel building, we conventionally
      version-control those artifacts with _shipped suffix.
      
      It is tedious to manually regenerate them every time we change the
      real sources, zconf.l and zconf.y.
      
      Remove the _shipped files and switch over to build-time generation
      of the intermediate C files.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      29c83306
    • M
      kconfig: display recursive dependency resolution hint just once · e3b03bf2
      Masahiro Yamada 提交于
      Commit 1c199f28 ("kbuild: document recursive dependency limitation
      / resolution") probably intended to show a hint along with "recursive
      dependency detected!" error, but it missed to add {...} guard, and the
      hint is displayed in every loop of the dep_stack traverse, annoyingly.
      
      This error was detected by GCC's -Wmisleading-indentation when switching
      to build-time generation of lexer/parser.
      
      scripts/kconfig/symbol.c: In function ‘sym_check_print_recursive’:
      scripts/kconfig/symbol.c:1150:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
         if (stack->sym == last_sym)
         ^~
      scripts/kconfig/symbol.c:1153:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
          fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n");
          ^~~~~~~
      
      I could simply add {...} to surround the three fprintf(), but I rather
      chose to move the hint after the loop to make the whole message readable.
      
      Fixes: 1c199f28 ("kbuild: document recursive dependency limitation / resolution"
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NLuis R. Rodriguez <mcgrof@kernel.org>
      e3b03bf2
  5. 15 12月, 2017 3 次提交
    • U
      kconfig: Clean up modules handling and fix crash · f77850d3
      Ulf Magnusson 提交于
      Kconfig currently doesn't handle 'm' appearing in a Kconfig file before
      the modules symbol is defined (the symbol with 'option modules'). The
      problem is the following code, which runs during parsing:
      
      	/* change 'm' into 'm' && MODULES */
      	if (e->left.sym == &symbol_mod)
      		return expr_alloc_and(e, expr_alloc_symbol(modules_sym));
      
      If the modules symbol has not yet been defined, modules_sym is NULL,
      giving an invalid expression.
      
      Here is a test file where both BEFORE_1 and BEFORE_2 trigger a segfault.
      If the modules symbol is removed, all symbols trigger segfaults.
      
      	config BEFORE_1
      		def_tristate y if m
      
      	if m
      	config BEFORE_2
      		def_tristate y
      	endif
      
      	config MODULES
      		def_bool y
      		option modules
      
      	config AFTER_1
      		def_tristate y if m
      
      	if m
      	config AFTER_2
      		def_tristate y
      	endif
      
      Fix the issue by rewriting 'm' in menu_finalize() instead. This function
      runs after parsing and is the proper place to do it. The following
      existing code in conf_parse() in zconf.y ensures that the modules symbol
      exists at that point:
      
      	if (!modules_sym)
      		modules_sym = sym_find( "n" );
      
      	...
      
      	menu_finalize(&rootmenu);
      
      The following tests were done to ensure no functional changes for
      configurations that don't reference 'm' before the modules symbol:
      
      	- zconfdump(stdout) was run with ARCH=x86 and ARCH=arm before
      	  and after the change and verified to produce identical output.
      	  This function prints all symbols, choices, and menus together
      	  with their properties and their dependency expressions. A
      	  rewritten 'm' appears as 'm && MODULES'.
      
      	  A small annoyance is that the assert(len != 0) in xfwrite()
      	  needs to be disabled in order to use zconfdump(), because it
      	  chokes on e.g. 'default ""'.
      
      	- The Kconfiglib test suite was run to indirectly verify that
      	  alldefconfig, allyesconfig, allnoconfig, and all defconfigs in
      	  the kernel still generate the same final .config.
      
      	- Valgrind was used to check for memory errors and (new) memory
      	  leaks.
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      f77850d3
    • U
      kconfig: Clarify expression rewriting · fa8cedae
      Ulf Magnusson 提交于
      menu_finalize() is one of the more opaque parts of Kconfig, and I need
      to make some changes to it to fix an issue related to modules. Add some
      comments related to expression rewriting and dependency propagation as a
      review aid. They will also help other people trying to understand the
      code.
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      fa8cedae
    • U
      kconfig: Rename menu_check_dep() to rewrite_m() · 9a826842
      Ulf Magnusson 提交于
      More directly describes the only thing it does.
      Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      9a826842
  6. 12 12月, 2017 1 次提交
  7. 07 12月, 2017 3 次提交
  8. 23 11月, 2017 1 次提交
  9. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  10. 20 8月, 2017 1 次提交
  11. 23 6月, 2017 1 次提交
    • R
      kconfig: fix sparse warnings in nconfig · ad818106
      Randy Dunlap 提交于
      Fix sparse warnings in scripts/kconfig/nconf* ('make nconfig'):
      
      ../scripts/kconfig/nconf.c:1071:32: warning: Using plain integer as NULL pointer
      ../scripts/kconfig/nconf.c:1238:30: warning: Using plain integer as NULL pointer
      ../scripts/kconfig/nconf.c:511:51: warning: Using plain integer as NULL pointer
      ../scripts/kconfig/nconf.c:1460:6: warning: symbol 'setup_windows' was not declared. Should it be static?
      ../scripts/kconfig/nconf.c:274:12: warning: symbol 'current_instructions' was not declared. Should it be static?
      ../scripts/kconfig/nconf.c:308:22: warning: symbol 'function_keys' was not declared. Should it be static?
      ../scripts/kconfig/nconf.gui.c:132:17: warning: non-ANSI function declaration of function 'set_colors'
      ../scripts/kconfig/nconf.gui.c:195:24: warning: Using plain integer as NULL pointer
      
      nconf.gui.o before/after files are the same.
      nconf.o before/after files are the same until the 'static' function
      declarations are added.
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      ad818106
  12. 10 6月, 2017 1 次提交
    • B
      kconfig: Check for libncurses before menuconfig · ff85a1a8
      Borislav Petkov 提交于
      There is a check and a nice user-friendly message when the curses
      library is not present on the system and the user wants to do "make
      menuconfig". It doesn't get issued, though. Instead, we fail the build
      when mconf.c doesn't find the curses.h header:
      
          HOSTCC  scripts/kconfig/mconf.o
        In file included from scripts/kconfig/mconf.c:23:0:
        scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory
         #include CURSES_LOC
                            ^
        compilation terminated.
      
      Make that check a prerequisite to mconf so that the user sees the error
      message instead:
      
        $ make menuconfig
         *** Unable to find the ncurses libraries or the
         *** required header files.
         *** 'make menuconfig' requires the ncurses libraries.
         ***
         *** Install ncurses (ncurses-devel) and try again.
         ***
        scripts/kconfig/Makefile:203: recipe for target 'scripts/kconfig/dochecklxdialog' failed
        make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
        Makefile:548: recipe for target 'menuconfig' failed
        make: *** [menuconfig] Error 2
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      ff85a1a8
  13. 14 5月, 2017 1 次提交
    • K
      scripts: Switch to more portable Perl shebang · cb77f0d6
      Kamil Rytarowski 提交于
      The default NetBSD package manager is pkgsrc and it installs Perl
      along other third party programs under custom and configurable prefix.
      The default prefix for binary prebuilt packages is /usr/pkg, and the
      Perl executable lands in /usr/pkg/bin/perl.
      
      This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
      the most portable solution that should work for almost everybody.
      Perl's executable is detected automatically.
      
      This change switches -w option passed to the executable with more
      modern "use warnings;" approach. There is no functional change to the
      default behavior.
      
      While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).
      Signed-off-by: NKamil Rytarowski <n54@gmx.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      cb77f0d6
  14. 22 3月, 2017 1 次提交
    • N
      gconfig: remove misleading parentheses around a condition · 9be3213b
      Nicolas Iooss 提交于
      When building the kernel with clang, the compiler complains about the
      presence of a condition inside two pairs of parentheses:
      
          scripts/kconfig/gconf.c:917:19: error: equality comparison with
          extraneous parentheses [-Werror,-Wparentheses-equality]
                          } else if ((col == COL_OPTION)) {
                                      ~~~~^~~~~~~~~~~~~
          scripts/kconfig/gconf.c:917:19: note: remove extraneous parentheses
          around the comparison to silence this warning
                          } else if ((col == COL_OPTION)) {
                                     ~    ^            ~
          scripts/kconfig/gconf.c:917:19: note: use '=' to turn this equality
          comparison into an assignment
                          } else if ((col == COL_OPTION)) {
                                          ^~
                                          =
      
      Silence this warning by removing a level of parentheses.
      Signed-off-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      9be3213b
  15. 12 12月, 2016 2 次提交
  16. 11 12月, 2016 1 次提交
    • B
      kconfig/nconf: Fix hang when editing symbol with a long prompt · 79e51b5c
      Ben Hutchings 提交于
      Currently it is impossible to edit the value of a config symbol with a
      prompt longer than (terminal width - 2) characters.  dialog_inputbox()
      calculates a negative x-offset for the input window and newwin() fails
      as this is invalid.  It also doesn't check for this failure, so it
      busy-loops calling wgetch(NULL) which immediately returns -1.
      
      The additions in the offset calculations also don't match the intended
      size of the window.
      
      Limit the window size and calculate the offset similarly to
      show_scroll_win().
      
      Cc: stable <stable@vger.kernel.org>
      Fixes: 692d97c3 ("kconfig: new configuration interface (nconfig)")
      Signed-off-by: NBen Hutchings <ben.hutchings@codethink.co.uk>
      79e51b5c
  17. 02 12月, 2016 1 次提交
  18. 29 11月, 2016 1 次提交
  19. 16 11月, 2016 2 次提交
  20. 11 5月, 2016 1 次提交
    • D
      kconfig/symbol.c: handle choice_values that depend on 'm' symbols · fa64e5f6
      Dirk Gouders 提交于
      If choices consist of choice_values of type tristate that depend on
      symbols set to 'm', those choice_values are not set to 'n' if the
      choice is changed from 'm' to 'y' (in which case only one active
      choice_value is allowed). Those values are also written to the config
      file causing modules to be built when they should not.
      
      The following config can be used to reproduce and examine the problem;
      with the frontend of your choice set "Choice 0" and "Choice 1" to 'm',
      then set "Tristate Choice" to 'y' and save the configuration:
      
      config modules
      	boolean modules
      	default y
      	option modules
      
      config dependency
      	tristate "Dependency"
      	default m
      
      choice
      	prompt "Tristate Choice"
      	default choice0
      
      config choice0
      	tristate "Choice 0"
      
      config choice1
      	tristate "Choice 1"
      	depends on dependency
      
      endchoice
      
      This patch sets tristate choice_values' visibility that depend on
      symbols set to 'm' to 'n' if the corresponding choice is set to 'y'.
      
      This makes them disappear from the choice list and will also cause the
      choice_values' value set to 'n' in sym_calc_value() and as a result
      they are written as "not set" to the resulting .config file.
      Reported-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NDirk Gouders <dirk@gouders.net>
      Tested-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Tested-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      fa64e5f6
  21. 10 5月, 2016 1 次提交
  22. 27 4月, 2016 2 次提交
  23. 26 4月, 2016 4 次提交
  24. 01 2月, 2016 2 次提交
    • A
      unbreak allmodconfig KCONFIG_ALLCONFIG=... · 6b87b70c
      Al Viro 提交于
      	Prior to 3.13 make allmodconfig KCONFIG_ALLCONFIG=/dev/null used
      to be equivalent to make allmodconfig; these days it hardwires MODULES to n.
      In fact, any KCONFIG_ALLCONFIG that doesn't set MODULES explicitly is
      treated as if it set it to n.
      
      	Regression had been introduced by commit cfa98f ("kconfig: do not
      override symbols already set"); what happens is that conf_read_simple()
      does sym_calc_value(modules_sym) on exit, which leaves SYMBOL_VALID set and
      has conf_set_all_new_symbols() skip modules_sym.
      
      	It's pretty easy to fix - simply move that call of sym_calc_value()
      into the callers, except for the ones in KCONFIG_ALLCONFIG handling.
      Objections?
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Fixes: cfa98f2e ("kconfig: do not override symbols already set")
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      6b87b70c
    • J
      scripts/kconfig: allow building with make 3.80 again · 42f9d3c6
      Jan Beulich 提交于
      Documentation/Changes still lists this as the minimal required version,
      so it ought to remain usable for the time being.
      
      Fixes: d2036f30 ("scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target")
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      42f9d3c6
  25. 11 1月, 2016 1 次提交
  26. 05 1月, 2016 1 次提交