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: <CACqU3MUy_EBaVB_VHW0EcbMcV9Qn_H=oh4ZKkCaUuPtbezpC4A@mail.gmail.com>
Date:	Tue, 2 Aug 2011 13:50:53 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Michal Marek <mmarek@...e.cz>, linux-kbuild@...r.kernel.org,
	xiyou.wangcong@...il.com, rdunlap@...otime.net,
	linux-kernel@...r.kernel.org, plagnioj@...osoft.com
Subject: Re: [PATCH] kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()

Hi,

On Tue, Aug 2, 2011 at 1:33 PM, Sam Ravnborg <sam@...nborg.org> wrote:
> On Fri, Jul 29, 2011 at 03:51:37PM +0200, Michal Marek wrote:
>> Replace the config_is_*() macros with a variant that allows for grepping
>> for usage of CONFIG_* options in the code. Usage:
>>
>>   if (IS_ENABLED(CONFIG_NUMA))
>>
>> or
>>
>>   #if IS_ENABLED(CONFIG_NUMA)
>>
>> The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y'
>> or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if
>> the option is 'm'. Only boolean and tristate options are supported.
>>
>> Signed-off-by: Michal Marek <mmarek@...e.cz>
>> ---
>>
>> Everybody happy with the above naming?
> Naming is good - has my ack.
>
>
>>
>> ---
>>  Makefile                   |    2 +-
>>  include/linux/kconfig.h    |   32 ++++++++++++++++++++
>>  scripts/kconfig/confdata.c |   71 ++++++++-----------------------------------
>>  3 files changed, 47 insertions(+), 58 deletions(-)
>>  create mode 100644 include/linux/kconfig.h
>>
>> diff --git a/Makefile b/Makefile
>> index afb8e0d..bd7629b 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -360,7 +360,7 @@ CFLAGS_GCOV       = -fprofile-arcs -ftest-coverage
>>  LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include \
>>                     -Iarch/$(hdr-arch)/include/generated -Iinclude \
>>                     $(if $(KBUILD_SRC), -I$(srctree)/include) \
>> -                   -include include/generated/autoconf.h
>> +                   -include $(srctree)/include/linux/kconfig.h
>
> If we do it like this then how about adding this to autoconf.h and avoid the extra file,
> and the extra flag to gcc?
>
That would be intrusive for non-Linux users of kconfig. You would have
to hardcode a <linux/kconfig.h> in autoconf.h, which mean other
project would have to either mirror the Linux include tree structure,
or modify kconfig for the desired include path, if the feature is
desired at all. As I see it, Linux, through Kbuild, is a user of
kconfig.

I might send a patch to conditionally generate the __enable_<FOO>
stuff so that other project have the choice to use this feature or not
(and avoid namespace utilization if not), but that's low priority.

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