Skip to content

Commit

Permalink
perf/core: Allow kernel address filter when not filtering the kernel
Browse files Browse the repository at this point in the history
The so-called 'kernel' address filter can also be useful for filtering
fixed addresses in user space.  Allow that.

Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
ahunter6 authored and Peter Zijlstra committed Feb 2, 2022
1 parent e5524bf commit 58b2ff2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -10515,8 +10515,6 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr,
*/
if (state == IF_STATE_END) {
ret = -EINVAL;
if (kernel && event->attr.exclude_kernel)
goto fail;

/*
* ACTION "filter" must have a non-zero length region
Expand Down

0 comments on commit 58b2ff2

Please sign in to comment.