From 2fe065dee79d9eb3525116a262083bc71a9b5c73 Mon Sep 17 00:00:00 2001 From: Dave Weinstein Date: Wed, 11 Jan 2017 15:39:07 -0800 Subject: ANDROID: lib: vsprintf: additional kernel pointer filtering options Add the kptr_restrict setting of 3 which results in both %p and %pK values being replaced by zeros. Add an additional %pP value inspired by the Grsecurity option which explicitly whitelists pointers for output. This patch is based on work by William Roberts [CV: fixed GCC warning on 32 bit targets] BUG: 30368199 Change-Id: Ic5cef86617f7758514271edd67199683d2c4e2bb Signed-off-by: Dave Weinstein --- Documentation/sysctl/kernel.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation/sysctl/kernel.txt') diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index a8e65f559..3c28e6436 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -309,6 +309,9 @@ values to unprivileged users is a concern. When kptr_restrict is set to (2), kernel pointers printed using %pK will be replaced with 0's regardless of privileges. +When kptr_restrict is set to (3), kernel pointers printed using +%p and %pK will be replaced with 0's regardless of privileges. + ============================================================== kstack_depth_to_print: (X86 only) -- cgit v1.2.3