From: Alexander Potapenko <glider@google.com>
To: akpm@linux-foundation.org, cl@linux.com, keescook@chromium.org,
labbott@redhat.com
Cc: linux-mm@kvack.org, linux-security-module@vger.kernel.org,
kernel-hardening@lists.openwall.com,
yamada.masahiro@socionext.com, jmorris@namei.org,
serge@hallyn.com, ndesaulniers@google.com, kcc@google.com,
dvyukov@google.com, sspatil@android.com, rdunlap@infradead.org,
jannh@google.com, mark.rutland@arm.com
Subject: [PATCH 0/4] RFC: add init_on_alloc/init_on_free boot options
Date: Wed, 8 May 2019 17:37:32 +0200 [thread overview]
Message-ID: <20190508153736.256401-1-glider@google.com> (raw)
Provide init_on_alloc and init_on_free boot options.
These are aimed at preventing possible information leaks and making the
control-flow bugs that depend on uninitialized values more deterministic.
Enabling either of the options guarantees that the memory returned by the
page allocator and SL[AOU]B is initialized with zeroes.
Enabling init_on_free also guarantees that pages and heap objects are
initialized right after they're freed, so it won't be possible to access
stale data by using a dangling pointer.
Alexander Potapenko (4):
mm: security: introduce init_on_alloc=1 and init_on_free=1 boot
options
lib: introduce test_meminit module
gfp: mm: introduce __GFP_NOINIT
net: apply __GFP_NOINIT to AF_UNIX sk_buff allocations
.../admin-guide/kernel-parameters.txt | 8 +
drivers/infiniband/core/uverbs_ioctl.c | 2 +-
include/linux/gfp.h | 6 +-
include/linux/mm.h | 22 ++
include/net/sock.h | 5 +
kernel/kexec_core.c | 4 +-
lib/Kconfig.debug | 8 +
lib/Makefile | 1 +
lib/test_meminit.c | 205 ++++++++++++++++++
mm/dmapool.c | 2 +-
mm/page_alloc.c | 62 +++++-
mm/slab.c | 18 +-
mm/slab.h | 16 ++
mm/slob.c | 23 +-
mm/slub.c | 28 ++-
net/core/sock.c | 31 ++-
net/unix/af_unix.c | 13 +-
security/Kconfig.hardening | 16 ++
18 files changed, 439 insertions(+), 31 deletions(-)
create mode 100644 lib/test_meminit.c
--
2.21.0.1020.gf2820cf01a-goog
next reply other threads:[~2019-05-08 15:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 15:37 Alexander Potapenko [this message]
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
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=20190508153736.256401-1-glider@google.com \
--to=glider@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=jannh@google.com \
--cc=jmorris@namei.org \
--cc=kcc@google.com \
--cc=keescook@chromium.org \
--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