lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081015102056.GH20183@cs181140183.pp.htv.fi>
Date:	Wed, 15 Oct 2008 13:20:56 +0300
From:	Adrian Bunk <bunk@...nel.org>
To:	Jiri Kosina <jkosina@...e.cz>
Cc:	zippel@...ux-m68k.org, sam@...nborg.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jiri Slaby <jirislaby@...il.com>,
	Mauro Carvalho Chehab <mchehab@...hat.com>
Subject: Re: [2.6 patch] HID: fix default building of all quirky devices

On Wed, Oct 15, 2008 at 09:43:18AM +0200, Jiri Kosina wrote:
> On Wed, 15 Oct 2008, Adrian Bunk wrote:
> 
> > Commit 9be7bbd54df3c9c393ccd19acc49f90c517d1291
> > (HID: build drivers for all quirky devices by default)
> > was wrong in that it select'ed the drivers, causing
> > build errors like the following with CONFIG_USB_HID=n:
> > <--  snip  -->
> > 
> > ...
> >   LD      .tmp_vmlinux1
> > drivers/built-in.o: In function `bright_probe':
> > drivers/hid/hid-bright.c:38: undefined reference to `usbhid_set_leds'
> > drivers/hid/hid-bright.c:38: undefined reference to `usbhid_set_leds'
> > drivers/built-in.o: In function `dell_probe':
> > drivers/hid/hid-dell.c:41: undefined reference to `usbhid_set_leds'
> > drivers/hid/hid-dell.c:41: undefined reference to `usbhid_set_leds'
> > drivers/built-in.o: In function `lg_probe':
> > drivers/hid/hid-lg.c:252: undefined reference to `usbhid_set_leds'
> > drivers/hid/hid-lg.c:252: more undefined references to `usbhid_set_leds' follow
> > drivers/built-in.o: In function `sony_set_operational':
> > drivers/hid/hid-sony.c:42: undefined reference to `usb_control_msg'
> > drivers/hid/hid-sony.c:42: undefined reference to `usb_control_msg'
> > make[1]: *** [.tmp_vmlinux1] Error 1
> 
> Hmm ... I am not really sure, isn't this a bug in Kconfig?

No.

> What we have right now:
> 
> - CONFIG_HID selects all the individual quirk-drivers automatically
> - the individual quirk drivers have dependency on CONFIG_USB_HID
> 
> Therefore I'd expect when CONFIG_HID is selected and CONFIG_USB_HID 
> deselected the individual drivers not to get built (due to their 
> dependency on unset option).

Different people have different expectations.

Many kernel developers seem to wrongly assume kconfig was something 
trivial and everything that does not work as expected was a bug in 
kconfig. But it is not, and there is no magic bullet like changing
how select behaves in some way that will suddenly solve all problems.

> But currently what happens is when I de-select CONFIG_USB_HID in 
> menuconfig, the configuration options for individual drivers vanish from 
> the menuconfig menu (which is expected, they depend on unset option), but 
> after saving .config they are still there. Is this how it is expected to 
> behave? (i.e. select having preference over dependency).

Select ignores dependencies on the selected options.

That's the documented behavior.

> Thanks,

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