fix: net: udp: add IP/port data to the tracepoint udp/udp_fail_queue_rcv_skb (v6.10)
[lttng-modules.git] / src / lttng-syscalls.h
... / ...
CommitLineData
1/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * lttng-syscalls.h
4 *
5 * LTTng syscall header.
6 *
7 * Copyright (C) 2021 Francis Deslauriers <francis.deslauriers@efficios.com>
8 */
9
10#ifndef LTTNG_SYSCALLS_H
11#define LTTNG_SYSCALLS_H
12
13#include <asm/ptrace.h>
14#include <linux/compat.h>
15#include <linux/fcntl.h>
16#include <linux/in.h>
17#include <linux/in6.h>
18#include <linux/mman.h>
19#include <linux/posix_types.h>
20
21#include <lttng/events.h>
22#include <lttng/kernel-version.h>
23
24#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,13,0))
25#include <linux/landlock.h>
26#else
27struct landlock_ruleset_attr;
28
29enum landlock_rule_type {
30 LANDLOCK_RULE_PATH_BENEATH = 1,
31};
32#endif
33
34/*
35 * Forward declarations allowing LTTng to build its system call instrumentation
36 * against old kernels which do not declare the more recent system call
37 * argument structure types.
38 */
39struct clone_args;
40struct file_handle;
41struct futex_waitv;
42struct io_uring_params;
43struct mmap_arg_struct;
44struct mmsghdr;
45struct mount_attr;
46struct oldold_utsname;
47struct old_utsname;
48struct old_itimerspec32;
49struct old_timespec32;
50struct old_timeval32;
51struct old_timex32;
52struct old_utimbuf32;
53struct open_how;
54struct rlimit64;
55struct rseq;
56struct sched_attr;
57struct sel_arg_struct;
58struct statx;
59struct user_msghdr;
60
61struct __aio_sigset;
62struct __kernel_old_itimerval;
63struct __kernel_timespec;
64struct __kernel_timex;
65struct __kernel_old_timeval;
66struct __kernel_itimerspec;
67
68union bpf_attr;
69
70#ifndef __kernel_long_t
71typedef long __kernel_long_t;
72#endif
73
74typedef __kernel_long_t __kernel_old_time_t;
75typedef int __bitwise __kernel_rwf_t;
76typedef __kernel_rwf_t rwf_t;
77typedef s32 old_time32_t;
78
79#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
80/*
81 * Forward declaration and typedef for old types expected by MIPS and POWER
82 * system call instrumentation when building against kernel >= 5.6.0. To be
83 * removed after those system call instrumentation headers are regenerated
84 * against a recent kernel.
85 */
86typedef __kernel_old_time_t time_t;
87
88struct itimerspec;
89struct itimerval;
90struct timeval;
91struct timex;
92#endif
93
94struct trace_syscall_entry {
95 void *event_func;
96 const struct lttng_kernel_event_desc *desc;
97 const struct lttng_kernel_event_field * const *fields;
98 unsigned int nrargs;
99};
100
101struct trace_syscall_table {
102 const struct trace_syscall_entry *table;
103 const size_t len;
104};
105
106extern
107void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id);
108
109extern
110void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret);
111
112extern
113void syscall_entry_event_notifier_probe(void *__data, struct pt_regs *regs,
114 long id);
115extern
116void syscall_exit_event_notifier_probe(void *__data, struct pt_regs *regs,
117 long ret);
118
119#endif /* LTTNG_SYSCALLS_H */
This page took 0.024629 seconds and 5 git commands to generate.