Project

General

Profile

Feature #782

Syscalls extractor improvements

Added by Christian Babeux over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/14/2014
Due date:
% Done:

0%

Estimated time:

Description

The current syscalls extractor in instrumentation/syscalls/lttng-syscalls-extractor is a bit tedious to use. A user needs to patch his kernel with the patch found in the same dir, build the kernel, run the kernel on his target, build a kernel module, modprobe and the finally dump the syscalls table.

It is feasible to eliminate the need to patch the kernel and build a custom kernel module. By building the kernel with CONFIG_FTRACE_SYSCALLS, the syscalls metadata are put in a ELF section named "syscalls_metadata". We can thus use already available tools such as extract-vmlinux1 and readelf to get our syscall table.

./extract-vmlinux /boot/vmlinuz-linux > kernel && readelf -p .syscalls_metadata kernel

The remaining scripts would need to be adapted to fit with the output of readelf.

[1] - https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/scripts/extract-vmlinux


Related issues

Related to LTTng-modules - Bug #771: lttng-syscalls-generate-headers.sh is brokenResolvedMathieu Desnoyers03/25/2014

Actions

No data to display

Also available in: Atom PDF