#define PARAMS(args...) args
/* Handle unknown syscalls */
+#undef TRACE_SYSTEM
#define TRACE_SYSTEM syscalls_unknown
#include "instrumentation/syscalls/headers/syscalls_unknown.h"
#undef TRACE_SYSTEM
filter = rcu_dereference(chan->sc_filter);
if (filter) {
- if (id >= NR_compat_syscalls
+ if (id < 0 || id >= NR_compat_syscalls
|| !test_bit(id, filter->sc_compat)) {
/* System call filtered out. */
return;
filter = rcu_dereference(chan->sc_filter);
if (filter) {
- if (id >= NR_syscalls
+ if (id < 0 || id >= NR_syscalls
|| !test_bit(id, filter->sc)) {
/* System call filtered out. */
return;
table_len = ARRAY_SIZE(sc_table);
unknown_event = chan->sc_unknown;
}
- if (unlikely(id >= table_len)) {
+ if (unlikely(id < 0 || id >= table_len)) {
syscall_entry_unknown(unknown_event, regs, id);
return;
}
}
static void syscall_exit_unknown(struct lttng_event *event,
- struct pt_regs *regs, unsigned int id, long ret)
+ struct pt_regs *regs, int id, long ret)
{
unsigned long args[UNKNOWN_SYSCALL_NRARGS];
filter = rcu_dereference(chan->sc_filter);
if (filter) {
- if (id >= NR_compat_syscalls
+ if (id < 0 || id >= NR_compat_syscalls
|| !test_bit(id, filter->sc_compat)) {
/* System call filtered out. */
return;
filter = rcu_dereference(chan->sc_filter);
if (filter) {
- if (id >= NR_syscalls
+ if (id < 0 || id >= NR_syscalls
|| !test_bit(id, filter->sc)) {
/* System call filtered out. */
return;
table_len = ARRAY_SIZE(sc_exit_table);
unknown_event = chan->sc_exit_unknown;
}
- if (unlikely(id >= table_len)) {
+ if (unlikely(id < 0 || id >= table_len)) {
syscall_exit_unknown(unknown_event, regs, id, ret);
return;
}