Re: 2.6 bug: kconfig implementation doesn't match the spec

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/08/03

  • Next message: Adrian Bunk: "Re: 2.6.0-test2 won't compile"
    Date:	Fri, 8 Aug 2003 19:47:36 +0200
    To: Roman Zippel <zippel@linux-m68k.org>
    
    

    On Fri, Aug 08, 2003 at 05:16:09PM +0200, Roman Zippel wrote:
    > Hi,
    >
    > On Fri, 8 Aug 2003, Adrian Bunk wrote:
    >
    > > An example:
    > >
    > > config FOO
    > > tristate
    > > default m
    > >
    > > config BAR
    > > tristate
    > > default y if !FOO
    > > default n
    > >
    > >
    > > According to the kconfig spec BAR should be y, but the implementation in
    > > 2.6.0-mm5 sets BAR to n.
    >
    > You probably forgot to set MODULES, tristate behaves like bool in this
    > case and FOO becomes 'y' and '!FOO' is 'n'.

    No, this is with CONFIG_MODULES=y.

    Let me give another example where the kconfig implementation is
    completely broken (BTW: again with CONFIG_MODULES=y):

    According to your language definition,
      m && !m
    evaluates to "m" (it sounds a bit strange but follows directly from
    rules (5) and (7) together with the interpretation of "m" as 1 as
    explained in the section "Menu dependencies" of
    Documentation/kbuild/kconfig-language.txt).

    Let's take the following Kconfig snippet:

    config MOD
            tristate
            default m

    config TEST8
            tristate
            default MOD && !MOD

    config TEST9
            tristate
            default m && !m

    With the explations above it's obvious both TEST8 and TEST9 should be
    "m", but the current 2.6 kconfig implementation says:

    # CONFIG_TEST8 is not set
    CONFIG_TEST9=y

    That's not only different from the expected result directly derived from
    the language definition, it also gives two completely different results
    for the same expression!

    > bye, Roman

    cu
    Adrian

    -- 
           "Is there not promise of rain?" Ling Tan asked suddenly out
            of the darkness. There had been need of rain for many days.
           "Only a promise," Lao Er said.
                                           Pearl S. Buck - Dragon Seed
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Adrian Bunk: "Re: 2.6.0-test2 won't compile"

    Relevant Pages

    • CONFIG_64_BIT
      ... retrieving revision 1.3 ... diff -u -p -r1.3 Kconfig ... config MMU ...
      (Linux-Kernel)
    • Re: [PATCH/RFC] kconfig hints/tips/tricks
      ... Add a section on kconfig hints: how to do in Kconfig files. ... -Most entries define a config option, all other entries help to organize ...
      (Linux-Kernel)
    • Re: [2.6 patch] remove drivers/char/tpqic02.c
      ... >> Kconfig. ... > What happened when you ran oldconfig with a .config that had it set? ... CONFIG_QIC02_TAPE is not set in the new .config. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] make miniconfig (take 2)
      ... as it requires some kconfig hacking. ... unrecognized symbol, it would already generate a warning, and if the warning ... > To further reduce the config size one could look at the dependecies, ... Going from .config to miniconfig for my laptop's kernel, for example, goes ...
      (Linux-Kernel)
    • Re: [GIT PATCH] SCSI updates for 2.6.25
      ... for no readily apparent reason (at least until you read the Kconfig ... so primary features are allowed to select ... behaviour depending on totally unrelated config options. ... That's why we have initrd and ramdisks etc. ...
      (Linux-Kernel)