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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 6 Jan 2008 19:23:05 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	Al Boldi <a1426z@...ab.com>, Adrian Bunk <bunk@...nel.org>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	David Brownell <david-b@...bell.net>, Greg KH <greg@...ah.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/5] USB Kconfig: Select SCSI for USB Mass Storage support

On Sun, Jan 06, 2008 at 06:50:43PM +0100, Stefan Richter wrote:
> Al Boldi wrote:
> > Stefan Richter wrote:
> >> Al Boldi wrote:
> >>>   	menuconfig USB_STORAGE
> >>>   	tristate "USB Mass Storage support"
> >>> -	depends on USB && SCSI
> >>> +	depends on USB && BLOCK
> >>> +	select SCSI
> >> Still wrong. SCSI also needs HAS_DMA and SCSI_DMA.
> > 
> > I don't think so.  SCSI selects SCSI_DMA, it doesn't depend on it.
> 
> "A selects B" == "A depends on B, but please don't hide A when B is off
> and silently switch B on when A is switched on".
> 
> config SCSI
> 	tristate "SCSI device support"
> 	depends on BLOCK
> 	select SCSI_DMA if HAS_DMA
> 
> So, SCSI doesn't actually need SCSI_DMA per se, but it apparently needs
> it whenever HAS_DMA != n.
> 
> > So it's safe to select SCSI here, as libata does it the same way.
> 
> Sam, does kconfig recursively follow select statements and switch on
> options which are select'ed by select'ed options?  I suppose it doesn't.

Let's try...
menu "Level 1"

config FOO1
        bool "Want to have FOO1?"
        select FOO2

config FOO2
        bool "Want to have FOO2?"
        select FOO3

config FOO3
        bool "Want to have FOO3?"

endmenu

With the above example it is obvious when running mconf
that it does so.
If you choose FOO1 in mconf and then save the configuration
you will see all symbols saved.


> 
> Maybe this would be better:
> 
>  config SCSI
>  	tristate "SCSI device support"
>  	depends on BLOCK
> -	select SCSI_DMA if HAS_DMA
> 
>  config SCSI_DMA
>  	bool
> -	default n
> +	default y if SCSI && HAS_DMA

This should be semantic equivalent and much easier to understand.

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