Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Alexander Potapenko 771ee2641e UPSTREAM: mm: init: report memory auto-initialization features at boot time
Upstream commit 23a5c8cb7a91 ("mm: init: report memory
auto-initialization features at boot time").

Print the currently enabled stack and heap initialization modes.

Stack initialization is enabled by a config flag, while heap
initialization is configured at boot time with defaults being set in the
config.  It's more convenient for the user to have all information about
these hardening measures in one place at boot, so the user can reason
about the expected behavior of the running system.

The possible options for stack are:
 - "all" for CONFIG_INIT_STACK_ALL;
 - "byref_all" for CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL;
 - "byref" for CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF;
 - "__user" for CONFIG_GCC_PLUGIN_STRUCTLEAK_USER;
 - "off" otherwise.

Depending on the values of init_on_alloc and init_on_free boottime options
we also report "heap alloc" and "heap free" as "on"/"off".

In the init_on_free mode initializing pages at boot time may take a while,
so print a notice about that as well.  This depends on how much memory is
installed, the memory bandwidth, etc.  On a relatively modern x86 system,
it takes about 0.75s/GB to wipe all memory:

  [    0.418722] mem auto-init: stack:byref_all, heap alloc:off, heap free:on
  [    0.419765] mem auto-init: clearing system memory may take some time...
  [   12.376605] Memory: 16408564K/16776672K available (14339K kernel code, 1397K rwdata, 3756K rodata, 1636K init, 11460K bss, 368108K reserved, 0K cma-reserved)

Link: http://lkml.kernel.org/r/20190617151050.92663-3-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Suggested-by: Kees Cook <keescook@chromium.org>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: James Morris <jmorris@namei.org>
Cc: Jann Horn <jannh@google.com>
Cc: Kostya Serebryany <kcc@google.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Sandeep Patil <sspatil@android.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Marco Elver <elver@google.com>
Cc: Kaiwan N Billimoria <kaiwan@kaiwantech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Change-Id: I12ba67dd5d97491a331e7d5597b60b8e08bf453f
Bug: 138435492
Test: Boot cuttlefish with and without
Test:   CONFIG_INIT_ON_ALLOC_DEFAULT_ON/CONFIG_INIT_ON_FREE_DEFAULT_ON
Signed-off-by: Alexander Potapenko <glider@google.com>
2019-08-30 11:58:40 +02:00
arch UPSTREAM: arm64: move jump_label_init() before parse_early_param() 2019-08-30 11:56:25 +02:00
block This is the 4.19.64 stable release 2019-08-04 09:37:11 +02:00
certs export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
crypto This is the 4.19.61 stable release 2019-07-26 10:31:53 +02:00
Documentation UPSTREAM: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-08-30 11:58:12 +02:00
drivers UPSTREAM: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-08-30 11:58:12 +02:00
firmware kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
fs ANDROID: Add a tracepoint for mapping inode to full path 2019-08-27 21:50:14 +00:00
include UPSTREAM: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-08-30 11:58:12 +02:00
init UPSTREAM: mm: init: report memory auto-initialization features at boot time 2019-08-30 11:58:40 +02:00
ipc This is the 4.19.65 stable release 2019-08-06 20:08:18 +02:00
kernel This is the 4.19.68 stable release 2019-08-25 14:19:34 +02:00
lib This is the 4.19.67 stable release 2019-08-16 11:27:10 +02:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm UPSTREAM: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-08-30 11:58:12 +02:00
net UPSTREAM: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-08-30 11:58:12 +02:00
samples samples, bpf: suppress compiler warning 2019-07-14 08:11:04 +02:00
scripts This is the 4.19.68 stable release 2019-08-25 14:19:34 +02:00
security UPSTREAM: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-08-30 11:58:12 +02:00
sound ALSA: hda - Let all conexant codec enter D3 when rebooting 2019-08-25 10:47:48 +02:00
tools This is the 4.19.68 stable release 2019-08-25 14:19:34 +02:00
usr initramfs: move gen_initramfs_list.sh from scripts/ to usr/ 2018-08-22 23:21:44 +09:00
virt KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block 2019-08-25 10:47:59 +02:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore Kbuild updates for v4.17 (2nd) 2018-04-15 17:21:30 -07:00
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
abi_gki_aarch64.xml ANDROID: update ABI dump 2019-08-29 15:58:39 -07:00
build.config.gki.aarch64 Adding GKI Ramdisk to gki config 2019-08-14 18:17:18 +00:00
build.config.gki.x86_64 Adding GKI Ramdisk to gki config 2019-08-14 18:17:18 +00:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS platform/x86: Add Intel AtomISP2 dummy / power-management driver 2019-04-20 09:16:02 +02:00
Makefile This is the 4.19.68 stable release 2019-08-25 14:19:34 +02:00
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.