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: <4DD1838D.7030305@suse.cz>
Date:	Mon, 16 May 2011 22:05:33 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	Arnaud Lacombe <lacombar@...il.com>
Cc:	Valdis.Kletnieks@...edu,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
	x86@...nel.org, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v2] kconfig: autogenerated config_is_xxx macro

On 16.5.2011 21:38, Arnaud Lacombe wrote:
> On Mon, May 16, 2011 at 3:03 PM,  <Valdis.Kletnieks@...edu> wrote:
>> #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
>>        if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
>>                cpu = get_nohz_timer_target();
>> #endif
>>        new_base = per_cpu(tvec_bases, cpu);
>>
>> If you convert this to an if statement, will it still compile?  Which will
>> happen first, dead code elimination, or the warning that get_nohz_timer_target()
>> is an implicit declaration because the definition in the .h file is also
>> guarded by #ifdef CONFIG_NO_HZ?
>>
> I already exposed this case, but let's prove it:
> [proven]

Yes, probably a majority #ifdef CONFIG_FOO construct cannot be converted
to C if statements. And architecture specific code can only be built on
that architecture. But there are places where it is possible to let the
compiler eliminate the if(0) and at least Ingo likes it for x86, so I'll
merge it. The more build coverage the better.

I figure that this feature is not wanted outside of the kernel build,
though. So what about an option to 'conf' that controls whether these
macros will be generated?

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