[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202110201209.A245EFB94@keescook>
Date: Wed, 20 Oct 2021 12:10:27 -0700
From: Kees Cook <keescook@...omium.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Jonathan Corbet <corbet@....net>,
linux-hardening@...r.kernel.org, linux-kbuild@...r.kernel.org,
linux-doc@...r.kernel.org, Dan Li <ashimida@...ux.alibaba.com>,
ardb@...nel.org, ojeda@...nel.org,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 2/2] gcc-plugins: Remove cyc_complexity
On Wed, Oct 20, 2021 at 10:48:59AM -0700, Nathan Chancellor wrote:
> On Wed, Oct 20, 2021 at 10:35:54AM -0700, Kees Cook wrote:
> > This plugin has no impact on the resulting binary, is disabled
> > under COMPILE_TEST, and is not enabled on any builds I'm aware of.
> > Additionally, given the clarified purpose of GCC plugins in the kernel,
> > remove cyc_complexity.
> >
> > Cc: Masahiro Yamada <masahiroy@...nel.org>
> > Cc: Michal Marek <michal.lkml@...kovi.net>
> > Cc: Nick Desaulniers <ndesaulniers@...gle.com>
> > Cc: Jonathan Corbet <corbet@....net>
> > Cc: linux-hardening@...r.kernel.org
> > Cc: linux-kbuild@...r.kernel.org
> > Cc: linux-doc@...r.kernel.org
> > Signed-off-by: Kees Cook <keescook@...omium.org>
>
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>
>
> One comment below.
>
> > ---
> > Documentation/kbuild/gcc-plugins.rst | 2 -
> > scripts/Makefile.gcc-plugins | 2 -
> > scripts/gcc-plugins/Kconfig | 16 -----
> > scripts/gcc-plugins/cyc_complexity_plugin.c | 69 ---------------------
> > 4 files changed, 89 deletions(-)
> > delete mode 100644 scripts/gcc-plugins/cyc_complexity_plugin.c
> >
> > diff --git a/Documentation/kbuild/gcc-plugins.rst b/Documentation/kbuild/gcc-plugins.rst
> > index 4b28c7a4032f..0ba76719f1b9 100644
> > --- a/Documentation/kbuild/gcc-plugins.rst
> > +++ b/Documentation/kbuild/gcc-plugins.rst
> > @@ -96,7 +96,6 @@ Enable the GCC plugin infrastructure and some plugin(s) you want to use
> > in the kernel config::
> >
> > CONFIG_GCC_PLUGINS=y
> > - CONFIG_GCC_PLUGIN_CYC_COMPLEXITY=y
> > CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y
> > ...
> >
>
> There is a comment about the cyc_complexity plugin at the very end of
> this file that should also be removed it seems:
>
> "See the cyc_complexity_plugin.c (CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) GCC plugin."
Yup; I think it was hiding from you, see here:
>
> > @@ -115,4 +114,3 @@ The GCC plugins are in scripts/gcc-plugins/. You need to put plugin source files
> > right under scripts/gcc-plugins/. Creating subdirectories is not supported.
> > It must be added to scripts/gcc-plugins/Makefile, scripts/Makefile.gcc-plugins
> > and a relevant Kconfig file.
> > -See the cyc_complexity_plugin.c (CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) GCC plugin.
^^^^
:)
Thanks!
-Kees
--
Kees Cook
Powered by blists - more mailing lists