X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-syscalls.c;h=70d2c323ce9207b191313488a87d80b464075b7b;hb=refs%2Fheads%2Fstable-2.7;hp=5fa66660b5f2532d715e80d90fb7c8feb6ec08ca;hpb=e0833535c3548a2f2d8d0bc60d6d9705b5dbc0b5;p=lttng-modules.git diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 5fa66660..70d2c323 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -46,6 +46,11 @@ # endif #endif +/* in_compat_syscall appears in kernel 4.6. */ +#ifndef in_compat_syscall + #define in_compat_syscall() is_compat_task() +#endif + enum sc_type { SC_TYPE_ENTRY, SC_TYPE_EXIT, @@ -354,7 +359,7 @@ static void syscall_entry_unknown(struct lttng_event *event, unsigned long args[UNKNOWN_SYSCALL_NRARGS]; syscall_get_arguments(current, regs, 0, UNKNOWN_SYSCALL_NRARGS, args); - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) __event_probe__compat_syscall_entry_unknown(event, id, args); else __event_probe__syscall_entry_unknown(event, id, args); @@ -367,7 +372,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) const struct trace_syscall_entry *table, *entry; size_t table_len; - if (unlikely(is_compat_task())) { + if (unlikely(in_compat_syscall())) { struct lttng_syscall_filter *filter; filter = lttng_rcu_dereference(chan->sc_filter); @@ -400,7 +405,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) syscall_entry_unknown(unknown_event, regs, id); return; } - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) event = chan->compat_sc_table[id]; else event = chan->sc_table[id]; @@ -505,7 +510,7 @@ static void syscall_exit_unknown(struct lttng_event *event, unsigned long args[UNKNOWN_SYSCALL_NRARGS]; syscall_get_arguments(current, regs, 0, UNKNOWN_SYSCALL_NRARGS, args); - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) __event_probe__compat_syscall_exit_unknown(event, id, ret, args); else @@ -521,7 +526,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) long id; id = syscall_get_nr(current, regs); - if (unlikely(is_compat_task())) { + if (unlikely(in_compat_syscall())) { struct lttng_syscall_filter *filter; filter = lttng_rcu_dereference(chan->sc_filter); @@ -554,7 +559,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) syscall_exit_unknown(unknown_event, regs, id, ret); return; } - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) event = chan->compat_sc_exit_table[id]; else event = chan->sc_exit_table[id];