Skip to content

Commit 9872c07

Browse files
beaubelgraverostedt
authored andcommitted
tracing/user_events: Set event filter_type from type
Users expect that events can be filtered by the kernel. User events currently sets all event fields as FILTER_OTHER which limits to binary filters only. When strings are being used, functionality is reduced. Use filter_assign_type() to find the most appropriate filter type for each field in user events to ensure full kernel capabilities. Link: https://lkml.kernel.org/r/20230419214140.4158-2-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 625ed52 commit 9872c07

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

kernel/trace/trace_events_user.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,9 @@ static int user_event_add_field(struct user_event *user, const char *type,
918918
field->is_signed = is_signed;
919919
field->filter_type = filter_type;
920920

921+
if (filter_type == FILTER_OTHER)
922+
field->filter_type = filter_assign_type(type);
923+
921924
list_add(&field->link, &user->fields);
922925

923926
/*

0 commit comments

Comments
 (0)