perf: Fix tracepoint events permissions check
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | perf: Make perf_init_event function statickernel/ | +1 | 0 replies | |
| 2/5 | perf: Destroy event's children on task exitkernel/ | +27 | 13 replies | |
| 3/5 | perf: Initialize owner before calling event_init callbackkernel/ | +9 | 0 replies | |
| 4/5 | perf: Move event owner retrieval into perf_event_get_ownerinclude/ kernel/ | +16 | 0 replies | |
| 5/5 | perf: Check event's owner permission in tracepoint init callbackkernel/ kernel/ | +21 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] perf: Fix tracepoint events permissions check
hi,
sending fix for bug reported by Alexander Yarygin in here:
http://marc.info/?l=linux-kernel&m=140475133707722&w=2
The main problem was, that the event_init tracepoint callback checked permission of the 'current' task instead of the event owner task.
While this is ok for perf_event_open syscall check, it is wrong once event_init is called during fork to create child events. In this case the permission of the forked task is checked instead of the owner task of the parent event.
Changing tracepoint permission code to check event's owner task, plus some other changes I needed for this.
thanks,
jirka
---
Jiri Olsa (5):
perf: Make perf_init_event function static
perf: Destroy event's children on task exit
perf: Initialize owner before calling event_init callback
perf: Move event owner retrieval into perf_event_get_owner
perf: Check event's owner permission in tracepoint init callback
include/linux/perf_event.h | 1 + kernel/events/core.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------- kernel/trace/trace_event_perf.c | 19 +++++++++++++++++-- 3 files changed, 73 insertions(+), 19 deletions(-)