aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDave Weinstein <olorin@google.com>2017-01-11 16:27:59 -0800
committerMoyster <oysterized@gmail.com>2018-11-27 15:21:36 +0100
commitb32e2d51665e3b6af648dec474db214b6312d967 (patch)
tree760a6d27269b881331e8dc205545a6527a4a0baf /lib
parent9e51fbebfb952d202bf6e46e15eda6e9d7327f7d (diff)
lib: vsprintf: default kptr_restrict to the maximum value
Set the initial value of kptr_restrict to the maximum setting rather than the minimum setting, to ensure that early boot logging is not leaking information. BUG: 30368199 Change-Id: If738e3b2ff85b737127daf16f2f3a722e616f389 Signed-off-by: Dave Weinstein <olorin@google.com> Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index f3fbfae4f..1010dff5c 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1177,7 +1177,7 @@ char *address_val(char *buf, char *end, const void *addr,
return number(buf, end, num, spec);
}
-int kptr_restrict __read_mostly;
+int kptr_restrict __read_mostly = 4;
/*
* Show a '%p' thing. A kernel extension is that the '%p' is followed