-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'probes-v6.15' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/trace/linux-trace Pull probes updates from Masami Hiramatsu: - probe-events: Add comments about entry data storing code to clarify where and how the entry data is stored for function return events. - probe-events: Log error for exceeding the number of arguments to help user to identify error reason via tracefs/error_log file. - Improve the ftracetest selftests: - Expand the tprobe event test to check if it can correctly find the wrong format tracepoint name. - Add new syntax error test to check whether error_log correctly indicates a wrong character in the tracepoint name. - Add a new dynamic events argument limitation test case which checks max number of probe arguments. * tag 'probes-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: probe-events: Add comments about entry data storing code selftests/ftrace: Add dynamic events argument limitation test case selftests/ftrace: Add new syntax error test selftests/ftrace: Expand the tprobe event test to check wrong format tracing: probe-events: Log error for exceeding the number of arguments
- Loading branch information
Showing
9 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# description: Checking dynamic events limitations | ||
# requires: dynamic_events "imm-value":README | ||
|
||
# Max arguments limitation | ||
MAX_ARGS=128 | ||
EXCEED_ARGS=$((MAX_ARGS + 1)) | ||
|
||
check_max_args() { # event_header | ||
TEST_STRING=$1 | ||
# Acceptable | ||
for i in `seq 1 $MAX_ARGS`; do | ||
TEST_STRING="$TEST_STRING \\$i" | ||
done | ||
echo "$TEST_STRING" >> dynamic_events | ||
echo > dynamic_events | ||
# Error | ||
TEST_STRING="$TEST_STRING \\$EXCEED_ARGS" | ||
! echo "$TEST_STRING" >> dynamic_events | ||
return 0 | ||
} | ||
|
||
# Kprobe max args limitation | ||
if grep -q "kprobe_events" README; then | ||
check_max_args "p vfs_read" | ||
fi | ||
|
||
# Fprobe max args limitation | ||
if grep -q "f[:[<group>/][<event>]] <func-name>[%return] [<args>]" README; then | ||
check_max_args "f vfs_read" | ||
fi | ||
|
||
# Tprobe max args limitation | ||
if grep -q "t[:[<group>/][<event>]] <tracepoint> [<args>]" README; then | ||
check_max_args "t kfree" | ||
fi | ||
|
||
# Uprobe max args limitation | ||
if grep -q "uprobe_events" README; then | ||
check_max_args "p /bin/sh:10" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters