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:	Fri, 5 Mar 2010 04:43:27 +0100
From:	Frans Pop <elendil@...net.nl>
To:	paulmck@...ux.vnet.ibm.com
Cc:	linux-kernel@...r.kernel.org, zippel@...ux-m68k.org, mingo@...e.hu,
	akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
	geert@...ux-m68k.org, cloos@...loos.com
Subject: Re: [PATCH] v3 kconfig: place git SHA1 in .config output if in SCM

On Friday 05 March 2010, Paul E. McKenney wrote:
> o	Added the KBUILD_CONFIG_NO_CHECK_DIRTY environment variable,
> 	and modified scripts/setlocalversion to check it, as suggested
> 	by James Cloos.

Just to state the obvious: this will also affect CONFIG_LOCALVERSION_AUTO.

> @@ -450,12 +457,52 @@ int conf_write(const char *name)
>  	if (env && *env)
>  		use_timestamp = 0;
>
> +	strcpy(localversion, "-?-nopath");
> +	path = getenv(SRCTREE);
> +	if (path && *path) {
> +		strcpy(localversion, "-?-pipe()-failed");
> +		if (pipe(pipefd) != 0)
> +			goto nolocalversion;
> +		env = getenv("KBUILD_CONFIG_NO_CHECK_DIRTY");

Is this line actually needed? AFAICT the variable is unused here and should 
pass down through the environment to the setlocalversion script without 
needing any help.

> +		sprintf(cmdline, "%s/scripts/setlocalversion", path);
> +		strcpy(localversion, "-?-fork()-failed");
> +		pid = fork();

Do I read correctly that you're also postfixing error conditions to the 
kernel version? Don't think that's a great idea TBH. Errors should be 
printed to STDERR as they occur, not as pseudo version strings.

Users coming across them in config files would be very unlikely to be able 
to make any sense of them. IMO, if no VCS version can be determined, 
nothing should be printed.

Cheers,
FJP
--
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