[PATCH v3 1/2] initmem: introduce CONFIG_INIT_ALL_MEMORY and CONFIG_INIT_ALL_STACK
Kees Cook
keescook at chromium.org
Tue Apr 9 17:06:57 UTC 2019
On Tue, Apr 9, 2019 at 1:38 AM Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> > +config INIT_ALL_STACK
> > + bool "Initialize all stack"
> > + depends on INIT_ALL_MEMORY
> > + depends on CC_HAS_AUTO_VAR_INIT || (HAVE_GCC_PLUGINS && PLUGIN_HOSTCC != "")
> > + select GCC_PLUGINS if !CC_HAS_AUTO_VAR_INIT
> > + select GCC_PLUGIN_STRUCTLEAK if !CC_HAS_AUTO_VAR_INIT
> > + select GCC_PLUGIN_STRUCTLEAK_BYREF_ALL if !CC_HAS_AUTO_VAR_INIT
> > + default y
> > + help
> > + Initialize uninitialized stack data with a fixed pattern
> > + (0x00 in GCC, 0xAA in Clang).
> > +
>
> I am not sure about the benefit of these umbrella CONFIGs
> since these make 'depends on' and 'select' complicated.
> I will leave it to Kees, though.
Yeah, I think this could use some more cleanup to get a single config
that represents that if gcc plugins are available (instead of having
it split across two configs now). Additionally I think this needs
refactoring against the current menu choices for
GCC_PLUGIN_STRUCTLEAK. Let me send a proposed patch in a few hours...
--
Kees Cook
More information about the Linux-security-module-archive
mailing list