aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-04-09 04:53:45 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-09 05:50:52 -0400
commit1ccd15497869f3ed83b5225d410df53a96e52757 (patch)
tree67c475136503f53c2b2d9d9ada1c281aef0a162b /kernel/sysctl.c
parent9ee318a7825929bc3734110b83ae8e20e53d9de3 (diff)
perf_counter: sysctl for system wide perf counters
Impact: add sysctl for paranoid/relaxed perfcounters policy Allow the use of system wide perf counters to everybody, but provide a sysctl to disable it for the paranoid security minded. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090409085524.514046352@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4286b62b34a0..8ba457838d95 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -49,6 +49,7 @@
49#include <linux/reboot.h> 49#include <linux/reboot.h>
50#include <linux/ftrace.h> 50#include <linux/ftrace.h>
51#include <linux/slow-work.h> 51#include <linux/slow-work.h>
52#include <linux/perf_counter.h>
52 53
53#include <asm/uaccess.h> 54#include <asm/uaccess.h>
54#include <asm/processor.h> 55#include <asm/processor.h>
@@ -920,6 +921,16 @@ static struct ctl_table kern_table[] = {
920 .child = slow_work_sysctls, 921 .child = slow_work_sysctls,
921 }, 922 },
922#endif 923#endif
924#ifdef CONFIG_PERF_COUNTERS
925 {
926 .ctl_name = CTL_UNNUMBERED,
927 .procname = "perf_counter_privileged",
928 .data = &sysctl_perf_counter_priv,
929 .maxlen = sizeof(sysctl_perf_counter_priv),
930 .mode = 0644,
931 .proc_handler = &proc_dointvec,
932 },
933#endif
923/* 934/*
924 * NOTE: do not add new entries to this table unless you have read 935 * NOTE: do not add new entries to this table unless you have read
925 * Documentation/sysctl/ctl_unnumbered.txt 936 * Documentation/sysctl/ctl_unnumbered.txt