Skip to contentSkip to conversation

kernel 2.6.0, wrong Kconfig directives

DISCUSSION Andrea Barisani 4 participants 11 messages Dec 22, 2003 – Jan 6, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi folks,

Installing 2.6.0 I've found that some kernel options directives are wrong, in fact the option turns out to be always enabled. I don't think this is a desired behaviour.

Sorry for the format, yes I know it's ugly :) but I'll leave to you the proper solution :) so I can't make a proper patch.

- IPV6_SCTP___ option is always turned on

./net/sctp/Kconfig:

8: config IPV6_SCTP__
9: tristate
10: default y if IPV6=n
11: default IPV6 if IPV6
12:
13: config IP_SCTP
14: tristate "The SCTP Protocol (EXPERIMENTAL)"
15: depends on IPV6_SCTP__

I think something is wrong here, why the 'default y if IPV6=n' ???

- INPUT_MOUSEDEV option is always turned on

./drivers/input/Kconfig:

27: config INPUT_MOUSEDEV

28:	    tristate "Mouse interface" if EMBEDDED
29:	    default y
30:	    depends on INPUT

43: config INPUT_MOUSEDEV_PSAUX

44:         bool "Provide legacy /dev/psaux device" if EMBEDDED
45:         default y
46:         depends on INPUT_MOUSEDEV

the tristate directive is ignored in most default configurations since EMBEDDED is not set, however this doesn't allow to disable INPUT_MOUSEDEV and INPUT_MOUSEDEV_PSAUX. I don't suppose this is right.

- SOUND_GAMEPORT option is always turned on

./drivers/input/gameport/Kconfig

22: config SOUND_GAMEPORT

23:         tristate
24:         default y if GAMEPORT!=m
25:         default m if GAMEPORT=m

line 24 is definetly wrong, option is enabled if GAMEPORT=n.

Bye

P.S.
I'm not subscribed to this list so CC me if it's needed

--
------------------------------------------------------------
INFIS Network Administrator & Security Officer .*.
Department of Physics - University of Trieste V

[email protected] - GPG Key 0x864C9B9E      (   )
----------------------------------------------------  (   )
"How would you know I'm mad?" said Alice.             ^^-^^

"You must be,'said the Cat,'or you wouldn't have come here."
------------------------------------------------------------

#1 lore raw
Quoted 11 lines

- SOUND_GAMEPORT option is always turned on

./drivers/input/gameport/Kconfig

22: config SOUND_GAMEPORT

23:         tristate
24:         default y if GAMEPORT!=m
25:         default m if GAMEPORT=m

line 24 is definetly wrong, option is enabled if GAMEPORT=n.

This patch uses "select" for the dependency of GAMEPORT.

Thanks.

 drivers/input/gameport/Kconfig |    5 -----
 sound/oss/Kconfig              |   18 ++++++++++++------
 2 files changed, 12 insertions(+), 11 deletions(-)
drivers/input/gameport/Kconfig renamed from drivers/input/gameport/Kconfig~fix-config-gameport +0 -5
diff -puN drivers/input/gameport/Kconfig~fix-config-gameport drivers/input/gameport/Kconfig
@@ -19,11 +19,6 @@ config GAMEPORT
 	  To compile this driver as a module, choose M here: the
 	  module will be called gameport.
 
-config SOUND_GAMEPORT
-	tristate
-	default y if GAMEPORT!=m
-	default m if GAMEPORT=m
-
 config GAMEPORT_NS558
 	tristate "Classic ISA and PnP gameport support"
 	depends on GAMEPORT
sound/oss/Kconfig renamed from sound/oss/Kconfig~fix-config-gameport +12 -6
diff -puN sound/oss/Kconfig~fix-config-gameport sound/oss/Kconfig
@@ -173,7 +173,8 @@ config SOUND_CS4281
 
 config SOUND_ES1370
 	tristate "Ensoniq AudioPCI (ES1370)"
-	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND && PCI
+	select GAMEPORT
 	help
 	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
 	  ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find
@@ -186,7 +187,8 @@ config SOUND_ES1370
 
 config SOUND_ES1371
 	tristate "Creative Ensoniq AudioPCI 97 (ES1371)"
-	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND && PCI
+	select GAMEPORT
 	help
 	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
 	  ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if
@@ -199,7 +201,8 @@ config SOUND_ES1371
 
 config SOUND_ESSSOLO1
 	tristate "ESS Technology Solo1"
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND
+	select GAMEPORT
 	help
 	  Say Y or M if you have a PCI sound card utilizing the ESS Technology
 	  Solo1 chip. To find out if your sound card uses a
