From 6333ace32ef99a09be6fd1efa2aa621fe5923061 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 17 Sep 2011 10:54:16 -0400 Subject: [PATCH] Use "unknown" for compat syscalls Signed-off-by: Mathieu Desnoyers --- lttng-syscalls.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 378d9f1e..40bf9575 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -10,11 +10,19 @@ #include #include +#include #include #include #include "ltt-events.h" +#ifndef CONFIG_COMPAT +static inline int is_compat_task(void) +{ + return 0; +} +#endif + static void syscall_entry_probe(void *__data, struct pt_regs *regs, long id); /* @@ -80,13 +88,18 @@ static void syscall_entry_unknown(struct ltt_channel *chan, __event_probe__sys_unknown(event, id, args); } +/* + * Currently, given that the kernel syscall metadata extraction only + * considers native system calls (not 32-bit compability ones), we + * fall-back on the "unknown" system call tracing for 32-bit compat. + */ static void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) { struct trace_syscall_entry *entry; struct ltt_channel *chan = __data; struct ltt_event *event; - if (unlikely(id >= ARRAY_SIZE(sc_table))) { + if (unlikely(is_compat_task() || id >= ARRAY_SIZE(sc_table))) { syscall_entry_unknown(chan, regs, id); return; } -- 2.34.1