#define TP_PROBE_CB(_template) &syscall_entry_probe
LTTNG_TRACEPOINT_EVENT(syscall_entry_unknown,
- TP_PROTO(unsigned int id, unsigned long *args),
+ TP_PROTO(int id, unsigned long *args),
TP_ARGS(id, args),
TP_STRUCT__entry(
- __field(unsigned int, id)
+ __field(int, id)
__array(unsigned long, args, UNKNOWN_SYSCALL_NRARGS)
),
TP_fast_assign(
TP_printk()
)
LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_unknown,
- TP_PROTO(unsigned int id, unsigned long *args),
+ TP_PROTO(int id, unsigned long *args),
TP_ARGS(id, args),
TP_STRUCT__entry(
- __field(unsigned int, id)
+ __field(int, id)
__array(unsigned long, args, UNKNOWN_SYSCALL_NRARGS)
),
TP_fast_assign(
#define TP_PROBE_CB(_template) &syscall_exit_probe
LTTNG_TRACEPOINT_EVENT(syscall_exit_unknown,
- TP_PROTO(unsigned int id, long ret, unsigned long *args),
+ TP_PROTO(int id, long ret, unsigned long *args),
TP_ARGS(id, ret, args),
TP_STRUCT__entry(
- __field(unsigned int, id)
+ __field(int, id)
__field(long, ret)
__array(unsigned long, args, UNKNOWN_SYSCALL_NRARGS)
),
TP_printk()
)
LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_unknown,
- TP_PROTO(unsigned int id, long ret, unsigned long *args),
+ TP_PROTO(int id, long ret, unsigned long *args),
TP_ARGS(id, ret, args),
TP_STRUCT__entry(
- __field(unsigned int, id)
+ __field(int, id)
__field(long, ret)
__array(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_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;
}