summaryrefslogtreecommitdiff
path: root/security/Kconfig
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2016-05-29 14:22:32 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-13 12:23:33 -0700
commit1a565f59cb3b227e0c7c1c5b58951aed5a27b5d6 (patch)
treedc300c937957a981de72e361073f301ddfb37c9e /security/Kconfig
parenta647f40d2b02cbc0456037de049d4d9e53083420 (diff)
FROMLIST: security,perf: Allow further restriction of perf_event_open
When kernel.perf_event_open is set to 3 (or greater), disallow all access to performance events by users without CAP_SYS_ADMIN. Add a Kconfig symbol CONFIG_SECURITY_PERF_EVENTS_RESTRICT that makes this value the default. This is based on a similar feature in grsecurity (CONFIG_GRKERNSEC_PERF_HARDEN). This version doesn't include making the variable read-only. It also allows enabling further restriction at run-time regardless of whether the default is changed. https://lkml.org/lkml/2016/1/11/587 Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Git-repo: https://android.googlesource.com/kernel/common.git Git-commit: 012b0adcf7299f6509d4984cf46ee11e6eaed4e4 [d-cagle@codeaurora.org: Resolve trivial merge conflicts] Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org> Bug: 29054680 Change-Id: Iff5bff4fc1042e85866df9faa01bce8d04335ab8
Diffstat (limited to 'security/Kconfig')
-rw-r--r--security/Kconfig9
1 files changed, 9 insertions, 0 deletions
diff --git a/security/Kconfig b/security/Kconfig
index 18568c21e564..c4f83485bc1f 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -23,6 +23,15 @@ config SECURITY_DMESG_RESTRICT
If you are unsure how to answer this question, answer N.
+config SECURITY_PERF_EVENTS_RESTRICT
+ bool "Restrict unprivileged use of performance events"
+ depends on PERF_EVENTS
+ help
+ If you say Y here, the kernel.perf_event_paranoid sysctl
+ will be set to 3 by default, and no unprivileged use of the
+ perf_event_open syscall will be permitted unless it is
+ changed.
+
config SECURITY
bool "Enable different security models"
depends on SYSFS