Bug #472 » fix-arm-syscall.patch
lttng-syscalls.c | ||
---|---|---|
# endif
|
||
#endif
|
||
#ifndef __NR_SYSCALL_BASE
|
||
#define __NR_SYSCALL_BASE 0
|
||
#endif
|
||
static
|
||
void syscall_entry_probe(void *__data, struct pt_regs *regs, long id);
|
||
... | ... | |
#undef TRACE_SYSCALL_TABLE
|
||
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
|
||
[ _nr ] = { \
|
||
[ (_nr) - __NR_SYSCALL_BASE ] = { \
|
||
.func = __event_probe__##_template, \
|
||
.nrargs = (_nrargs), \
|
||
.fields = __event_fields___##_template, \
|
||
... | ... | |
#undef TRACE_SYSCALL_TABLE
|
||
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
|
||
[ _nr ] = { \
|
||
[ (_nr) - __NR_SYSCALL_BASE] = { \
|
||
.func = __event_probe__##compat_##_template, \
|
||
.nrargs = (_nrargs), \
|
||
.fields = __event_fields___##compat_##_template,\
|
||
... | ... | |
struct lttng_event *event, *unknown_event;
|
||
const struct trace_syscall_entry *table, *entry;
|
||
size_t table_len;
|
||
long syscall_offset;
|
||
syscall_offset = id - __NR_SYSCALL_BASE;
|
||
if (unlikely(is_compat_task())) {
|
||
table = compat_sc_table;
|
||
table_len = ARRAY_SIZE(compat_sc_table);
|
||
... | ... | |
table_len = ARRAY_SIZE(sc_table);
|
||
unknown_event = chan->sc_unknown;
|
||
}
|
||
if (unlikely(id >= table_len)) {
|
||
syscall_entry_unknown(unknown_event, regs, id);
|
||
if (unlikely(syscall_offset >= table_len)) {
|
||
syscall_entry_unknown(unknown_event, regs, syscall_offset);
|
||
return;
|
||
}
|
||
if (unlikely(is_compat_task()))
|
||
event = chan->compat_sc_table[id];
|
||
event = chan->compat_sc_table[syscall_offset];
|
||
else
|
||
event = chan->sc_table[id];
|
||
event = chan->sc_table[syscall_offset];
|
||
if (unlikely(!event)) {
|
||
syscall_entry_unknown(unknown_event, regs, id);
|
||
syscall_entry_unknown(unknown_event, regs, syscall_offset);
|
||
return;
|
||
}
|
||
entry = &table[id];
|
||
entry = &table[syscall_offset];
|
||
WARN_ON_ONCE(!entry);
|
||
switch (entry->nrargs) {
|
- « Previous
- 1
- 2
- Next »