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: <48383830.6060504@goop.org>
Date:	Sat, 24 May 2008 16:45:52 +0100
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Sam Ravnborg <sam@...nborg.org>
CC:	"H. Peter Anvin" <hpa@...or.com>,
	Steve French <smfrench@...il.com>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: kernel coding style for if ... else which cross #ifdef

Sam Ravnborg wrote:
> We should actually do as you intially suggested and alwyas
> define CONFIG_FOO no matter if FOO is built-in or module.
> Because we do only want to distingush between the two in rare cases.
>
> But that is a separate patch and lets not do the same
> mistage with CFG_*
>   

I think pretty strongly that CFG_ and CONFIG_ should be exactly 
parallel.  If you want to change the meaning of CONFIG_X in the presence 
of modules, then change CFG_X at the same time.  Making them have 
different meanings will just confuse anyone wanting to convert #ifdef 
CONFIG_ code into if(CFG_) code.

> I cooked up following patch - but I have not test-build a kernel yet.
> We may use CFG_* here and there and clash is not good.
>   

I have to say I'm not very keen on the CFG_* prefix.  It doesn't have 
any inherent meaning and just looks like a redundant abbreviation of 
CONFIG_; something which actually expresses the notion that it's always 
a compile-time constant would be better.  Not that I have any 
particularly good alternatives: CONST_? CCONST_? CONFIG_X_VAL? KCONFIG_? 
KONFIG_? KCONST_?

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