linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Alexander Potapenko <glider@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@linux.com>,
	 Kees Cook <keescook@chromium.org>,
	Laura Abbott <labbott@redhat.com>,  Linux-MM <linux-mm@kvack.org>,
	 linux-security-module <linux-security-module@vger.kernel.org>,
	 Kernel Hardening <kernel-hardening@lists.openwall.com>,
	 Masahiro Yamada <yamada.masahiro@socionext.com>,
	James Morris <jmorris@namei.org>,
	 "Serge E. Hallyn" <serge@hallyn.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	 Kostya Serebryany <kcc@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Sandeep Patil <sspatil@android.com>,
	 Randy Dunlap <rdunlap@infradead.org>,
	Jann Horn <jannh@google.com>,
	 Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 1/4] mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options
Date: Wed, 8 May 2019 12:02:39 -0700	[thread overview]
Message-ID: <CAGXu5jKfxYfRQS+CouYZc8-BMEWR1U3kwshu4892pM0pmmACGw@mail.gmail.com> (raw)
In-Reply-To: <20190508153736.256401-2-glider@google.com>

On Wed, May 8, 2019 at 8:38 AM Alexander Potapenko <glider@google.com> wrote:
> The new options are needed to prevent possible information leaks and
> make control-flow bugs that depend on uninitialized values more
> deterministic.

I like having this available on both alloc and free. This makes it
much more configurable for the end users who can adapt to their work
loads, etc.

> Linux build with -j12, init_on_free=1:  +24.42% sys time (st.err 0.52%)
> [...]
> Linux build with -j12, init_on_alloc=1: +0.57% sys time (st.err 0.40%)

Any idea why there is such a massive difference here? This seems to
high just for cache-locality effects of touching all the freed pages.

-- 
Kees Cook


  reply	other threads:[~2019-05-08 19:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 15:37 [PATCH 0/4] RFC: add init_on_alloc/init_on_free " Alexander Potapenko
2019-05-08 15:37 ` [PATCH 1/4] mm: security: introduce init_on_alloc=1 and init_on_free=1 " Alexander Potapenko
2019-05-08 19:02   ` Kees Cook [this message]
2019-05-09 16:43     ` Alexander Potapenko
2019-05-09  1:04   ` Randy Dunlap
2019-05-08 15:37 ` [PATCH 2/4] lib: introduce test_meminit module Alexander Potapenko
2019-05-08 15:37 ` [PATCH 3/4] gfp: mm: introduce __GFP_NOINIT Alexander Potapenko
2019-05-08 19:08   ` Kees Cook
2019-05-09 13:23     ` Alexander Potapenko
2019-05-11  7:28       ` Souptick Joarder
2019-05-14 14:39         ` Alexander Potapenko
2019-05-15 10:06           ` Souptick Joarder
2019-05-08 15:37 ` [PATCH 4/4] net: apply __GFP_NOINIT to AF_UNIX sk_buff allocations Alexander Potapenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGXu5jKfxYfRQS+CouYZc8-BMEWR1U3kwshu4892pM0pmmACGw@mail.gmail.com \
    --to=keescook@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=jannh@google.com \
    --cc=jmorris@namei.org \
    --cc=kcc@google.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ndesaulniers@google.com \
    --cc=rdunlap@infradead.org \
    --cc=serge@hallyn.com \
    --cc=sspatil@android.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox