hc
2024-08-19 eb6b9ee90f50f13c5abb885ce483802d6262f2b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Kprobe event with comm arguments
# requires: kprobe_events
 
grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old
 
echo "p:testprobe $FUNCTION_FORK comm=\$comm " > kprobe_events
grep testprobe kprobe_events | grep -q 'comm=$comm'
test -d events/kprobes/testprobe
 
echo 1 > events/kprobes/testprobe/enable
( echo "forked")
grep testprobe trace | grep -q 'comm=".*"'
 
exit 0