projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove dependency on kallsyms for irq_to_desc (kernel 3.4+)
[lttng-modules.git]
/
lttng-syscalls.c
diff --git
a/lttng-syscalls.c
b/lttng-syscalls.c
index 0b980a1a92be53dc11442e672ff7f1ab0b08b5c6..b8a3eac4bcaecb349ba09ae5f0da447b7116df0b 100644
(file)
--- a/
lttng-syscalls.c
+++ b/
lttng-syscalls.c
@@
-38,6
+38,7
@@
#include <wrapper/tracepoint.h>
#include <wrapper/file.h>
#include <wrapper/rcu.h>
#include <wrapper/tracepoint.h>
#include <wrapper/file.h>
#include <wrapper/rcu.h>
+#include <wrapper/syscall.h>
#include <lttng-events.h>
#ifndef CONFIG_COMPAT
#include <lttng-events.h>
#ifndef CONFIG_COMPAT
@@
-85,6
+86,18
@@
struct mmap_arg_struct;
struct file_handle;
struct user_msghdr;
struct file_handle;
struct user_msghdr;
+/*
+ * Forward declaration for kernels >= 5.6
+ */
+struct timex;
+struct timeval;
+struct itimerval;
+struct itimerspec;
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+typedef __kernel_old_time_t time_t;
+#endif
+
#ifdef IA32_NR_syscalls
#define NR_compat_syscalls IA32_NR_syscalls
#else
#ifdef IA32_NR_syscalls
#define NR_compat_syscalls IA32_NR_syscalls
#else
@@
-374,9
+387,9
@@
struct lttng_syscall_filter {
static void syscall_entry_unknown(struct lttng_event *event,
struct pt_regs *regs, unsigned int id)
{
static void syscall_entry_unknown(struct lttng_event *event,
struct pt_regs *regs, unsigned int id)
{
- unsigned long args[
UNKNOWN_SYSCALL_NR
ARGS];
+ unsigned long args[
LTTNG_SYSCALL_NR_
ARGS];
-
syscall_get_arguments(current, regs, 0, UNKNOWN_SYSCALL_NRARGS
, args);
+
lttng_syscall_get_arguments(current, regs
, args);
if (unlikely(in_compat_syscall()))
__event_probe__compat_syscall_entry_unknown(event, id, args);
else
if (unlikely(in_compat_syscall()))
__event_probe__compat_syscall_entry_unknown(event, id, args);
else
@@
-445,9
+458,9
@@
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
case 1:
{
void (*fptr)(void *__data, unsigned long arg0) = entry->func;
case 1:
{
void (*fptr)(void *__data, unsigned long arg0) = entry->func;
- unsigned long args[
1
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, args[0]);
break;
}
fptr(event, args[0]);
break;
}
@@
-456,9
+469,9
@@
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
void (*fptr)(void *__data,
unsigned long arg0,
unsigned long arg1) = entry->func;
void (*fptr)(void *__data,
unsigned long arg0,
unsigned long arg1) = entry->func;
- unsigned long args[
2
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, args[0], args[1]);
break;
}
fptr(event, args[0], args[1]);
break;
}
@@
-468,9
+481,9
@@
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
unsigned long arg0,
unsigned long arg1,
unsigned long arg2) = entry->func;
unsigned long arg0,
unsigned long arg1,
unsigned long arg2) = entry->func;
- unsigned long args[
3
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, args[0], args[1], args[2]);
break;
}
fptr(event, args[0], args[1], args[2]);
break;
}
@@
-481,9
+494,9
@@
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
unsigned long arg1,
unsigned long arg2,
unsigned long arg3) = entry->func;
unsigned long arg1,
unsigned long arg2,
unsigned long arg3) = entry->func;
- unsigned long args[
4
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, args[0], args[1], args[2], args[3]);
break;
}
fptr(event, args[0], args[1], args[2], args[3]);
break;
}
@@
-495,9
+508,9
@@
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
unsigned long arg2,
unsigned long arg3,
unsigned long arg4) = entry->func;
unsigned long arg2,
unsigned long arg3,
unsigned long arg4) = entry->func;
- unsigned long args[
5
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, args[0], args[1], args[2], args[3], args[4]);
break;
}
fptr(event, args[0], args[1], args[2], args[3], args[4]);
break;
}
@@
-510,9
+523,9
@@
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
unsigned long arg3,
unsigned long arg4,
unsigned long arg5) = entry->func;
unsigned long arg3,
unsigned long arg4,
unsigned long arg5) = entry->func;
- unsigned long args[
6
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, args[0], args[1], args[2],
args[3], args[4], args[5]);
break;
fptr(event, args[0], args[1], args[2],
args[3], args[4], args[5]);
break;
@@
-525,9
+538,9
@@
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
static void syscall_exit_unknown(struct lttng_event *event,
struct pt_regs *regs, int id, long ret)
{
static void syscall_exit_unknown(struct lttng_event *event,
struct pt_regs *regs, int id, long ret)
{
- unsigned long args[
UNKNOWN_SYSCALL_NR
ARGS];
+ unsigned long args[
LTTNG_SYSCALL_NR_
ARGS];
-
syscall_get_arguments(current, regs, 0, UNKNOWN_SYSCALL_NRARGS
, args);
+
lttng_syscall_get_arguments(current, regs
, args);
if (unlikely(in_compat_syscall()))
__event_probe__compat_syscall_exit_unknown(event, id, ret,
args);
if (unlikely(in_compat_syscall()))
__event_probe__compat_syscall_exit_unknown(event, id, ret,
args);
@@
-601,9
+614,9
@@
void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
void (*fptr)(void *__data,
long ret,
unsigned long arg0) = entry->func;
void (*fptr)(void *__data,
long ret,
unsigned long arg0) = entry->func;
- unsigned long args[
1
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, ret, args[0]);
break;
}
fptr(event, ret, args[0]);
break;
}
@@
-613,9
+626,9
@@
void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
long ret,
unsigned long arg0,
unsigned long arg1) = entry->func;
long ret,
unsigned long arg0,
unsigned long arg1) = entry->func;
- unsigned long args[
2
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, ret, args[0], args[1]);
break;
}
fptr(event, ret, args[0], args[1]);
break;
}
@@
-626,9
+639,9
@@
void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
unsigned long arg0,
unsigned long arg1,
unsigned long arg2) = entry->func;
unsigned long arg0,
unsigned long arg1,
unsigned long arg2) = entry->func;
- unsigned long args[
3
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, ret, args[0], args[1], args[2]);
break;
}
fptr(event, ret, args[0], args[1], args[2]);
break;
}
@@
-640,9
+653,9
@@
void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
unsigned long arg1,
unsigned long arg2,
unsigned long arg3) = entry->func;
unsigned long arg1,
unsigned long arg2,
unsigned long arg3) = entry->func;
- unsigned long args[
4
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, ret, args[0], args[1], args[2], args[3]);
break;
}
fptr(event, ret, args[0], args[1], args[2], args[3]);
break;
}
@@
-655,9
+668,9
@@
void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
unsigned long arg2,
unsigned long arg3,
unsigned long arg4) = entry->func;
unsigned long arg2,
unsigned long arg3,
unsigned long arg4) = entry->func;
- unsigned long args[
5
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, ret, args[0], args[1], args[2], args[3], args[4]);
break;
}
fptr(event, ret, args[0], args[1], args[2], args[3], args[4]);
break;
}
@@
-671,9
+684,9
@@
void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
unsigned long arg3,
unsigned long arg4,
unsigned long arg5) = entry->func;
unsigned long arg3,
unsigned long arg4,
unsigned long arg5) = entry->func;
- unsigned long args[
6
];
+ unsigned long args[
LTTNG_SYSCALL_NR_ARGS
];
-
syscall_get_arguments(current, regs, 0, entry->nrar
gs, args);
+
lttng_syscall_get_arguments(current, re
gs, args);
fptr(event, ret, args[0], args[1], args[2],
args[3], args[4], args[5]);
break;
fptr(event, ret, args[0], args[1], args[2],
args[3], args[4], args[5]);
break;
@@
-917,15
+930,15
@@
int lttng_syscalls_unregister(struct lttng_channel *chan)
if (!chan->sc_table)
return 0;
if (chan->sys_enter_registered) {
if (!chan->sc_table)
return 0;
if (chan->sys_enter_registered) {
- ret = lttng_wrapper_tracepoint_probe_unregister("sys_e
xit
",
- (void *) syscall_e
xit
_probe, chan);
+ ret = lttng_wrapper_tracepoint_probe_unregister("sys_e
nter
",
+ (void *) syscall_e
ntry
_probe, chan);
if (ret)
return ret;
chan->sys_enter_registered = 0;
}
if (chan->sys_exit_registered) {
if (ret)
return ret;
chan->sys_enter_registered = 0;
}
if (chan->sys_exit_registered) {
- ret = lttng_wrapper_tracepoint_probe_unregister("sys_e
nter
",
- (void *) syscall_e
ntry
_probe, chan);
+ ret = lttng_wrapper_tracepoint_probe_unregister("sys_e
xit
",
+ (void *) syscall_e
xit
_probe, chan);
if (ret)
return ret;
chan->sys_exit_registered = 0;
if (ret)
return ret;
chan->sys_exit_registered = 0;
This page took
0.02659 seconds
and
4
git commands to generate.