The following commit has been merged into the perf/core branch of tip: Commit-ID: 58b2ff2c18b1e1d7232b8007a5698ec4ee7a7a0d Gitweb: https://git.kernel.org/tip/58b2ff2c18b1e1d7232b8007a5698ec4ee7a7a0d Author: Adrian Hunter <adrian.hunter@xxxxxxxxx> AuthorDate: Mon, 31 Jan 2022 09:24:53 +02:00 Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx> CommitterDate: Wed, 02 Feb 2022 13:11:43 +01:00 perf/core: Allow kernel address filter when not filtering the kernel The so-called 'kernel' address filter can also be useful for filtering fixed addresses in user space. Allow that. Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20220131072453.2839535-6-adrian.hunter@xxxxxxxxx --- kernel/events/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 2889b82..afbf388 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -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