diff mbox series

[5/5] perf/core: Allow kernel address filter when not filtering the kernel

Message ID 20220131072453.2839535-6-adrian.hunter@intel.com (mailing list archive)
State New, archived
Headers show
Series perf/core: Address filter fixes / changes | expand

Commit Message

Adrian Hunter Jan. 31, 2022, 7:24 a.m. UTC
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@intel.com>
---
 kernel/events/core.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/kernel/events/core.c b/kernel/events/core.c
index af043a1a06ca..7670b0918e46 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -10454,8 +10454,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