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: <CA+55aFxmpotS+Yw0niuYRq4eqpYjx6=TAvoz8v=NxD3N_7u7qg@mail.gmail.com>
Date:	Wed, 11 Apr 2012 17:04:45 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Paul Gortmaker <paul.gortmaker@...driver.com>
Cc:	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, davem@...emloft.net,
	tony@...eyournoodle.com, mmarek@...e.cz, lacombar@...il.com
Subject: Re: [PATCH 5/5] kconfig: limit IS_ENABLED & similar to CPP usage

On Wed, Apr 11, 2012 at 4:50 PM, Paul Gortmaker
<paul.gortmaker@...driver.com> wrote:
> Using IS_ENABLED() within C (vs. within CPP #if statements) requires
> us to actually define every possible bool/tristate Kconfig option
> twice (__enabled_* and __enabled_*_MODULE variants).

Why do you keep the __enabled_*[_MODULE] things alive at all?

Why can't you just check the CONFIG_xyz[_MODULE] #defines directly?

IOW, why isn't IS_ENABLED() just

  #define IS_ENABLED(option) \
    (defined(CONFIG_##option) || defined(CONFIG_##option##_MODULE))

  #define IS_BUILTIN(option) \
    (defined(CONFIG_##option))

and we're done with it all? What's the advantage of the __enabled_
thing again, when you depend on the preprocessor anyway?

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