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]
Date:	Wed, 7 Apr 2010 22:29:37 +0200
From:	Bruno Prémont <bonbons@...ux-vserver.org>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	linux-input@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>, rvinyard@...nmsu.edu
Subject: Re: [PATCH mmotm] hid-picolcd: depends on LCD_CLASS_DEVICE

On Wed, 07 April 2010 Randy Dunlap <randy.dunlap@...cle.com> wrote:
> On Wed, 7 Apr 2010 20:44:04 +0200 Bruno Prémont wrote:
> 
> > On Tue, 06 April 2010 Randy Dunlap <randy.dunlap@...cle.com> wrote:
> > > > 
> > > > One of my attempts did end up with a circular loop with regard to FB
> > > > (some of the FB drivers did select INPUT)?  
> > > 
> > >   (not that I can find)
> > > 
> > > CONFIG_VT does select INPUT
> > > and CONFIG_DRM_I915 does
> > > 	select INPUT if ACPI
> > 
> > A newer attempt still produces the same result:
> > 
> > drivers/input/Kconfig:9:error: found recursive dependency: INPUT ->
> >        HID_SUPPORT -> HID_PICOLCD_FB -> FB -> FB_STI -> VT -> INPUT
> > 
> > (it's only FB which causes the loop, LEDS, LCD and BACKLIGHT are fine)
> 
>   (yes, so I see)
> 
> > This is with following patch on top of the improved deps patch I sent
> > a few minutes ago deeper in this thread.
> > 
> > Is there a way around this?
> > 
> 
> Well, lesson #1 is that select is evil^W^W should only be used to enable
> library-like code, or as Documentation/kbuild/kconfig-language.txt says:
> 
>   Note:
> 	select should be used with care. select will force
> 	a symbol to a value without visiting the dependencies.
> 	By abusing select you are able to select a symbol FOO even
> 	if FOO depends on BAR that is not set.
> 	In general use select only for non-visible symbols
> 	(no prompts anywhere) and for symbols with no dependencies.
> 	That will limit the usefulness but on the other hand avoid
> 	the illegal configurations all over.
> 	kconfig should one day warn about such things.

I've read that paragraph and I would definitely prefer not to have to
use select for what this patch should achieve!

It should really be a helper for the user going through menuconfig like
"please check all what is needed to satisfy this item's dependencies"
A "try-select-deep" or whatever it could be called.

A well-behaved "GUI" implementation of this would show what would get newly
checked and give the user the opportunity to not proceed or fine-tune
y/m choices.

> (more below)
> 
> > 
> > diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> > index 782a34e..711c091 100644
> > --- a/drivers/hid/Kconfig
> > +++ b/drivers/hid/Kconfig
> > @@ -285,7 +285,7 @@ config HID_PICOLCD_FB
> >  	bool "Framebuffer support"
> >  	default !EMBEDDED
> >  	depends on HID_PICOLCD
> > -	depends on HID_PICOLCD=FB || FB=y
> > +	select FB
> 
> If you'll go back to the unpatched (by this patch) version here,
> it seems to work OK.

So best is probably to just forget about all of this non-leaf select
usage for now. (and not have one half doing one way and the other half
doing it the other way)

Thanks,
Bruno

--
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