aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-05-12 17:00:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-12 18:18:16 -0400
commit411f05f123cbd7f8aa1edcae86970755a6e2a9d9 (patch)
tree63fa10cd8d895c36bbbacd8c5b38b25e3e1f3448 /lib
parentca1376d10810bc2c20c8d0821a9ee04ca2507c01 (diff)
vsprintf: Turn kptr_restrict off by default
kptr_restrict has been triggering bugs in apps such as perf, and it also makes the system less useful by default, so turn it off by default. This is how we generally handle security features that remove functionality, such as firewall code or SELinux - they have to be configured and activated from user-space. Distributions can turn kptr_restrict on again via this line in /etc/sysctrl.conf: kernel.kptr_restrict = 1 ( Also mark the variable __read_mostly while at it, as it's typically modified only once per bootup, or not at all. ) Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.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 bc0ac6b333dc..dfd60192bc2e 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -797,7 +797,7 @@ char *uuid_string(char *buf, char *end, const u8 *addr,
797 return string(buf, end, uuid, spec); 797 return string(buf, end, uuid, spec);
798} 798}
799 799
800int kptr_restrict = 1; 800int kptr_restrict __read_mostly;
801 801
802/* 802/*
803 * Show a '%p' thing. A kernel extension is that the '%p' is followed 803 * Show a '%p' thing. A kernel extension is that the '%p' is followed