@@ -237,7 +240,8 @@ config SOUND_HARMONY
 
 config SOUND_SONICVIBES
 	tristate "S3 SonicVibes"
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND
+	select GAMEPORT
 	help
 	  Say Y or M if you have a PCI sound card utilizing the S3
 	  SonicVibes chipset. To find out if your sound card uses a
@@ -269,7 +273,8 @@ config SOUND_VRC5477
 
 config SOUND_TRIDENT
 	tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core"
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND
+	select GAMEPORT
 	---help---
 	  Say Y or M if you have a PCI sound card utilizing the Trident
 	  4DWave-DX/NX chipset or your mother board chipset has SiS 7018
@@ -782,7 +787,8 @@ config SOUND_NM256
 
 config SOUND_MAD16
 	tristate "OPTi MAD16 and/or Mozart based cards"
-	depends on SOUND_OSS && SOUND_GAMEPORT
+	depends on SOUND_OSS
+	select GAMEPORT
 	---help---
 	  Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
 	  82C928 or 82C929 or 82C931) audio interface chip. These chips are

_

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#2 lore raw
Quoted 5 lines · OGAWA Hirofumi
Quoted 5 lines

- SOUND_GAMEPORT option is always turned on

./drivers/input/gameport/Kconfig

Quoted 8 lines
Quoted 6 lines

22: config SOUND_GAMEPORT

23:         tristate
24:         default y if GAMEPORT!=m
25:         default m if GAMEPORT=m

line 24 is definetly wrong, option is enabled if GAMEPORT=n.

This patch uses "select" for the dependency of GAMEPORT.

This is wrong. It forces the joystick (GAMEPORT) in even when it's not needed, whereas SOUND_GAMEPORT handles all cases fine. That way lies kernel bloat. Please apply this documentation patch instead:

Index: drivers/input/gameport/Kconfig
===================================================================
RCS file: /home/muli/kernel/cvsroot/linux-2.5/drivers/input/gameport/Kconfig,v retrieving revision 1.4

input/gameport/Kconfig +11 -0
diff -u -u -r1.4 Kconfig
@@ -19,6 +19,17 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called gameport.
 
+
+# Yes, this looks a bit odd. Yes, it ends up being turned on in lots
+# of cases. Please don't touch it. It is here to handle the case where
+# a sound driver can be either a module or compiled in if GAMEPORT is
+# not selected, but must be a module if the joystick is selected as a 
+# module. The sound driver calls GAMEPORT functions. If GAMEPORT is
+# not selected, stubs are provided. If GAMEPORT is built in,
+# everything is fine. If GAMEPORT is a module, however, it would need
+# to be loaded for the sound driver to be able to link
+# properly. Therefore, the sound driver must be a module as well in
+# that case (and the GAMEPORT module must be loaded first). 
 config SOUND_GAMEPORT
 	tristate
 	default y if GAMEPORT!=m
Signature · 4 lines
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

"the nucleus of linux oscillates my world" - gccbot@#offtopic
#3 lore raw
Quoted 34 lines · Muli Ben-Yehuda
Quoted 5 lines · OGAWA Hirofumi
Quoted 5 lines

- SOUND_GAMEPORT option is always turned on

./drivers/input/gameport/Kconfig

Quoted 8 lines
Quoted 6 lines

22: config SOUND_GAMEPORT

23:         tristate
24:         default y if GAMEPORT!=m
25:         default m if GAMEPORT=m

line 24 is definetly wrong, option is enabled if GAMEPORT=n.

This patch uses "select" for the dependency of GAMEPORT.

This is wrong. It forces the joystick (GAMEPORT) in even when it's not needed, whereas SOUND_GAMEPORT handles all cases fine. That way lies kernel bloat. Please apply this documentation patch instead:

Index: drivers/input/gameport/Kconfig
===================================================================
RCS file: /home/muli/kernel/cvsroot/linux-2.5/drivers/input/gameport/Kconfig,v retrieving revision 1.4
diff -u -u -r1.4 Kconfig

input/gameport/Kconfig +4 -0
@@ -19,6 +19,17 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called gameport.
 
+
+# Yes, this looks a bit odd. Yes, it ends up being turned on in lots
+# of cases. Please don't touch it. It is here to handle the case where
+# a sound driver can be either a module or compiled in if GAMEPORT is

input/gameport/Kconfig line 35

