|
Message-ID: <CAGXu5j+yeKMFwziyKzKBg-5_EiE9qE28JUkoidCwkmHQOtedcg@mail.gmail.com> Date: Tue, 9 Apr 2019 10:06:57 -0700 From: Kees Cook <keescook@...omium.org> To: Masahiro Yamada <yamada.masahiro@...ionext.com> Cc: Alexander Potapenko <glider@...gle.com>, James Morris <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>, linux-security-module <linux-security-module@...r.kernel.org>, Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>, Nick Desaulniers <ndesaulniers@...gle.com>, Kostya Serebryany <kcc@...gle.com>, Dmitry Vyukov <dvyukov@...gle.com>, Sandeep Patil <sspatil@...roid.com>, Kernel Hardening <kernel-hardening@...ts.openwall.com> Subject: Re: [PATCH v3 1/2] initmem: introduce CONFIG_INIT_ALL_MEMORY and CONFIG_INIT_ALL_STACK On Tue, Apr 9, 2019 at 1:38 AM Masahiro Yamada <yamada.masahiro@...ionext.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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.