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, 10 Aug 2011 14:07:36 +0100
From:	David Woodhouse <dwmw2@...radead.org>
To:	Michal Marek <mmarek@...e.cz>
Cc:	Arnaud Lacombe <lacombar@...il.com>,
	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	linux-kbuild@...r.kernel.org
Subject: Re: [PATCH 2/2] Enable 'make CONFIG_FOO=y oldconfig'

On Wed, 2011-08-10 at 14:59 +0200, Michal Marek wrote:
> I wasn't talking about the env= syntax, but about
> 
> make CONFIG_EXT2_FS=m all
> which makes kbuild visit fs/ext2 even if CONFIG_EXT2_FS is disabled in
> .config. With no update of the configuration or checking the dependencies.
> 
> Hm, actually this would be a problem even if kconfig does read the
> CONFIG_* variables from the environment, because it could result in a
> mismatch if kconfig determines that the variable cannot be set, but make
> still sees it in the environment. So we would have to use 'undefine
> CONFIG_FOO' instead of '# CONFIG_FOO is not set' in
> include/config/auto.conf, to be able to properly support make CONFIG_FOO=y. 

That's always been true; it's *always* been broken like that.

But now we're actually *encouraging* people to start setting
CONFIG_FOO=y in the environment or the make command line, so we should
certainly make it more robust.

It should be simple enough to force a reconfig if CONFIG_* is specified
in the environment.

Actually, while we're at it let's stop just picking it up from the
environment and pick it up *only* if it's overridden in the make flags.

Something like this will list the variables which are overridden on the
command line:

CONFIG_OVERRIDES := $(patsubst line:%,%,$(filter line:%,$(foreach var, $(filter CONFIG_%,$(.VARIABLES)), $(origin $(var)):$(var))))

Then we can make auto.conf.cmd trigger a reconfig if it's non-empty, and
make the kconfig tool allow overrides *only* for those variables
specified in $CONFIG_OVERRIDES... which avoids any worries about "stray"
environment variables too.

I'll see if I can clean the above expression up and do that.
 
-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@...el.com                              Intel Corporation

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