Quoted 10 lines
input/gameport/Kconfig +7 -0
+# not selected, but must be a module if the joystick is selected as a 
+# module. The sound driver calls GAMEPORT functions. If GAMEPORT is
+# not selected, stubs are provided. If GAMEPORT is built in,
+# everything is fine. If GAMEPORT is a module, however, it would need
+# to be loaded for the sound driver to be able to link
+# properly. Therefore, the sound driver must be a module as well in
+# that case (and the GAMEPORT module must be loaded first). 
 config SOUND_GAMEPORT
 	tristate
 	default y if GAMEPORT!=m

I see. So why did we need the SOUND_GAMEPORT?

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#4 lore raw
Quoted 7 lines · OGAWA Hirofumi
Quoted 7 lines
input/gameport/Kconfig +7 -0
+# Yes, this looks a bit odd. Yes, it ends up being turned on in lots
+# of cases. Please don't touch it. It is here to handle the case where
+# a sound driver can be either a module or compiled in if GAMEPORT is
+# not selected, but must be a module if the joystick is selected as a 
+# module. The sound driver calls GAMEPORT functions. If GAMEPORT is
+# not selected, stubs are provided. If GAMEPORT is built in,
+# everything is fine. If GAMEPORT is a module, however, it would need
Quoted 8 lines

input/gameport/Kconfig line 35

Quoted 6 lines
input/gameport/Kconfig +3 -0
+# to be loaded for the sound driver to be able to link
+# properly. Therefore, the sound driver must be a module as well in
+# that case (and the GAMEPORT module must be loaded first). 
 config SOUND_GAMEPORT
 	tristate
 	default y if GAMEPORT!=m

I see. So why did we need the SOUND_GAMEPORT?

I thought I explained this above, quite verbosely :-) Rather than make the sound drivers depend directly on GAMEPORT, which is troublesome because Kconfig has no provisions for this type of dependancy, we create an artificial dependency, SOUND_GAMEPORT, which the sound driver depends on. SOUND_GAMEPORT depends on GAMEPORT, and Kconfig ends up doing the right thing. I hope that was clearer.

Cheers,
Muli

Signature · 4 lines
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

"the nucleus of linux oscillates my world" - gccbot@#offtopic
#5 lore raw
Quoted 8 lines · Muli Ben-Yehuda
Quoted 1 line

I see. So why did we need the SOUND_GAMEPORT?

I thought I explained this above, quite verbosely :-) Rather than make the sound drivers depend directly on GAMEPORT, which is troublesome because Kconfig has no provisions for this type of dependancy, we create an artificial dependency, SOUND_GAMEPORT, which the sound driver depends on. SOUND_GAMEPORT depends on GAMEPORT, and Kconfig ends up doing the right thing. I hope that was clearer.

Umm... SOUND_GAMEPORT is always true, so GAMEPORT is just option, not dependency.

It may be good to be documented as the help of Kconfig instead of SOUND_GAMEPORT...

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#6 lore raw
Quoted 11 lines · OGAWA Hirofumi
Quoted 8 lines · Muli Ben-Yehuda
Quoted 1 line

I see. So why did we need the SOUND_GAMEPORT?

I thought I explained this above, quite verbosely :-) Rather than make the sound drivers depend directly on GAMEPORT, which is troublesome because Kconfig has no provisions for this type of dependancy, we create an artificial dependency, SOUND_GAMEPORT, which the sound driver depends on. SOUND_GAMEPORT depends on GAMEPORT, and Kconfig ends up doing the right thing. I hope that was clearer.

Quoted 5 lines

Umm... SOUND_GAMEPORT is always true, so GAMEPORT is just option, not dependency.

It may be good to be documented as the help of Kconfig instead of SOUND_GAMEPORT...

Ah, sorry. You are right. I understanded it now.

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#7 lore raw
In reply to Andrea Barisani
Quoted 10 lines · Andrea Barisani

- SOUND_GAMEPORT option is always turned on

./drivers/input/gameport/Kconfig

22: config SOUND_GAMEPORT

23:         tristate
24:         default y if GAMEPORT!=m
25:         default m if GAMEPORT=m

line 24 is definetly wrong, option is enabled if GAMEPORT=n.

line 24 is correct. CONFIG_SOUND_GAMEPORT is an odd beast, see e.g.
http://marc.theaimsgroup.com/?l=linux-kernel&m=106479206731633&w=2 for details. Please leave poor CONFIG_GAMEPORT alone.

Cheers,
Muli

Signature · 4 lines
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

