From: Ryan.Kyser@jci.com (Ryan.Kyser@jci.com)
Subject: [lttng-dev] ARM syscall problems
Date: Tue, 10 Apr 2012 17:41:19 -0400 [thread overview]
Message-ID: <OF8C6B987A.03E85273-ON852579DC.006DE8C4-852579DC.007723B3@jci.com> (raw)
I have gotten most of the ARM syscall tracing to work, but I have two
problems.
1.) My override syscalls don't look quite right (see babeltrace snippet
below). I have overriden these in the file
instrumentation/syscalls/headers/arm-32-syscalls-2.6.38_integers_override.h
(see below for contents of file). I based each of the SC_TRACE_EVENTmacros
on the function declaration of each respective syscall. These declarations
can be viewed below the babeltrace snippet. If anyone has any suggestions
on what I'm doing wrong, I would appreciate it.
2.) I'm seeing a sys_unknown with a suspicious NR ID of 983045. Any ideas
on how to further debug this problem?
[19:01:09.009343858] (+0.000020500) sys_unknown: { 0 }, { id = 983045,
args = [ [0] = 715846848, [1] = 715848600, [2] = 716677200, [3] =
715846848, [4] = 716677200, [5] = 1 ] }
// snippet from babeltrace
[19:01:41.881449470] (+0.000009560) sys_mmap2: { 0 }, { addr = 0x0, len =
0xA00000, prot = 0x3, flags = 0x122, fd = 0xFFFFFFFF, pgoff = 0x0 }
[19:01:41.883759076] (+0.000002848) sys_mmap2: { 0 }, { addr = 0x0, len =
0xA00000, prot = 0x3, flags = 0x122, fd = 0xFFFFFFFF, pgoff = 0x0 }
[19:01:41.885699591] (+0.000002394) sys_mmap2: { 1 }, { addr = 0x0, len =
0xA00000, prot = 0x3, flags = 0x122, fd = 0xFFFFFFFF, pgoff = 0x0 }
[19:01:41.891235228] (+0.000067409) sys_sync_file_range2: { 0 }, { fd =
0x1C, offset = 0x2, nbytes = 0x400000000, flags = 0x0 }
[19:01:41.891582288] (+0.000002818) sys_sync_file_range2: { 0 }, { fd =
0x1C, offset = 0x100000000002, nbytes = 0x400000000, flags = 0x0 }
[19:01:41.891618122] (+0.000002319) sys_sync_file_range2: { 0 }, { fd =
0x1C, offset = 0x7, nbytes = 0x400000000, flags = 0x0 }
[19:01:41.924569379] (+0.000014803) sys_arm_fadvise64_64: { 0 }, { fd =
0x1C, advice = 0x4, offset = 0x400000000, len = 0xF1FF3ED800000000 }
[19:01:41.924714197] (+0.000003151) sys_sync_file_range2: { 0 }, { fd =
0x1C, offset = 0x200000000002, nbytes = 0x400000000, flags = 0x0 }
[19:01:41.924758425] (+0.000002137) sys_sync_file_range2: { 0 }, { fd =
0x1C, offset = 0x100000000007, nbytes = 0x400000000, flags = 0x0 }
[19:01:41.924768591] (+0.000002909) sys_arm_fadvise64_64: { 0 }, { fd =
0x1C, advice = 0x4, offset = 0x400000000, len = 0xF1FF3ED800000000 }
// end snippet
// declaration from include/asm-generic/syscalls.h
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff);
// declaration from arch/arm/kernel/sys_arm.c
asmlinkage long sys_arm_fadvise64_64(int fd, int advice,
loff_t offset, loff_t len)
{
return sys_fadvise64_64(fd, offset, len, advice);
}
// declaration from fs/sync.c
SYSCALL_DEFINE(sync_file_range2)(int fd, unsigned int flags,
loff_t offset, loff_t nbytes)
{
return sys_sync_file_range(fd, offset, nbytes, flags);
}
// arm-32-syscalls-2.6.38_integers_override.h ....
#define OVERRIDE_TABLE_32_sys_mmap2
#define OVERRIDE_TABLE_32_sys_arm_fadvise64_64
#define OVERRIDE_TABLE_32_sys_sync_file_range2
#ifndef CREATE_SYSCALL_TABLE
SC_TRACE_EVENT(sys_mmap2,
TP_PROTO(unsigned long addr, unsigned long len, unsigned long
prot,
unsigned long flags, unsigned long fd, unsigned long
pgoff),
TP_ARGS(addr, len, prot, flags, fd, pgoff),
TP_STRUCT__entry(
__field_hex(unsigned long, addr)
__field_hex(unsigned long, len)
__field_hex(unsigned long, prot)
__field_hex(unsigned long, flags)
__field_hex(unsigned long, fd)
__field_hex(unsigned long, pgoff)),
TP_fast_assign(
tp_assign(addr, addr)
tp_assign(len, len)
tp_assign(prot, prot)
tp_assign(flags, flags)
tp_assign(fd, fd)
tp_assign(pgoff, pgoff)),
TP_printk()
)
SC_TRACE_EVENT(sys_arm_fadvise64_64,
TP_PROTO(int fd, int advice, loff_t offset, loff_t len),
TP_ARGS(fd, advice, offset, len),
TP_STRUCT__entry(
__field_hex(int, fd)
__field_hex(int, advice)
__field_hex(loff_t, offset)
__field_hex(loff_t, len)),
TP_fast_assign(
tp_assign(fd, fd)
tp_assign(advice, advice)
tp_assign(offset, offset)
tp_assign(len, len)),
TP_printk()
)
SC_TRACE_EVENT(sys_sync_file_range2,
TP_PROTO(int fd, loff_t offset, loff_t nbytes, unsigned int
flags),
TP_ARGS(fd, offset, nbytes, flags),
TP_STRUCT__entry(
__field_hex(int, fd)
__field_hex(loff_t, offset)
__field_hex(loff_t, nbytes)
__field_hex(unsigned int, flags)),
TP_fast_assign(
tp_assign(fd, fd)
tp_assign(offset, offset)
tp_assign(nbytes, nbytes)
tp_assign(flags, flags)),
TP_printk()
)
#else /* CREATE_SYSCALL_TABLE */
#define OVERRIDE_TABLE_32_sys_mmap2
TRACE_SYSCALL_TABLE(sys_mmap2, sys_mmap2, 192, 6)
#define OVERRIDE_TABLE_32_sys_arm_fadvise64_64
TRACE_SYSCALL_TABLE(sys_arm_fadvise64_64, sys_arm_fadvise64_64, 270, 4)
#define OVERRIDE_TABLE_32_sys_sync_file_range2
TRACE_SYSCALL_TABLE(sys_sync_file_range2, sys_sync_file_range2, 341, 4)
#endif /* CREATE_SYSCALL_TABLE */
Thank you,
Ryan Kyser
next reply other threads:[~2012-04-10 21:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 21:41 Ryan.Kyser [this message]
2012-04-11 0:50 ` Mathieu Desnoyers
2012-04-11 1:20 ` Nicolas Pitre
2012-04-11 2:42 ` Mathieu Desnoyers
2012-04-11 19:21 ` Ryan.Kyser
2012-04-11 13:32 ` Ryan.Kyser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF8C6B987A.03E85273-ON852579DC.006DE8C4-852579DC.007723B3@jci.com \
--to=ryan.kyser@jci.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox