]> git.baikalelectronics.ru Git - kernel.git/commit
perf/core: Need CAP_SYS_ADMIN to create k/uprobe with perf_event_open()
authorSong Liu <songliubraving@fb.com>
Wed, 11 Apr 2018 18:02:37 +0000 (18:02 +0000)
committerIngo Molnar <mingo@kernel.org>
Thu, 12 Apr 2018 07:55:50 +0000 (09:55 +0200)
commitad60672082c7076352a9a86d907d6f73a917fbb8
treedc3142bceb925e06540b65bea06477e5219f9968
parent30ab20ed7a9632e683f2bbc3fede972f601d1f5f
perf/core: Need CAP_SYS_ADMIN to create k/uprobe with perf_event_open()

Non-root user cannot create kprobe or uprobe through the text-based
interface (kprobe_events, uprobe_events),so they should not be able
to create probes via perf_event_open() either.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Song Liu <songliubraving@fb.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: e4ab9d4ae11a ("perf/core: Implement the 'perf_uprobe' PMU")
Fixes: 8431c8a60718 ("perf/core: Implement the 'perf_kprobe' PMU")
Link: http://lkml.kernel.org/r/C0B2EFB5-C403-4BDB-9046-C14B3EE66999@fb.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c