X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-syscalls.c;h=edb69b09bc23c79d133a72209eedb95fb672b033;hb=9598166dce563b1287e05f0b1af96f9329e102c4;hp=e1f1809808573367b701b62cfe9a90d4af8e075c;hpb=0d260d3d3e28849772a060a9b1374712c0959fca;p=lttng-modules.git diff --git a/lttng-syscalls.c b/lttng-syscalls.c index e1f18098..edb69b09 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -23,12 +23,11 @@ #include #include -#include -#include -#include #include #include "lttng-tracepoint.h" +#define LTTNG_SYSCALL_NR_ARGS 6 + #ifndef CONFIG_COMPAT # ifndef is_compat_task # define is_compat_task() (0) @@ -82,9 +81,7 @@ 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 @@ -377,7 +374,7 @@ static void syscall_entry_unknown(struct lttng_event *event, { unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); if (unlikely(in_compat_syscall())) __event_probe__compat_syscall_entry_unknown(event, id, args); else @@ -448,7 +445,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) void (*fptr)(void *__data, unsigned long arg0) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, args[0]); break; } @@ -459,7 +456,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) unsigned long arg1) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, args[0], args[1]); break; } @@ -471,7 +468,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) unsigned long arg2) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, args[0], args[1], args[2]); break; } @@ -484,7 +481,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) unsigned long arg3) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, args[0], args[1], args[2], args[3]); break; } @@ -498,7 +495,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) unsigned long arg4) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, args[0], args[1], args[2], args[3], args[4]); break; } @@ -513,7 +510,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) unsigned long arg5) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, args[0], args[1], args[2], args[3], args[4], args[5]); break; @@ -528,7 +525,7 @@ static void syscall_exit_unknown(struct lttng_event *event, { unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); if (unlikely(in_compat_syscall())) __event_probe__compat_syscall_exit_unknown(event, id, ret, args); @@ -604,7 +601,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) unsigned long arg0) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, ret, args[0]); break; } @@ -616,7 +613,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) unsigned long arg1) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, ret, args[0], args[1]); break; } @@ -629,7 +626,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) unsigned long arg2) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, ret, args[0], args[1], args[2]); break; } @@ -643,7 +640,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) unsigned long arg3) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, ret, args[0], args[1], args[2], args[3]); break; } @@ -658,7 +655,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) unsigned long arg4) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, ret, args[0], args[1], args[2], args[3], args[4]); break; } @@ -674,7 +671,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) unsigned long arg5) = entry->func; unsigned long args[LTTNG_SYSCALL_NR_ARGS]; - lttng_syscall_get_arguments(current, regs, args); + syscall_get_arguments(current, regs, args); fptr(event, ret, args[0], args[1], args[2], args[3], args[4], args[5]); break; @@ -1295,7 +1292,7 @@ int lttng_abi_syscall_list(void) struct file *syscall_list_file; int file_fd, ret; - file_fd = lttng_get_unused_fd(); + file_fd = get_unused_fd_flags(0); if (file_fd < 0) { ret = file_fd; goto fd_error;