"the nucleus of linux oscillates my world" - gccbot@#offtopic
#8 lore raw
In reply to Andrea Barisani
Quoted 2 lines · Andrea Barisani

Hi folks,

Hi Andrea,

Quoted 22 lines

Installing 2.6.0 I've found that some kernel options directives are wrong, in fact the option turns out to be always enabled. I don't think this is a desired behaviour.

Sorry for the format, yes I know it's ugly :) but I'll leave to you the proper solution :) so I can't make a proper patch.

- IPV6_SCTP___ option is always turned on

./net/sctp/Kconfig:

8: config IPV6_SCTP__
9: tristate
10: default y if IPV6=n
11: default IPV6 if IPV6
12:
13: config IP_SCTP
14: tristate "The SCTP Protocol (EXPERIMENTAL)"
15: depends on IPV6_SCTP__

Quoted 1 line

I think something is wrong here, why the 'default y if IPV6=n' ???

It's ___ugly___ but designed this way...

The whole purpose of IPV6_SCTP__ is to disallow static IP_SCTP with modular IPV6.

Quoted 15 lines

- INPUT_MOUSEDEV option is always turned on

./drivers/input/Kconfig:

27: config INPUT_MOUSEDEV

28:	    tristate "Mouse interface" if EMBEDDED
29:	    default y
30:	    depends on INPUT

43: config INPUT_MOUSEDEV_PSAUX

44:         bool "Provide legacy /dev/psaux device" if EMBEDDED
45:         default y
46:         depends on INPUT_MOUSEDEV
Quoted 4 lines

the tristate directive is ignored in most default configurations since EMBEDDED is not set, however this doesn't allow to disable INPUT_MOUSEDEV and INPUT_MOUSEDEV_PSAUX. I don't suppose this is right.
...

These EMBEDDED are there to help people not to accidentially disable these options although they might require them.

Quoted 2 lines

Bye
...

cu
Adrian

Signature · 4 lines
       "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
#9 lore raw
Quoted 5 lines · Adrian Bunk
Quoted 2 lines · Andrea Barisani

Hi folks,

Hi Andrea,

Hi!

Quoted 23 lines
Quoted 23 lines

Installing 2.6.0 I've found that some kernel options directives are wrong, in fact the option turns out to be always enabled. I don't think this is a desired behaviour.

Sorry for the format, yes I know it's ugly :) but I'll leave to you the proper solution :) so I can't make a proper patch.

- IPV6_SCTP___ option is always turned on

./net/sctp/Kconfig:

8: config IPV6_SCTP__
9: tristate
10: default y if IPV6=n
11: default IPV6 if IPV6
12:
13: config IP_SCTP
14: tristate "The SCTP Protocol (EXPERIMENTAL)"
15: depends on IPV6_SCTP__

Quoted 7 lines
Quoted 1 line

I think something is wrong here, why the 'default y if IPV6=n' ???

It's ___ugly___ but designed this way...

The whole purpose of IPV6_SCTP__ is to disallow static IP_SCTP with modular IPV6.

Ok, so it's actually a "dummy" config with not linked with real code. A simple grep suggest that. If so I won't complain again, now it's clear ;)

However it's really ___ugly___ ;)

Quoted 3 lines

These EMBEDDED are there to help people not to accidentially disable these options although they might require them.

Ok that's fine, however I personally think this should be documented in EMBEDDED related options to let people know how they can disable them.

And I really think that MOUSEDEV should not be considered a 'not-standard' option. It's quite common disabling MOUSE support on servers, terminals and so on. :)

Quoted 2 lines

cu
Adrian

Bye and thanks

--
------------------------------------------------------------
INFIS Network Administrator & Security Officer .*.
Department of Physics - University of Trieste V

[email protected] - GPG Key 0x864C9B9E      (   )
----------------------------------------------------  (   )
"How would you know I'm mad?" said Alice.             ^^-^^

"You must be,'said the Cat,'or you wouldn't have come here."
------------------------------------------------------------

#10 lore raw
Quoted 1 line · Andrea Barisani

Hi!

Hi Andrea!

Quoted 4 lines

...
And I really think that MOUSEDEV should not be considered a 'not-standard' option. It's quite common disabling MOUSE support on servers, terminals and so on. :)

If the only effect of an unnecessaryly enabled option are a few kB wasted space, this isn't a big problem in most situations.

If it's easy to accidentially disable an important option, it's good to protect users against doing so.

People who _really_ need the space simply enable EMBEDDED to disable such an option.

Quoted 1 line

Bye and thanks

cu
Adrian

Signature · 4 lines
       "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