Skip to content
Snippets Groups Projects
  1. Feb 10, 2018
  2. Feb 08, 2018
    • Masahiro Yamada's avatar
      kconfig: send error messages to stderr · 9e3e10c7
      Masahiro Yamada authored
      
      These messages should be directed to stderr.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      9e3e10c7
    • Masahiro Yamada's avatar
      kconfig: echo stdin to stdout if either is redirected · f3ff6fb5
      Masahiro Yamada authored
      
      If stdio is not tty, conf_askvalue() puts additional new line to
      prevent prompts from being concatenated into a single line.  This
      care is missing in conf_choice(), so a 'choice' prompt and the next
      prompt are shown in the same line.
      
      Move the code into xfgets() to cater to all cases.  To improve this
      more, let's echo stdin to stdout.  This clarifies what keys were
      input from stdio and the stdout looks like as if it were from tty.
      
      I removed the isatty(2) check since stderr is unrelated here.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      f3ff6fb5
    • Masahiro Yamada's avatar
      kconfig: remove check_stdin() · d2a04648
      Masahiro Yamada authored
      
      Except silentoldconfig, valid_stdin is 1, so check_stdin() is no-op.
      
      oldconfig and silentoldconfig work almost in the same way except that
      the latter generates additional files under include/.  Both ask users
      for input for new symbols.
      
      I do not know why only silentoldconfig requires stdio be tty.
      
        $ rm -f .config; touch .config
        $ yes "" | make oldconfig > stdout
        $ rm -f .config; touch .config
        $ yes "" | make silentoldconfig > stdout
        make[1]: *** [silentoldconfig] Error 1
        make: *** [silentoldconfig] Error 2
        $ tail -n 4 stdout
        Console input/output is redirected. Run 'make oldconfig' to update configuration.
      
        scripts/kconfig/Makefile:40: recipe for target 'silentoldconfig' failed
        Makefile:507: recipe for target 'silentoldconfig' failed
      
      Redirection is useful, for example, for testing where we want to give
      particular key inputs from a test file, then check the result.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      d2a04648
    • Masahiro Yamada's avatar
      kconfig: remove 'config*' pattern from .gitignnore · cd58a91d
      Masahiro Yamada authored
      
      I could not figure out why this pattern should be ignored.
      Checking commit 1e65174a ("Add some basic .gitignore files")
      did not help.
      
      Let's remove this pattern, then see if it is really needed.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      cd58a91d
    • Masahiro Yamada's avatar
      kconfig: show '?' prompt even if no help text is available · 4f208f39
      Masahiro Yamada authored
      
      'make config', 'make oldconfig', etc. always receive '?' as a valid
      input and show useful information even if no help text is available.
      
      ------------------------>8------------------------
      foo (FOO) [N/y] (NEW) ?
      
      There is no help available for this option.
      Symbol: FOO [=n]
      Type  : bool
      Prompt: foo
        Defined at Kconfig:1
      ------------------------>8------------------------
      
      However, '?' is not shown in the prompt if its help text is missing.
      Let's show '?' all the time so that the prompt and the behavior match.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      4f208f39
    • Masahiro Yamada's avatar
      kconfig: do not write choice values when their dependency becomes n · cb67ab2c
      Masahiro Yamada authored
      
      "# CONFIG_... is not set" for choice values are wrongly written into
      the .config file if they are once visible, then become invisible later.
      
        Test case
        ---------
      
      ---------------------------(Kconfig)----------------------------
      config A
      	bool "A"
      
      choice
      	prompt "Choice ?"
      	depends on A
      
      config CHOICE_B
      	bool "Choice B"
      
      config CHOICE_C
      	bool "Choice C"
      
      endchoice
      ----------------------------------------------------------------
      
      ---------------------------(.config)----------------------------
      CONFIG_A=y
      ----------------------------------------------------------------
      
      With the Kconfig and .config above,
      
        $ make config
        scripts/kconfig/conf  --oldaskconfig Kconfig
        *
        * Linux Kernel Configuration
        *
        A (A) [Y/n] n
        #
        # configuration written to .config
        #
        $ cat .config
        #
        # Automatically generated file; DO NOT EDIT.
        # Linux Kernel Configuration
        #
        # CONFIG_A is not set
        # CONFIG_CHOICE_B is not set
        # CONFIG_CHOICE_C is not set
      
      Here,
      
        # CONFIG_CHOICE_B is not set
        # CONFIG_CHOICE_C is not set
      
      should not be written into the .config file because their dependency
      "depends on A" is unmet.
      
      Currently, there is no code that clears SYMBOL_WRITE of choice values.
      
      Clear SYMBOL_WRITE for all symbols in sym_calc_value(), then set it
      again after calculating visibility.  To simplify the logic, set the
      flag if they have non-n visibility, regardless of types, and regardless
      of whether they are choice values or not.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      cb67ab2c
  3. Feb 07, 2018
  4. Feb 06, 2018
  5. Feb 02, 2018
  6. Feb 01, 2018
  7. Jan 29, 2018
  8. Jan 27, 2018
  9. Jan 26, 2018
    • Andi Kleen's avatar
      module/retpoline: Warn about missing retpoline in module · caf7501a
      Andi Kleen authored
      
      There's a risk that a kernel which has full retpoline mitigations becomes
      vulnerable when a module gets loaded that hasn't been compiled with the
      right compiler or the right option.
      
      To enable detection of that mismatch at module load time, add a module info
      string "retpoline" at build time when the module was compiled with
      retpoline support. This only covers compiled C source, but assembler source
      or prebuilt object files are not checked.
      
      If a retpoline enabled kernel detects a non retpoline protected module at
      load time, print a warning and report it in the sysfs vulnerability file.
      
      [ tglx: Massaged changelog ]
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: gregkh@linuxfoundation.org
      Cc: torvalds@linux-foundation.org
      Cc: jeyu@kernel.org
      Cc: arjan@linux.intel.com
      Link: https://lkml.kernel.org/r/20180125235028.31211-1-andi@firstfloor.org
      caf7501a
  10. Jan 25, 2018
    • Masahiro Yamada's avatar
      kbuild: fix W= option checks for extra DTC warnings · f759625a
      Masahiro Yamada authored
      
      Kbuild supports 3 levels of extra warnings, and multiple levels can
      be combined, like W=12, W=123.  It was added by commit a6de553d
      ("kbuild: Allow to combine multiple W= levels").
      
      From the log of commit 8654cb8d ("dtc: update warning settings
      for new bus and node/property name checks"), I assume:
      
       - unit_address_vs_reg, simple_bus_reg, etc. belong to level 1
       - node_name_chars_strict, property_name_chars_strict belong to level 2
      
      However, the level 1 warnings are displayed by any argument to W=.
      On the other hand, the level 2 warnings are displayed by W=2, but
      not by W=12, or W=123.
      
      Use $(findstring ...) like scripts/Makefile.extrawarn.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      f759625a
    • Petr Vorel's avatar
      kconfig: make "Selected by:" and "Implied by:" readable · 1ccb2714
      Petr Vorel authored
      
      Reverse dependency expressions can get rather unwieldy, especially if
      a symbol is selected by more than a handful of other symbols. I.e. it's
      possible to have near endless expressions like:
         A && B && !C || D || F && (G || H) || [...]
      
      Chop these expressions into actually readable chunks:
         - A && B && !C
         - D
         - F && (G || H)
         - [...]
      
      I.e. transform the top level OR tokens into newlines and prepend each
      line with a minus. This makes the "Selected by:" and "Implied by:" blurb
      much easier to read. This is done only if there is more than one top
      level OR. "Depends on:" and "Range :" were deliberately left as they are.
      
      Based on idea from Paul Bolle.
      
      Suggested-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarPetr Vorel <petr.vorel@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      1ccb2714
    • Masahiro Yamada's avatar
      kconfig: announce removal of oldnoconfig if used · 312ee687
      Masahiro Yamada authored
      
      The 'oldnoconfig' is really confusing due to its counter-intuitive name.
      It was renamed by commit fb16d891 ("kconfig: replace 'oldnoconfig'
      with 'olddefconfig', and keep the old name as an alias").
      
      The 'oldnoconfig' has been kept as an alias for enough period of time,
      and finally I am planning to remove it.  I will give people a little
      more time for migration.  Meanwhile, the following message will be
      displayed if oldnoconfig is used.
      
          WARNING: "oldnoconfig" target will be removed after Linux 4.19
                    Please use "olddefconfig" instead, which is an alias.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      312ee687
  11. Jan 21, 2018
Loading