Fix: syscalls: Ignore fcntl cmd specific to 32-bit in 64-bit only config
[lttng-modules.git] / include / instrumentation / syscalls / headers / syscalls_integers_override.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
6314c2d3 2
7e42c4ec
MD
3#ifndef CREATE_SYSCALL_TABLE
4
769ad370
MD
5#define OVERRIDE_32_mmap
6#define OVERRIDE_64_mmap
cb3ef14c 7SC_LTTNG_TRACEPOINT_EVENT(mmap,
769ad370
MD
8 TP_PROTO(sc_exit(unsigned long ret,)
9 unsigned long addr, unsigned long len,
10 unsigned long prot, unsigned long flags,
11 unsigned long fd, unsigned long off),
e17f92ba 12 TP_ARGS(sc_exit(ret,) addr, len, prot, flags, fd, off),
769ad370 13 TP_FIELDS(sc_exit(ctf_integer_hex(unsigned long, ret, ret))
57ede728
MD
14 sc_in(ctf_integer_hex(unsigned long, addr, addr))
15 sc_in(ctf_integer(size_t, len, len))
16 sc_in(ctf_integer(int, prot, prot))
17 sc_in(ctf_integer(int, flags, flags))
18 sc_in(ctf_integer(int, fd, fd))
19 sc_in(ctf_integer(off_t, offset, off))
20 )
7e42c4ec
MD
21)
22
c1c07d68
GB
23/*
24 * Enumeration of the open flags, as described in the 'open'
25 * system call man page.
26 */
27SC_LTTNG_TRACEPOINT_ENUM(lttng_fcntl_cmd_flags,
28 TP_ENUM_VALUES(
29 ctf_enum_value("F_DUPFD", F_DUPFD)
30 ctf_enum_value("F_GETFD", F_GETFD)
31 ctf_enum_value("F_SETFD", F_SETFD)
32 ctf_enum_value("F_GETFL", F_GETFL)
33 ctf_enum_value("F_SETFL", F_SETFL)
34 ctf_enum_value("F_GETLK", F_GETLK)
35 ctf_enum_value("F_SETLK", F_SETLK)
36 ctf_enum_value("F_SETLKW", F_SETLKW)
37 ctf_enum_value("F_SETOWN", F_SETOWN)
38 ctf_enum_value("F_GETOWN", F_GETOWN)
39 ctf_enum_value("F_SETSIG", F_SETSIG)
40 ctf_enum_value("F_GETSIG", F_GETSIG)
f25545b1 41#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
c1c07d68
GB
42 ctf_enum_value("F_GETLK64", F_GETLK64)
43 ctf_enum_value("F_SETLK64", F_SETLK64)
44 ctf_enum_value("F_SETLKW64", F_SETLKW64)
f25545b1 45#endif /* #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) */
c1c07d68
GB
46 ctf_enum_value("F_SETOWN_EX", F_SETOWN_EX)
47 ctf_enum_value("F_GETOWN_EX", F_GETOWN_EX)
3e8dcdfa 48#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
c1c07d68 49 ctf_enum_value("F_GETOWNER_UIDS", F_GETOWNER_UIDS)
3e8dcdfa 50#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
c1c07d68
GB
51#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
52 ctf_enum_value("F_OFD_GETLK", F_OFD_GETLK)
53 ctf_enum_value("F_OFD_SETLK", F_OFD_SETLK)
54 ctf_enum_value("F_OFD_SETLKW", F_OFD_SETLKW)
55#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
56 ctf_enum_value("F_SETLEASE", F_SETLEASE)
57 ctf_enum_value("F_GETLEASE", F_GETLEASE)
58 ctf_enum_value("F_NOTIFY", F_NOTIFY)
59 ctf_enum_value("F_CANCELLK", F_CANCELLK)
60 ctf_enum_value("F_DUPFD_CLOEXEC", F_DUPFD_CLOEXEC)
61 ctf_enum_value("F_SETPIPE_SZ", F_SETPIPE_SZ)
62 ctf_enum_value("F_GETPIPE_SZ", F_GETPIPE_SZ)
63#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0))
64 ctf_enum_value("F_ADD_SEALS", F_ADD_SEALS)
65 ctf_enum_value("F_GET_SEALS", F_GET_SEALS)
66#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */
67#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
68 ctf_enum_value("F_GET_RW_HINT", F_GET_RW_HINT)
69 ctf_enum_value("F_SET_RW_HINT", F_SET_RW_HINT)
70 ctf_enum_value("F_GET_FILE_RW_HINT", F_GET_FILE_RW_HINT)
71 ctf_enum_value("F_SET_FILE_RW_HINT", F_SET_FILE_RW_HINT)
72#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) */
73 )
74)
75
76#define OVERRIDE_32_fcntl
77#define OVERRIDE_64_fcntl
78SC_LTTNG_TRACEPOINT_EVENT(fcntl,
79 TP_PROTO(sc_exit(long ret,) unsigned int fd, unsigned int cmd, unsigned long arg),
80 TP_ARGS(sc_exit(ret,) fd, cmd, arg),
81 TP_FIELDS(
82 sc_exit(ctf_integer(long, ret, ret))
83 sc_in(ctf_integer(unsigned int, fd, fd))
84 sc_in(ctf_enum(lttng_fcntl_cmd_flags, unsigned int, cmd, cmd))
85 sc_inout(ctf_integer(unsigned long, arg, arg)))
86)
87
7e42c4ec 88#endif /* CREATE_SYSCALL_TABLE */
This page took 0.039385 seconds and 4 git commands to generate.