* [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
@ 2019-12-11 13:39 Arnd Bergmann
2019-12-11 13:59 ` Ard Biesheuvel
2019-12-12 4:51 ` Masahiro Yamada
0 siblings, 2 replies; 7+ messages in thread
From: Arnd Bergmann @ 2019-12-11 13:39 UTC (permalink / raw)
To: Kees Cook, Masahiro Yamada
Cc: Arnd Bergmann, Emese Revfy, Ard Biesheuvel, Andrey Ryabinin,
kernel-hardening, linux-kernel, clang-built-linux
I noticed that randconfig builds with gcc no longer produce a lot of
ccache hits, unlike with clang, and traced this back to plugins
now being enabled unconditionally if they are supported.
I am now working around this by adding
export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%
to my top-level Makefile. This changes the heuristic that ccache uses
to determine whether the plugins are the same after a 'make clean'.
However, it also seems that being able to just turn off the plugins is
generally useful, at least for build testing it adds noticeable overhead
but does not find a lot of bugs additional bugs, and may be easier for
ccache users than my workaround.
Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
scripts/gcc-plugins/Kconfig | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig
index d33de0b9f4f5..e3569543bdac 100644
--- a/scripts/gcc-plugins/Kconfig
+++ b/scripts/gcc-plugins/Kconfig
@@ -14,8 +14,8 @@ config HAVE_GCC_PLUGINS
An arch should select this symbol if it supports building with
GCC plugins.
-config GCC_PLUGINS
- bool
+menuconfig GCC_PLUGINS
+ bool "GCC plugins"
depends on HAVE_GCC_PLUGINS
depends on PLUGIN_HOSTCC != ""
default y
@@ -25,8 +25,7 @@ config GCC_PLUGINS
See Documentation/core-api/gcc-plugins.rst for details.
-menu "GCC plugins"
- depends on GCC_PLUGINS
+if GCC_PLUGINS
config GCC_PLUGIN_CYC_COMPLEXITY
bool "Compute the cyclomatic complexity of a function" if EXPERT
@@ -113,4 +112,4 @@ config GCC_PLUGIN_ARM_SSP_PER_TASK
bool
depends on GCC_PLUGINS && ARM
-endmenu
+endif
--
2.20.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
2019-12-11 13:39 [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again Arnd Bergmann
@ 2019-12-11 13:59 ` Ard Biesheuvel
2019-12-12 4:51 ` Masahiro Yamada
1 sibling, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2019-12-11 13:59 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Kees Cook, Masahiro Yamada, Emese Revfy, Ard Biesheuvel,
Andrey Ryabinin, Kernel Hardening, Linux Kernel Mailing List,
clang-built-linux
On Wed, 11 Dec 2019 at 14:40, Arnd Bergmann <arnd@arndb.de> wrote:
>
> I noticed that randconfig builds with gcc no longer produce a lot of
> ccache hits, unlike with clang, and traced this back to plugins
> now being enabled unconditionally if they are supported.
>
> I am now working around this by adding
>
> export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%
>
> to my top-level Makefile. This changes the heuristic that ccache uses
> to determine whether the plugins are the same after a 'make clean'.
>
> However, it also seems that being able to just turn off the plugins is
> generally useful, at least for build testing it adds noticeable overhead
> but does not find a lot of bugs additional bugs, and may be easier for
> ccache users than my workaround.
>
> Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> scripts/gcc-plugins/Kconfig | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig
> index d33de0b9f4f5..e3569543bdac 100644
> --- a/scripts/gcc-plugins/Kconfig
> +++ b/scripts/gcc-plugins/Kconfig
> @@ -14,8 +14,8 @@ config HAVE_GCC_PLUGINS
> An arch should select this symbol if it supports building with
> GCC plugins.
>
> -config GCC_PLUGINS
> - bool
> +menuconfig GCC_PLUGINS
> + bool "GCC plugins"
> depends on HAVE_GCC_PLUGINS
> depends on PLUGIN_HOSTCC != ""
> default y
> @@ -25,8 +25,7 @@ config GCC_PLUGINS
>
> See Documentation/core-api/gcc-plugins.rst for details.
>
> -menu "GCC plugins"
> - depends on GCC_PLUGINS
> +if GCC_PLUGINS
>
> config GCC_PLUGIN_CYC_COMPLEXITY
> bool "Compute the cyclomatic complexity of a function" if EXPERT
> @@ -113,4 +112,4 @@ config GCC_PLUGIN_ARM_SSP_PER_TASK
> bool
> depends on GCC_PLUGINS && ARM
>
> -endmenu
> +endif
> --
> 2.20.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
2019-12-11 13:39 [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again Arnd Bergmann
2019-12-11 13:59 ` Ard Biesheuvel
@ 2019-12-12 4:51 ` Masahiro Yamada
2019-12-12 9:59 ` Arnd Bergmann
1 sibling, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2019-12-12 4:51 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Kees Cook, Emese Revfy, Ard Biesheuvel, Andrey Ryabinin,
Kernel Hardening, Linux Kernel Mailing List, clang-built-linux
On Wed, Dec 11, 2019 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> I noticed that randconfig builds with gcc no longer produce a lot of
> ccache hits, unlike with clang, and traced this back to plugins
> now being enabled unconditionally if they are supported.
>
> I am now working around this by adding
>
> export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%
>
> to my top-level Makefile. This changes the heuristic that ccache uses
> to determine whether the plugins are the same after a 'make clean'.
>
> However, it also seems that being able to just turn off the plugins is
> generally useful, at least for build testing it adds noticeable overhead
> but does not find a lot of bugs additional bugs, and may be easier for
> ccache users than my workaround.
>
> Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
2019-12-12 4:51 ` Masahiro Yamada
@ 2019-12-12 9:59 ` Arnd Bergmann
2019-12-12 17:44 ` Kees Cook
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2019-12-12 9:59 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Kees Cook, Emese Revfy, Ard Biesheuvel, Andrey Ryabinin,
Kernel Hardening, Linux Kernel Mailing List, clang-built-linux,
Andrew Morton
On Thu, Dec 12, 2019 at 5:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Wed, Dec 11, 2019 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > I noticed that randconfig builds with gcc no longer produce a lot of
> > ccache hits, unlike with clang, and traced this back to plugins
> > now being enabled unconditionally if they are supported.
> >
> > I am now working around this by adding
> >
> > export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%
> >
> > to my top-level Makefile. This changes the heuristic that ccache uses
> > to determine whether the plugins are the same after a 'make clean'.
> >
> > However, it also seems that being able to just turn off the plugins is
> > generally useful, at least for build testing it adds noticeable overhead
> > but does not find a lot of bugs additional bugs, and may be easier for
> > ccache users than my workaround.
> >
> > Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
On Wed, Dec 11, 2019 at 2:59 PM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
>Acked-by: Ard Biesheuvel <ardb@kernel.org>
Thanks! Who would be the best person to pick up the patch?
Should I send it to Andrew?
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
2019-12-12 9:59 ` Arnd Bergmann
@ 2019-12-12 17:44 ` Kees Cook
2019-12-14 8:56 ` Masahiro Yamada
0 siblings, 1 reply; 7+ messages in thread
From: Kees Cook @ 2019-12-12 17:44 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Masahiro Yamada, Emese Revfy, Ard Biesheuvel, Andrey Ryabinin,
Kernel Hardening, Linux Kernel Mailing List, clang-built-linux,
Andrew Morton
On Thu, Dec 12, 2019 at 10:59:40AM +0100, Arnd Bergmann wrote:
> On Thu, Dec 12, 2019 at 5:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Wed, Dec 11, 2019 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > >
> > > I noticed that randconfig builds with gcc no longer produce a lot of
> > > ccache hits, unlike with clang, and traced this back to plugins
> > > now being enabled unconditionally if they are supported.
> > >
> > > I am now working around this by adding
> > >
> > > export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%
> > >
> > > to my top-level Makefile. This changes the heuristic that ccache uses
> > > to determine whether the plugins are the same after a 'make clean'.
> > >
> > > However, it also seems that being able to just turn off the plugins is
> > > generally useful, at least for build testing it adds noticeable overhead
> > > but does not find a lot of bugs additional bugs, and may be easier for
> > > ccache users than my workaround.
> > >
> > > Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
>
> On Wed, Dec 11, 2019 at 2:59 PM Ard Biesheuvel
> <ard.biesheuvel@linaro.org> wrote:
> >Acked-by: Ard Biesheuvel <ardb@kernel.org>
>
> Thanks! Who would be the best person to pick up the patch?
> Should I send it to Andrew?
Acked-by: Kees Cook <keescook@chromium.org>
I can take it in my tree, or I'm happy to have Masahiro take it.
--
Kees Cook
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
2019-12-12 17:44 ` Kees Cook
@ 2019-12-14 8:56 ` Masahiro Yamada
2019-12-30 19:41 ` Kees Cook
0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2019-12-14 8:56 UTC (permalink / raw)
To: Kees Cook
Cc: Arnd Bergmann, Emese Revfy, Ard Biesheuvel, Andrey Ryabinin,
Kernel Hardening, Linux Kernel Mailing List, clang-built-linux,
Andrew Morton
On Fri, Dec 13, 2019 at 2:44 AM Kees Cook <keescook@chromium.org> wrote:
>
> On Thu, Dec 12, 2019 at 10:59:40AM +0100, Arnd Bergmann wrote:
> > On Thu, Dec 12, 2019 at 5:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > On Wed, Dec 11, 2019 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > > >
> > > > I noticed that randconfig builds with gcc no longer produce a lot of
> > > > ccache hits, unlike with clang, and traced this back to plugins
> > > > now being enabled unconditionally if they are supported.
> > > >
> > > > I am now working around this by adding
> > > >
> > > > export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%
> > > >
> > > > to my top-level Makefile. This changes the heuristic that ccache uses
> > > > to determine whether the plugins are the same after a 'make clean'.
> > > >
> > > > However, it also seems that being able to just turn off the plugins is
> > > > generally useful, at least for build testing it adds noticeable overhead
> > > > but does not find a lot of bugs additional bugs, and may be easier for
> > > > ccache users than my workaround.
> > > >
> > > > Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
> > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > >
> > > Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
> >
> > On Wed, Dec 11, 2019 at 2:59 PM Ard Biesheuvel
> > <ard.biesheuvel@linaro.org> wrote:
> > >Acked-by: Ard Biesheuvel <ardb@kernel.org>
> >
> > Thanks! Who would be the best person to pick up the patch?
> > Should I send it to Andrew?
>
> Acked-by: Kees Cook <keescook@chromium.org>
>
> I can take it in my tree, or I'm happy to have Masahiro take it.
>
> --
> Kees Cook
Kees,
Please apply it to your tree.
Thanks.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
2019-12-14 8:56 ` Masahiro Yamada
@ 2019-12-30 19:41 ` Kees Cook
0 siblings, 0 replies; 7+ messages in thread
From: Kees Cook @ 2019-12-30 19:41 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Arnd Bergmann, Emese Revfy, Ard Biesheuvel, Andrey Ryabinin,
Kernel Hardening, Linux Kernel Mailing List, clang-built-linux,
Andrew Morton
On Sat, Dec 14, 2019 at 05:56:34PM +0900, Masahiro Yamada wrote:
> On Fri, Dec 13, 2019 at 2:44 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > On Thu, Dec 12, 2019 at 10:59:40AM +0100, Arnd Bergmann wrote:
> > > On Thu, Dec 12, 2019 at 5:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > >
> > > > On Wed, Dec 11, 2019 at 10:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > > > >
> > > > > I noticed that randconfig builds with gcc no longer produce a lot of
> > > > > ccache hits, unlike with clang, and traced this back to plugins
> > > > > now being enabled unconditionally if they are supported.
> > > > >
> > > > > I am now working around this by adding
> > > > >
> > > > > export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%
> > > > >
> > > > > to my top-level Makefile. This changes the heuristic that ccache uses
> > > > > to determine whether the plugins are the same after a 'make clean'.
> > > > >
> > > > > However, it also seems that being able to just turn off the plugins is
> > > > > generally useful, at least for build testing it adds noticeable overhead
> > > > > but does not find a lot of bugs additional bugs, and may be easier for
> > > > > ccache users than my workaround.
> > > > >
> > > > > Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
> > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > >
> > > > Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
> > >
> > > On Wed, Dec 11, 2019 at 2:59 PM Ard Biesheuvel
> > > <ard.biesheuvel@linaro.org> wrote:
> > > >Acked-by: Ard Biesheuvel <ardb@kernel.org>
> > >
> > > Thanks! Who would be the best person to pick up the patch?
> > > Should I send it to Andrew?
> >
> > Acked-by: Kees Cook <keescook@chromium.org>
> >
> > I can take it in my tree, or I'm happy to have Masahiro take it.
> >
> > --
> > Kees Cook
>
> Kees,
> Please apply it to your tree.
Thanks, applied!
--
Kees Cook
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-12-30 19:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 13:39 [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again Arnd Bergmann
2019-12-11 13:59 ` Ard Biesheuvel
2019-12-12 4:51 ` Masahiro Yamada
2019-12-12 9:59 ` Arnd Bergmann
2019-12-12 17:44 ` Kees Cook
2019-12-14 8:56 ` Masahiro Yamada
2019-12-30 19:41 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).