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: <20071021094517.78dd1916.rdunlap@xenotime.net>
Date:	Sun, 21 Oct 2007 09:45:17 -0700
From:	Randy Dunlap <rdunlap@...otime.net>
To:	Henrik Carlqvist <hc1@...lhem.se>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: tristate and bool not enogh for Kconfig anymore

On Sun, 21 Oct 2007 12:24:02 +0200 Henrik Carlqvist wrote:

> On Sun, 21 Oct 2007 00:47:38 -0400
> Valdis.Kletnieks@...edu wrote:
> 
> > On Sat, 20 Oct 2007 21:17:00 +0200, Sam Ravnborg said:
> > > I assume
> > > 	depends on MODULES
> > > 
> > > should do the trick.
> > 
> > Umm... I think that will work backwards, and give you CONFIG_FOO=y
> > if.f the kernel *supports* modules. What he needs is to be able to say
> > CONFIG_FOO=n or CONFIG_FOO=m, but *ban* CONFIG_FOO=y.
> 
> Yes, thats right, MODULES does not ban y as would be needed. As an example

Agreed.

> I tried to do a quick test, I edited drivers/scsi/qla2xxx/Kconfig to look
> like this:
> 
> -8<-------------------------------------------------------
> config SCSI_QLA_FC
>         tristate "QLogic QLA2XXX Fibre Channel Support"
>         depends on PCI && SCSI && MODULES
>         select SCSI_FC_ATTRS
>         select FW_LOADER
>         ---help---
>         This qla2xxx driver supports all QLogic Fibre Channel
>         PCI and PCIe host adapters.
> 
>         By default, firmware for the ISP parts will be loaded
>         via the Firmware Loader interface.
> 
>         ISP               Firmware Filename
>         ----------        -----------------
>         21xx              ql2100_fw.bin
>         22xx              ql2200_fw.bin
>         2300, 2312, 6312  ql2300_fw.bin
>         2322, 6322        ql2322_fw.bin
>         24xx              ql2400_fw.bin
> 
>         Upon request, the driver caches the firmware image until
>         the driver is unloaded.
> 
>         Firmware images can be retrieved from:
> 
>                 ftp://ftp.qlogic.com/outgoing/linux/firmware/
> -8<-------------------------------------------------------
> 
> The only thing that I did change was that I added "&& MODULES" to the
> depends line. However, this only causes the driver to be possible to build
> when you build a kernel with module support. Still tristate allows you to
> build it both as a module and as a driver built into the kernel. However,
> when built into the kernel the driver is unusable as it needs its firmware
> which it can't reach. 
> 
> Is there any other way to specify that a functionality can only be built
> as a module, not built into the kernel?

config FOO
	depends on BAR && m

restricts FOO to module-only.

> In my firsta attempts to post about these tests my post ended up not on
> the mailing list but as a reply to Sam Ravnborg only, apologies for
> that...

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