Support per-architecture syscall in/out parameter descriptions
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 9 Nov 2022 20:44:09 +0000 (15:44 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Nov 2022 18:30:24 +0000 (13:30 -0500)
commit9497697f1a6fe19731aaf4d35f465388a18f076a
treea894819df8b817ea94de2ec4475268e4ae8ce0b8
parent4fe88f504598fd092d4bfc887cda3f8e8c04999e
Support per-architecture syscall in/out parameter descriptions

The number of arguments of some syscalls varies from one architecture to
another. For instance, fanotify_mark, on most architectures has the
following signature:

fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask, int dfd, const char *pathname)

However, on x86-32, the 64-bit mask parameter is split into two 32-bit parts:
fanotify_mark(int fanotify_fd, unsigned int flags, u32 mask_lo, u32 mask_hi, int dfd, const char *pathname)

Since the header generation scripts do not expect this, generating the
headers for x86-32 fails with:
  Error: argument number (6) is larger than number of syscall arguments (5)

The scripts are modified to search for an in/out description in a
per-architecture description list. For the moment only fanotify_mark()
has such an override.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I7252f41f1d08100d099deab7328f7fc784e1c484
include/instrumentation/syscalls/lttng-get-syscall-inout.sh
include/instrumentation/syscalls/lttng-syscalls-generate-headers.sh
include/instrumentation/syscalls/table-syscall-inout-x86-32-override.txt [new file with mode: 0644]
This page took 0.026759 seconds and 4 git commands to generate.