1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: Kretprobe dynamic event with arguments 4 # requires: kprobe_events 5 6 # Add new kretprobe event 7 echo "r:testprobe2 $FUNCTION_FORK \$retval" > kprobe_events 8 grep testprobe2 kprobe_events | grep -q 'arg1=\$retval' 9 test -d events/kprobes/testprobe2 10 11 echo 1 > events/kprobes/testprobe2/enable 12 ( echo "forked") 13 14 cat trace | grep testprobe2 | grep -q "<- $FUNCTION_FORK" 15 16 echo 0 > events/kprobes/testprobe2/enable 17 echo '-:testprobe2' >> kprobe_events 18 clear_trace 19 test -d events/kprobes/testprobe2 && exit_fail || exit_pass
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.