* first set of missing system calls
@ 2007-09-24 11:59 Ulrich Drepper
2007-09-24 12:01 ` Frank Ch. Eigler
0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Drepper @ 2007-09-24 11:59 UTC (permalink / raw)
To: systemtap
[-- Attachment #1.1: Type: text/plain, Size: 258 bytes --]
Here's a patch to add a few of the missing system calls. Unless
somebody beats me to it I'll try to add the other missing *at functions
when I have a bit more time.
--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
[-- Attachment #1.2: d-systemtap-atfct1 --]
[-- Type: text/plain, Size: 2359 bytes --]
--- ./tapset/syscalls2.stp-save 2007-09-22 15:01:04.000000000 -0700
+++ ./tapset/syscalls2.stp 2007-09-22 16:33:29.000000000 -0700
@@ -121,6 +121,42 @@
retstr = returnstr(1)
}
+
+# openat _______________________________________________________
+# long sys_openat(int dfd, const char __user * filename, int flags, int mode)
+probe syscall.openat =
+ kernel.function("sys_openat") ?,
+ kernel.function("compat_sys_openat") ?
+{
+ name = "openat"
+ dfd = $dfd
+ filename = user_string($filename)
+ flags = $flags
+ mode = $mode
+ if (flags & 64) {
+ if (dfd == -100)
+ argstr = sprintf("AT_FDCWD, %s, %s, %#o", user_string_quoted($filename),
+ _sys_open_flag_str(flags), $mode)
+ else
+ argstr = sprintf("%d, %s, %s, %#o", dfd, user_string_quoted($filename),
+ _sys_open_flag_str(flags), $mode)
+ } else {
+ if (dfd == -100)
+ argstr = sprintf("AT_FDCWD, %s, %s", user_string_quoted($filename),
+ _sys_open_flag_str(flags))
+ else
+ argstr = sprintf("%d, %s, %s", dfd, user_string_quoted($filename),
+ _sys_open_flag_str(flags))
+ }
+}
+probe syscall.openat.return =
+ kernel.function("sys_openat").return ?,
+ kernel.function("compat_sys_openat").return ?
+{
+ name = "openat"
+ retstr = returnstr(1)
+}
+
# pause ______________________________________________________
#
# sys_pause(void)
@@ -409,6 +445,7 @@
name = "readahead"
retstr = returnstr(1)
}
+
# readlink ___________________________________________________
#
# long sys_readlink(const char __user * path,
@@ -428,6 +465,30 @@
retstr = returnstr(1)
}
+# readlinkat ___________________________________________________
+#
+# long sys_readlinkat(int dfd, const char __user * path,
+# char __user * buf,
+# int bufsiz)
+#
+probe syscall.readlinkat = kernel.function("sys_readlinkat") {
+ name = "readlinkat"
+ dfd = $dfd
+ path = user_string($path)
+ buf_uaddr = $buf
+ bufsiz = $bufsiz
+ if (dfd == -100)
+ argstr = sprintf("AT_FDCWD, %s, %p, %d", user_string_quoted($path),
+ buf_uaddr, bufsiz)
+ else
+ argstr = sprintf("%d, %s, %p, %d", dfd, user_string_quoted($path),
+ buf_uaddr, bufsiz)
+}
+probe syscall.readlinkat.return = kernel.function("sys_readlinkat").return {
+ name = "readlinkat"
+ retstr = returnstr(1)
+}
+
# readv ______________________________________________________
#
# ssize_t sys_readv(unsigned long fd,
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: first set of missing system calls
2007-09-24 11:59 first set of missing system calls Ulrich Drepper
@ 2007-09-24 12:01 ` Frank Ch. Eigler
0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2007-09-24 12:01 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: systemtap
Ulrich Drepper <drepper@redhat.com> writes:
> Here's a patch to add a few of the missing system calls. [...]
.openat had been added back in July, but your patch for readlinkat is
now committed. Thanks! (Please try to avoid base64 text/plain
attachments in the future and just include the patch in the body of
the email.)
- FChE
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-23 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-24 11:59 first set of missing system calls Ulrich Drepper
2007-09-24 12:01 ` Frank Ch. Eigler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).