File: sysc_getresgid16.stp

package info (click to toggle)
systemtap 4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,436 kB
  • sloc: cpp: 72,388; ansic: 58,430; xml: 47,797; exp: 40,417; sh: 10,793; python: 2,759; perl: 2,252; tcl: 1,305; makefile: 1,119; lisp: 105; java: 102; awk: 101; asm: 91; sed: 16
file content (59 lines) | stat: -rw-r--r-- 1,820 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# FIXME: the getresgid16/getresuid16 probes could be combined with
# their "generic" versions in tapset/syscalls.stp.

# getresgid __________________________________________________
# long sys32_getresgid16(u16 __user *rgid, u16 __user *egid, u16 __user *sgid)
#

@define _SYSCALL_GETRESGID16_NAME
%(
	name = "getresgid"
%)

@define _SYSCALL_GETRESGID16_ARGSTR
%(
	argstr = sprintf("%p, %p, %p", rgid_uaddr, egid_uaddr, sgid_uaddr)
%)

probe syscall.getresgid16 = dw_syscall.getresgid16 !, nd_syscall.getresgid16 ? {}
probe syscall.getresgid16.return = dw_syscall.getresgid16.return !,
                                   nd_syscall.getresgid16.return ? {}

# dw_getresgid16 _____________________________________________________

probe dw_syscall.getresgid16 = kernel.function("sys32_getresgid16").call ?,
	kernel.function("compat_sys_s390_getresgid16").call ?
{
	@_SYSCALL_GETRESGID16_NAME
	rgid_uaddr = @choose_defined($rgidp, $rgid)
	egid_uaddr = @choose_defined($egidp, $egid)
	sgid_uaddr = @choose_defined($sgidp, $sgid)
	@_SYSCALL_GETRESGID16_ARGSTR
}
probe dw_syscall.getresgid16.return =
	kernel.function("sys32_getresgid16").return ?,
	kernel.function("compat_sys_s390_getresgid16").return ?
{
	@_SYSCALL_GETRESGID16_NAME
	@SYSC_RETVALSTR($return)
}

# nd_getresgid16 _____________________________________________________

probe nd_syscall.getresgid16 = kprobe.function("sys32_getresgid16") ?,
	kprobe.function("compat_sys_s390_getresgid16") ?
{
	@_SYSCALL_GETRESGID16_NAME
	asmlinkage()
	rgid_uaddr = pointer_arg(1)
	egid_uaddr = pointer_arg(2)
	sgid_uaddr = pointer_arg(3)
	@_SYSCALL_GETRESGID16_ARGSTR
}
probe nd_syscall.getresgid16.return =
	kprobe.function("sys32_getresgid16").return ?,
	kprobe.function("compat_sys_s390_getresgid16").return ?
{
	@_SYSCALL_GETRESGID16_NAME
	@SYSC_RETVALSTR(returnval())
}