[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FBEB24FF-5885-4938-8D1C-9B7BA9071FB9@kernel.org>
Date: Thu, 05 Dec 2024 09:58:44 +1000
From: Kees Cook <kees@...nel.org>
To: mailhol.vincent@...adoo.fr,
Vincent Mailhol via B4 Relay <devnull+mailhol.vincent.wanadoo.fr@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
David Laight <David.Laight@...lab.com>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, Yury Norov <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko Ursulin <tursulin@...ulin.net>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>, James Clark <james.clark@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Rikard Falkeborn <rikard.falkeborn@...il.com>,
Martin Uecker <Martin.Uecker@....uni-goettingen.de>
CC: linux-sparse@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, linux-hardening@...r.kernel.org,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
Vincent Mailhol <mailhol.vincent@...adoo.fr>
Subject: Re: [PATCH 00/10] compiler.h: refactor __is_constexpr() into is_const{,_true,_false}()
On December 3, 2024 3:33:22 AM GMT+10:00, Vincent Mailhol via B4 Relay <devnull+mailhol.vincent.wanadoo.fr@...nel.org> wrote:
>This series is the spiritual successor of [1] which introduced
>const_true(). In [1], following a comment from David Laight, Linus
>came with a suggestion to simplify __is_constexpr() and its derived
>macros using a _Generic() selection. Because of the total change of
>scope, I am starting a new series.
>
>The goal is to introduce a set of three macros:
>
> - is_const(): a one to one replacement of __is_constexpr() in term
> of features but written in a less hacky way thanks to _Generic().
>
> - is_const_true(): tells whether or not the argument is a true
> integer constant expression.
>
> - is_const_false(): tells whether or not the argument is a false
> integer constant expression.
But why make this change? Is something broken? Does it make builds faster?
> 7 files changed, 97 insertions(+), 84 deletions(-)
It makes the code larger too. I don't see what the benefit is, and given how much time has been spent making sure the existing stuff works correctly, I feel like we should have a clear benefit to replacing it all.
-Kees
--
Kees Cook
Powered by blists - more mailing lists