aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/build_bug.c
diff options
context:
space:
mode:
authorSteven Rostedt <[email protected]>2025-04-17 22:30:03 +0000
committerSteven Rostedt (Google) <[email protected]>2025-04-18 02:16:56 +0000
commita8c5b0ed89a3f2c81c6ae0b041394e6eea0e7024 (patch)
tree4f95dc1b0c868ff7adc48a539da5d32191cf16be /rust/helpers/build_bug.c
parentftrace: Fix type of ftrace_graph_ent_entry.depth (diff)
downloadkernel-a8c5b0ed89a3f2c81c6ae0b041394e6eea0e7024.tar.gz
kernel-a8c5b0ed89a3f2c81c6ae0b041394e6eea0e7024.zip
tracing: Fix filter string testing
The filter string testing uses strncpy_from_kernel/user_nofault() to retrieve the string to test the filter against. The if() statement was incorrect as it considered 0 as a fault, when it is only negative that it faulted. Running the following commands: # cd /sys/kernel/tracing # echo "filename.ustring ~ \"/proc*\"" > events/syscalls/sys_enter_openat/filter # echo 1 > events/syscalls/sys_enter_openat/enable # ls /proc/$$/maps # cat trace Would produce nothing, but with the fix it will produce something like: ls-1192 [007] ..... 8169.828333: sys_openat(dfd: ffffffffffffff9c, filename: 7efc18359904, flags: 80000, mode: 0) Link: https://lore.kernel.org/all/CAEf4BzbVPQ=BjWztmEwBPRKHUwNfKBkS3kce-Rzka6zvbQeVpg@mail.gmail.com/ Cc: [email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Andrew Morton <[email protected]> Link: https://lore.kernel.org/[email protected] Fixes: 77360f9bbc7e5 ("tracing: Add test for user space strings when filtering on string pointers") Reported-by: Andrii Nakryiko <[email protected]> Reported-by: Mykyta Yatsenko <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions