linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: multi_v7_defconfig: enable GCC plugin support and structleak plugin
@ 2019-01-22 11:09 Ard Biesheuvel
  2019-01-30 21:43 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Ard Biesheuvel @ 2019-01-22 11:09 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: arm, Ard Biesheuvel

Enable the base GCC plugin support symbol CONFIG_GCC_PLUGINS for
multi_v7_defconfig so that builds hosted on systems that have a
supported version of GCC along with the prerequisite headers will
allow GCC plugins to be used during the build. At the moment, this
will also enable the ARM per-task stack protector plugin, since
all its remaining Kconfig dependencies are fulfilled by default.

At the same time, enable the structleak plugin. This plugin ensures
that local struct type variables are fully initialized, preventing
inadvertent leaks of kernel state if such variables are shared with
userland. This is a reasonable transformation to apply by default,
since it does not adversely affect performance, and does not affect
GCC compiler diagnostics regarding the use of uninitialized local
variables.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/arm/configs/multi_v7_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 5bee34a7ff2e..c1e82c237ed0 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -1028,3 +1028,5 @@ CONFIG_CRYPTO_AES_ARM_CE=m
 CONFIG_CRYPTO_GHASH_ARM_CE=m
 CONFIG_CRYPTO_CRC32_ARM_CE=m
 CONFIG_CRYPTO_CHACHA20_NEON=m
+CONFIG_GCC_PLUGINS=y
+CONFIG_GCC_PLUGIN_STRUCTLEAK=y
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: multi_v7_defconfig: enable GCC plugin support and structleak plugin
  2019-01-22 11:09 [PATCH] ARM: multi_v7_defconfig: enable GCC plugin support and structleak plugin Ard Biesheuvel
@ 2019-01-30 21:43 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2019-01-30 21:43 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: arm-soc, Linux ARM

On Tue, Jan 22, 2019 at 12:09 PM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
>
> Enable the base GCC plugin support symbol CONFIG_GCC_PLUGINS for
> multi_v7_defconfig so that builds hosted on systems that have a
> supported version of GCC along with the prerequisite headers will
> allow GCC plugins to be used during the build. At the moment, this
> will also enable the ARM per-task stack protector plugin, since
> all its remaining Kconfig dependencies are fulfilled by default.
>
> At the same time, enable the structleak plugin. This plugin ensures
> that local struct type variables are fully initialized, preventing
> inadvertent leaks of kernel state if such variables are shared with
> userland. This is a reasonable transformation to apply by default,
> since it does not adversely affect performance, and does not affect
> GCC compiler diagnostics regarding the use of uninitialized local
> variables.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  arch/arm/configs/multi_v7_defconfig | 2 ++
>  1 file changed, 2 insertions(+)

Applied to arm/defconfig, thanks!

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-30 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 11:09 [PATCH] ARM: multi_v7_defconfig: enable GCC plugin support and structleak plugin Ard Biesheuvel
2019-01-30 21:43 ` Arnd Bergmann

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).