mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
mm: allow page poisoning to be enabled by default
Add a config option to enable page poisoning by default. The kernel command line option "page_poison" can be used to change the behaviour during boot. Change-Id: Ie70763841191a722b1c6125dfad119a29ed0f605 Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org> Signed-off-by: Charan Teja Reddy <charante@codeaurora.org> [swatsrid@codeaurora.org: Fix merge errors and warnings] Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org> Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
8f9b0e0a8e
commit
e6823c3dcc
2 changed files with 12 additions and 1 deletions
|
|
@ -85,6 +85,16 @@ config PAGE_POISONING
|
|||
|
||||
If unsure, say N
|
||||
|
||||
config PAGE_POISONING_ENABLE_DEFAULT
|
||||
bool "Enable page poisoning by default?"
|
||||
default n
|
||||
depends on PAGE_POISONING
|
||||
help
|
||||
Enable page poisoning of free pages by default? This value
|
||||
can be overridden by page_poison=off|on. This can be used
|
||||
to avoid passing the kernel parameter and let page poisoning
|
||||
feature enabled by default.
|
||||
|
||||
config PAGE_POISONING_NO_SANITY
|
||||
depends on PAGE_POISONING
|
||||
bool "Only poison, don't sanity check"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
#include <linux/ratelimit.h>
|
||||
#include <linux/kasan.h>
|
||||
|
||||
static bool want_page_poisoning __read_mostly;
|
||||
static bool want_page_poisoning __read_mostly
|
||||
= IS_ENABLED(CONFIG_PAGE_POISONING_ENABLE_DEFAULT);
|
||||
|
||||
static int __init early_page_poison_param(char *buf)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue