tracing: Add ustring operation to filtering string pointers
Subsystems (2)
Steven Rostedt
maintainerPATCH 1/1 tracing: Add ustring operation to filtering string pointers
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: f37c3bbc635994eda203a6da4ba0f9d05165a8d6
Steven Rostedt (1):
tracing: Add ustring operation to filtering string pointers
----
Documentation/trace/events.rst | 9 +++++ kernel/trace/trace_events_filter.c | 81 +++++++++++++++++++++++++++----------- 2 files changed, 66 insertions(+), 24 deletions(-) --------------------------- commit f37c3bbc635994eda203a6da4ba0f9d05165a8d6 Author: Steven Rostedt <[email protected]> Date: Thu Jan 13 20:08:40 2022 -0500
tracing: Add ustring operation to filtering string pointers
Since referencing user space pointers is special, if the user wants to filter on a field that is a pointer to user space, then they need to specify it.
Add a ".ustring" attribute to the field name for filters to state that the field is pointing to user space such that the kernel can take the appropriate action to read that pointer.
Fixes 77360f9bbc7e ("tracing: Add test for user space strings when filtering on string pointers")
Tested-by Sven Schnelle <[email protected]>
Signed-off-by Steven Rostedt <[email protected]>
Documentation/trace/events.rst +9 -0
@@ -198,6 +198,15 @@ The glob (~) accepts a wild card character (\*,?) and character classes prev_comm ~ "*sh*" prev_comm ~ "ba*sh" +If the field is a pointer that points into user space (for example +"filename" from sys_enter_openat), then you have to append ".ustring" to the +field name:: + + filename.ustring ~ "password" + +As the kernel will have to know how to retrieve the memory that the pointer +is at from user space. + 5.2 Setting filters -------------------
kernel/trace/trace_events_filter.c +57 -24
129 lines not on this page · raw message