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: <nycvar.YSQ.7.76.2004231128210.2671@knanqh.ubzr>
Date:   Thu, 23 Apr 2020 11:33:33 -0400 (EDT)
From:   Nicolas Pitre <nico@...xnic.net>
To:     Jason Gunthorpe <jgg@...pe.ca>
cc:     Randy Dunlap <rdunlap@...radead.org>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Saeed Mahameed <saeedm@...lanox.com>,
        "masahiroy@...nel.org" <masahiroy@...nel.org>,
        "Laurent.pinchart@...asonboard.com" 
        <Laurent.pinchart@...asonboard.com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jernej.skrabec@...l.net" <jernej.skrabec@...l.net>,
        "arnd@...db.de" <arnd@...db.de>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "jonas@...boo.se" <jonas@...boo.se>,
        "kieran.bingham+renesas@...asonboard.com" 
        <kieran.bingham+renesas@...asonboard.com>,
        "narmstrong@...libre.com" <narmstrong@...libre.com>,
        "leon@...nel.org" <leon@...nel.org>
Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword

On Thu, 23 Apr 2020, Jason Gunthorpe wrote:

> On Thu, Apr 23, 2020 at 11:11:46AM -0400, Nicolas Pitre wrote:
> > On Thu, 23 Apr 2020, Jason Gunthorpe wrote:
> > 
> > > On Thu, Apr 23, 2020 at 11:01:40AM -0400, Nicolas Pitre wrote:
> > > > On Wed, 22 Apr 2020, Randy Dunlap wrote:
> > > > 
> > > > > On 4/22/20 2:13 PM, Nicolas Pitre wrote:
> > > > > > On Wed, 22 Apr 2020, Jani Nikula wrote:
> > > > > > 
> > > > > >> On Tue, 21 Apr 2020, Nicolas Pitre <nico@...xnic.net> wrote:
> > > > > >>> This is really a conditional dependency. That's all this is about.
> > > > > >>> So why not simply making it so rather than fooling ourselves? All that 
> > > > > >>> is required is an extension that would allow:
> > > > > >>>
> > > > > >>> 	depends on (expression) if (expression)
> > > > > >>>
> > > > > >>> This construct should be obvious even without reading the doc, is 
> > > > > >>> already used extensively for other things already, and is flexible 
> > > > > >>> enough to cover all sort of cases in addition to this particular one.
> > > > > >>
> > > > > >> Okay, you convinced me. Now you only need to convince whoever is doing
> > > > > >> the actual work of implementing this stuff. ;)
> > > > > > 
> > > > > > What about this:
> > > > > > 
> > > > > > Subject: [PATCH] kconfig: allow for conditional dependencies
> > > > > > 
> > > > > > This might appear to be a strange concept, but sometimes we want
> > > > > > a dependency to be conditionally applied. One such case is currently
> > > > > > expressed with:
> > > > > > 
> > > > > > 	depends on FOO || !FOO
> > > > > > 
> > > > > > This pattern is strange enough to give one's pause. Given that it is
> > > > > > also frequent, let's make the intent more obvious with some syntaxic 
> > > > > > sugar by effectively making dependencies optionally conditional.
> > > > > > This also makes the kconfig language more uniform.
> > > > > > 
> > > > > > Signed-off-by: Nicolas Pitre <nico@...xnic.net>
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > If we must do something here, I prefer this one.
> > > > > 
> > > > > Nicolas, would you do another example, specifically for
> > > > > CRAMFS_MTD in fs/cramfs/Kconfig, please?
> > > > 
> > > > I don't see how that one can be helped. The MTD dependency is not 
> > > > optional.
> > > 
> > > Could it be done as 
> > > 
> > > config MTD
> > >    depends on CRAMFS if CRAMFS_MTD
> > > 
> > > ?
> > 
> > No. There is no logic in restricting MTD usage based on CRAMFS or 
> > CRAMFS_MTD.
> 
> Ah, I got it backwards, maybe this:
> 
> config CRAMFS
>    depends on MTD if CRAMFS_MTD
> 
> ?

Still half-backward. CRAMFS should not depend on either MTD nor 
CRAMFS_MTD.

It is CRAMFS_MTD that needs both CRAMFS and MTD. 
Furthermore CRAMFS_MTD can't be built-in if MTD is modular.


Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