Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156638
b: refs/heads/master
c: a4e95fc
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 10, 2009
1 parent d2dd6f9 commit 83f0fa9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a044560c3a1f0ad75ce685c1ed7604820b9ed319
refs/heads/master: a4e95fc2cbb31d70a65beffeaf8773f881328c34
8 changes: 8 additions & 0 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -3787,6 +3787,14 @@ static void tp_perf_counter_destroy(struct perf_counter *counter)

static const struct pmu *tp_perf_counter_init(struct perf_counter *counter)
{
/*
* Raw tracepoint data is a severe data leak, only allow root to
* have these.
*/
if ((counter->attr.sample_type & PERF_SAMPLE_RAW) &&
!capable(CAP_SYS_ADMIN))
return ERR_PTR(-EPERM);

if (ftrace_profile_enable(counter->attr.config))
return NULL;

Expand Down

0 comments on commit 83f0fa9

Please sign in to comment.