summaryrefslogtreecommitdiff
path: root/defs.h
diff options
context:
space:
mode:
authorGabriel Laskar <gabriel@lse.epita.fr>2015-12-04 01:07:33 +0100
committerDmitry V. Levin <ldv@altlinux.org>2015-12-04 18:05:38 +0000
commit8b6046a052255fe71fac200f0f7b3b76419dc16d (patch)
tree9b3862e1f41fd42088b6bd85e12ce997cadfff3f /defs.h
parent5421855219bd066a1ecc42b3d3357929a6f1b0c5 (diff)
downloadstrace-8b6046a052255fe71fac200f0f7b3b76419dc16d.tar.gz
ioctl: allow to stop decoding number
For some ioctls, like from drm, the identification of the correct ioctl is done by custom code. Specifying IOCTL_NUMBER_STOP_LOOKUP on return of ioctl_decode_command_number() disables further calls to ioctl_lookup(). * defs.h (IOCTL_NUMBER_UNKNOWN, IOCTL_NUMBER_HANDLED, IOCTL_NUMBER_STOP_LOOKUP): Add macros representing ioctl number state decoding. * ioctl.c (SYS_FUNC(ioctl)): Skip ioctl_lookup() when ioctl_decode_command_number() returns a value with IOCTL_NUMBER_STOP_LOOKUP flag is set. Suggested-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Diffstat (limited to 'defs.h')
-rw-r--r--defs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/defs.h b/defs.h
index 5086e1d3a..d0bef9416 100644
--- a/defs.h
+++ b/defs.h
@@ -450,6 +450,10 @@ extern const struct xlat whence_codes[];
#define STACKTRACE_CAPTURE_ON_ENTER 01000 /* Capture stacktrace on "entering" stage */
#define TRACE_INDIRECT_SUBCALL 02000 /* Syscall is an indirect socket/ipc subcall. */
+#define IOCTL_NUMBER_UNKNOWN 0
+#define IOCTL_NUMBER_HANDLED 1
+#define IOCTL_NUMBER_STOP_LOOKUP 010
+
#define indirect_ipccall(tcp) (tcp->s_ent->sys_flags & TRACE_INDIRECT_SUBCALL)
#if defined(ARM) || defined(AARCH64) \