1. 25 5月, 2015 1 次提交
    • M
      Kconfig: Remove bad inference rules expr_eliminate_dups2() · e9115030
      Martin Walch 提交于
      expr_eliminate_dups2() in scripts/kconfig/expr.c applies two invalid
      inference rules:
      
      (FOO || BAR) && (!FOO && !BAR) -> n
      (FOO && BAR) || (!FOO || !BAR) -> y
      
      They would be correct in propositional logic, but this is a three-valued
      logic, and here it is wrong in that it changes semantics. It becomes
      immediately visible when assigning the value 1 to both, FOO and BAR:
      
      (FOO || BAR) && (!FOO && !BAR)
      -> min(max(1, 1), min(2-1, 2-1)) = min(1, 1) = 1
      
      while n evaluates to 0 and
      
      (FOO && BAR) || (!FOO || !BAR)
      -> max(min(1, 1), max(2-1, 2-1)) = max(1, 1) = 1
      
      with y evaluating to 2.
      
      Fix it by removing expr_eliminate_dups2() and the functions that have no
      use anywhere else: expr_extract_eq_and(), expr_extract_eq_or(),
      and expr_extract_eq() from scripts/kconfig/expr.c
      
      Currently the bug is not triggered in mainline, so this patch does not
      modify the configuration space there. To observe the bug consider this
      example:
      
      config MODULES
              def_bool y
              option modules
      
      config FOO
              def_tristate m
      
      config BAR
              def_tristate m
      
      config TEST1
              def_tristate y
              depends on (FOO || BAR) && (!FOO && !BAR)
      
      if TEST1 = n
      comment "TEST1 broken"
      endif
      
      config TEST2
              def_tristate y
              depends on (FOO && BAR) || (!FOO || !BAR)
      
      if TEST2 = y
      comment "TEST2 broken"
      endif
      
      config TEST3
              def_tristate y
              depends on m && !m
      
      if TEST3 = n
      comment "TEST3 broken"
      endif
      
      TEST1, TEST2 and TEST3 should all evaluate to m, but without the patch,
      none of them does. It is probably not obvious that TEST3 is the same bug,
      but it becomes clear when considering what happens internally to the
      expression
      m && !m":
      First it expands to
      (m && MODULES) && !(m && MODULES),
      then it is transformed into
      (m && MODULES) && (!m || !MODULES),
      and finally due to the bug it is replaced with n.
      
      As a side effect, this patch reduces code size in expr.c by roughly 10%
      and slightly improves startup time for all configuration frontends.
      Signed-off-by: NMartin Walch <walch.martin@web.de>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      e9115030
  2. 09 4月, 2015 1 次提交
  3. 08 4月, 2015 1 次提交
  4. 24 3月, 2015 6 次提交
  5. 25 2月, 2015 4 次提交
  6. 27 1月, 2015 1 次提交
  7. 08 1月, 2015 1 次提交
  8. 09 12月, 2014 1 次提交
  9. 28 11月, 2014 1 次提交
  10. 20 11月, 2014 1 次提交
  11. 23 9月, 2014 1 次提交
  12. 22 8月, 2014 2 次提交
  13. 20 8月, 2014 1 次提交
  14. 19 8月, 2014 2 次提交
  15. 09 8月, 2014 2 次提交
    • J
      x86: Add "make tinyconfig" to configure the tiniest possible kernel · 0da1d4a0
      Josh Triplett 提交于
      Since commit 5d2acfc7 ("kconfig: make
      allnoconfig disable options behind EMBEDDED and EXPERT") in 3.15-rc1,
      "make allnoconfig" disables every possible config option.
      
      However, a few configuration options (CC_OPTIMIZE_FOR_SIZE,
      OPTIMIZE_INLINING) produce a smaller kernel when turned on, and a few
      choices exist (compression, highmem, allocator) for which a non-default
      option produces a smaller kernel.
      
      Add a "tinyconfig" option, which starts from allnoconfig and then sets
      these options to configure the tiniest possible kernel.  This provides a
      better baseline for embedded systems or efforts to reduce kernel size.
      Signed-off-by: NJosh Triplett <josh@joshtriplett.org>
      0da1d4a0
    • J
      x86, platform, kconfig: move kvmconfig functionality to a helper · 3aaefce1
      Josh Triplett 提交于
      The new mergeconfig helper makes it easier to add other partial
      configurations similar to kvmconfig.  Architecture-independent portions
      of those partial configurations should go in
      kernel/configs/${name}.config, and architecture-dependent portions
      should go in arch/${arch}/configs/${name}.config.
      
      Based on a patch by Luis R. Rodriguez <mcgrof@suse.com>.
      Originally-Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      
      Modified to make the helper name more general than just virtualization,
      support architecture-dependent and architecture-independent partial
      configurations, move the helper and kvmconfig to
      scripts/kconfig/Makefile, and factor out more of the common file path.
      Signed-off-by: NJosh Triplett <josh@joshtriplett.org>
      3aaefce1
  16. 10 6月, 2014 3 次提交
  17. 30 4月, 2014 1 次提交
  18. 08 4月, 2014 1 次提交
  19. 21 12月, 2013 1 次提交
  20. 09 10月, 2013 6 次提交
  21. 05 9月, 2013 2 次提交