xref: /freebsd/contrib/llvm-project/compiler-rt/include/sanitizer/linux_syscall_hooks.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1 //===-- linux_syscall_hooks.h ---------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of public sanitizer interface.
10 //
11 // System call handlers.
12 //
13 // Interface methods declared in this header implement pre- and post- syscall
14 // actions for the active sanitizer.
15 // Usage:
16 //   __sanitizer_syscall_pre_getfoo(...args...);
17 //   long res = syscall(__NR_getfoo, ...args...);
18 //   __sanitizer_syscall_post_getfoo(res, ...args...);
19 //===----------------------------------------------------------------------===//
20 #ifndef SANITIZER_LINUX_SYSCALL_HOOKS_H
21 #define SANITIZER_LINUX_SYSCALL_HOOKS_H
22 
23 #define __sanitizer_syscall_pre_time(tloc)                                     \
24   __sanitizer_syscall_pre_impl_time((long)(tloc))
25 #define __sanitizer_syscall_post_time(res, tloc)                               \
26   __sanitizer_syscall_post_impl_time(res, (long)(tloc))
27 #define __sanitizer_syscall_pre_stime(tptr)                                    \
28   __sanitizer_syscall_pre_impl_stime((long)(tptr))
29 #define __sanitizer_syscall_post_stime(res, tptr)                              \
30   __sanitizer_syscall_post_impl_stime(res, (long)(tptr))
31 #define __sanitizer_syscall_pre_gettimeofday(tv, tz)                           \
32   __sanitizer_syscall_pre_impl_gettimeofday((long)(tv), (long)(tz))
33 #define __sanitizer_syscall_post_gettimeofday(res, tv, tz)                     \
34   __sanitizer_syscall_post_impl_gettimeofday(res, (long)(tv), (long)(tz))
35 #define __sanitizer_syscall_pre_settimeofday(tv, tz)                           \
36   __sanitizer_syscall_pre_impl_settimeofday((long)(tv), (long)(tz))
37 #define __sanitizer_syscall_post_settimeofday(res, tv, tz)                     \
38   __sanitizer_syscall_post_impl_settimeofday(res, (long)(tv), (long)(tz))
39 #define __sanitizer_syscall_pre_adjtimex(txc_p)                                \
40   __sanitizer_syscall_pre_impl_adjtimex((long)(txc_p))
41 #define __sanitizer_syscall_post_adjtimex(res, txc_p)                          \
42   __sanitizer_syscall_post_impl_adjtimex(res, (long)(txc_p))
43 #define __sanitizer_syscall_pre_times(tbuf)                                    \
44   __sanitizer_syscall_pre_impl_times((long)(tbuf))
45 #define __sanitizer_syscall_post_times(res, tbuf)                              \
46   __sanitizer_syscall_post_impl_times(res, (long)(tbuf))
47 #define __sanitizer_syscall_pre_gettid() __sanitizer_syscall_pre_impl_gettid()
48 #define __sanitizer_syscall_post_gettid(res)                                   \
49   __sanitizer_syscall_post_impl_gettid(res)
50 #define __sanitizer_syscall_pre_nanosleep(rqtp, rmtp)                          \
51   __sanitizer_syscall_pre_impl_nanosleep((long)(rqtp), (long)(rmtp))
52 #define __sanitizer_syscall_post_nanosleep(res, rqtp, rmtp)                    \
53   __sanitizer_syscall_post_impl_nanosleep(res, (long)(rqtp), (long)(rmtp))
54 #define __sanitizer_syscall_pre_alarm(seconds)                                 \
55   __sanitizer_syscall_pre_impl_alarm((long)(seconds))
56 #define __sanitizer_syscall_post_alarm(res, seconds)                           \
57   __sanitizer_syscall_post_impl_alarm(res, (long)(seconds))
58 #define __sanitizer_syscall_pre_getpid() __sanitizer_syscall_pre_impl_getpid()
59 #define __sanitizer_syscall_post_getpid(res)                                   \
60   __sanitizer_syscall_post_impl_getpid(res)
61 #define __sanitizer_syscall_pre_getppid() __sanitizer_syscall_pre_impl_getppid()
62 #define __sanitizer_syscall_post_getppid(res)                                  \
63   __sanitizer_syscall_post_impl_getppid(res)
64 #define __sanitizer_syscall_pre_getuid() __sanitizer_syscall_pre_impl_getuid()
65 #define __sanitizer_syscall_post_getuid(res)                                   \
66   __sanitizer_syscall_post_impl_getuid(res)
67 #define __sanitizer_syscall_pre_geteuid() __sanitizer_syscall_pre_impl_geteuid()
68 #define __sanitizer_syscall_post_geteuid(res)                                  \
69   __sanitizer_syscall_post_impl_geteuid(res)
70 #define __sanitizer_syscall_pre_getgid() __sanitizer_syscall_pre_impl_getgid()
71 #define __sanitizer_syscall_post_getgid(res)                                   \
72   __sanitizer_syscall_post_impl_getgid(res)
73 #define __sanitizer_syscall_pre_getegid() __sanitizer_syscall_pre_impl_getegid()
74 #define __sanitizer_syscall_post_getegid(res)                                  \
75   __sanitizer_syscall_post_impl_getegid(res)
76 #define __sanitizer_syscall_pre_getresuid(ruid, euid, suid)                    \
77   __sanitizer_syscall_pre_impl_getresuid((long)(ruid), (long)(euid),           \
78                                          (long)(suid))
79 #define __sanitizer_syscall_post_getresuid(res, ruid, euid, suid)              \
80   __sanitizer_syscall_post_impl_getresuid(res, (long)(ruid), (long)(euid),     \
81                                           (long)(suid))
82 #define __sanitizer_syscall_pre_getresgid(rgid, egid, sgid)                    \
83   __sanitizer_syscall_pre_impl_getresgid((long)(rgid), (long)(egid),           \
84                                          (long)(sgid))
85 #define __sanitizer_syscall_post_getresgid(res, rgid, egid, sgid)              \
86   __sanitizer_syscall_post_impl_getresgid(res, (long)(rgid), (long)(egid),     \
87                                           (long)(sgid))
88 #define __sanitizer_syscall_pre_getpgid(pid)                                   \
89   __sanitizer_syscall_pre_impl_getpgid((long)(pid))
90 #define __sanitizer_syscall_post_getpgid(res, pid)                             \
91   __sanitizer_syscall_post_impl_getpgid(res, (long)(pid))
92 #define __sanitizer_syscall_pre_getpgrp() __sanitizer_syscall_pre_impl_getpgrp()
93 #define __sanitizer_syscall_post_getpgrp(res)                                  \
94   __sanitizer_syscall_post_impl_getpgrp(res)
95 #define __sanitizer_syscall_pre_getsid(pid)                                    \
96   __sanitizer_syscall_pre_impl_getsid((long)(pid))
97 #define __sanitizer_syscall_post_getsid(res, pid)                              \
98   __sanitizer_syscall_post_impl_getsid(res, (long)(pid))
99 #define __sanitizer_syscall_pre_getgroups(gidsetsize, grouplist)               \
100   __sanitizer_syscall_pre_impl_getgroups((long)(gidsetsize), (long)(grouplist))
101 #define __sanitizer_syscall_post_getgroups(res, gidsetsize, grouplist)         \
102   __sanitizer_syscall_post_impl_getgroups(res, (long)(gidsetsize),             \
103                                           (long)(grouplist))
104 #define __sanitizer_syscall_pre_setregid(rgid, egid)                           \
105   __sanitizer_syscall_pre_impl_setregid((long)(rgid), (long)(egid))
106 #define __sanitizer_syscall_post_setregid(res, rgid, egid)                     \
107   __sanitizer_syscall_post_impl_setregid(res, (long)(rgid), (long)(egid))
108 #define __sanitizer_syscall_pre_setgid(gid)                                    \
109   __sanitizer_syscall_pre_impl_setgid((long)(gid))
110 #define __sanitizer_syscall_post_setgid(res, gid)                              \
111   __sanitizer_syscall_post_impl_setgid(res, (long)(gid))
112 #define __sanitizer_syscall_pre_setreuid(ruid, euid)                           \
113   __sanitizer_syscall_pre_impl_setreuid((long)(ruid), (long)(euid))
114 #define __sanitizer_syscall_post_setreuid(res, ruid, euid)                     \
115   __sanitizer_syscall_post_impl_setreuid(res, (long)(ruid), (long)(euid))
116 #define __sanitizer_syscall_pre_setuid(uid)                                    \
117   __sanitizer_syscall_pre_impl_setuid((long)(uid))
118 #define __sanitizer_syscall_post_setuid(res, uid)                              \
119   __sanitizer_syscall_post_impl_setuid(res, (long)(uid))
120 #define __sanitizer_syscall_pre_setresuid(ruid, euid, suid)                    \
121   __sanitizer_syscall_pre_impl_setresuid((long)(ruid), (long)(euid),           \
122                                          (long)(suid))
123 #define __sanitizer_syscall_post_setresuid(res, ruid, euid, suid)              \
124   __sanitizer_syscall_post_impl_setresuid(res, (long)(ruid), (long)(euid),     \
125                                           (long)(suid))
126 #define __sanitizer_syscall_pre_setresgid(rgid, egid, sgid)                    \
127   __sanitizer_syscall_pre_impl_setresgid((long)(rgid), (long)(egid),           \
128                                          (long)(sgid))
129 #define __sanitizer_syscall_post_setresgid(res, rgid, egid, sgid)              \
130   __sanitizer_syscall_post_impl_setresgid(res, (long)(rgid), (long)(egid),     \
131                                           (long)(sgid))
132 #define __sanitizer_syscall_pre_setfsuid(uid)                                  \
133   __sanitizer_syscall_pre_impl_setfsuid((long)(uid))
134 #define __sanitizer_syscall_post_setfsuid(res, uid)                            \
135   __sanitizer_syscall_post_impl_setfsuid(res, (long)(uid))
136 #define __sanitizer_syscall_pre_setfsgid(gid)                                  \
137   __sanitizer_syscall_pre_impl_setfsgid((long)(gid))
138 #define __sanitizer_syscall_post_setfsgid(res, gid)                            \
139   __sanitizer_syscall_post_impl_setfsgid(res, (long)(gid))
140 #define __sanitizer_syscall_pre_setpgid(pid, pgid)                             \
141   __sanitizer_syscall_pre_impl_setpgid((long)(pid), (long)(pgid))
142 #define __sanitizer_syscall_post_setpgid(res, pid, pgid)                       \
143   __sanitizer_syscall_post_impl_setpgid(res, (long)(pid), (long)(pgid))
144 #define __sanitizer_syscall_pre_setsid() __sanitizer_syscall_pre_impl_setsid()
145 #define __sanitizer_syscall_post_setsid(res)                                   \
146   __sanitizer_syscall_post_impl_setsid(res)
147 #define __sanitizer_syscall_pre_setgroups(gidsetsize, grouplist)               \
148   __sanitizer_syscall_pre_impl_setgroups((long)(gidsetsize), (long)(grouplist))
149 #define __sanitizer_syscall_post_setgroups(res, gidsetsize, grouplist)         \
150   __sanitizer_syscall_post_impl_setgroups(res, (long)(gidsetsize),             \
151                                           (long)(grouplist))
152 #define __sanitizer_syscall_pre_acct(name)                                     \
153   __sanitizer_syscall_pre_impl_acct((long)(name))
154 #define __sanitizer_syscall_post_acct(res, name)                               \
155   __sanitizer_syscall_post_impl_acct(res, (long)(name))
156 #define __sanitizer_syscall_pre_capget(header, dataptr)                        \
157   __sanitizer_syscall_pre_impl_capget((long)(header), (long)(dataptr))
158 #define __sanitizer_syscall_post_capget(res, header, dataptr)                  \
159   __sanitizer_syscall_post_impl_capget(res, (long)(header), (long)(dataptr))
160 #define __sanitizer_syscall_pre_capset(header, data)                           \
161   __sanitizer_syscall_pre_impl_capset((long)(header), (long)(data))
162 #define __sanitizer_syscall_post_capset(res, header, data)                     \
163   __sanitizer_syscall_post_impl_capset(res, (long)(header), (long)(data))
164 #define __sanitizer_syscall_pre_personality(personality)                       \
165   __sanitizer_syscall_pre_impl_personality((long)(personality))
166 #define __sanitizer_syscall_post_personality(res, personality)                 \
167   __sanitizer_syscall_post_impl_personality(res, (long)(personality))
168 #define __sanitizer_syscall_pre_sigpending(set)                                \
169   __sanitizer_syscall_pre_impl_sigpending((long)(set))
170 #define __sanitizer_syscall_post_sigpending(res, set)                          \
171   __sanitizer_syscall_post_impl_sigpending(res, (long)(set))
172 #define __sanitizer_syscall_pre_sigprocmask(how, set, oset)                    \
173   __sanitizer_syscall_pre_impl_sigprocmask((long)(how), (long)(set),           \
174                                            (long)(oset))
175 #define __sanitizer_syscall_post_sigprocmask(res, how, set, oset)              \
176   __sanitizer_syscall_post_impl_sigprocmask(res, (long)(how), (long)(set),     \
177                                             (long)(oset))
178 #define __sanitizer_syscall_pre_getitimer(which, value)                        \
179   __sanitizer_syscall_pre_impl_getitimer((long)(which), (long)(value))
180 #define __sanitizer_syscall_post_getitimer(res, which, value)                  \
181   __sanitizer_syscall_post_impl_getitimer(res, (long)(which), (long)(value))
182 #define __sanitizer_syscall_pre_setitimer(which, value, ovalue)                \
183   __sanitizer_syscall_pre_impl_setitimer((long)(which), (long)(value),         \
184                                          (long)(ovalue))
185 #define __sanitizer_syscall_post_setitimer(res, which, value, ovalue)          \
186   __sanitizer_syscall_post_impl_setitimer(res, (long)(which), (long)(value),   \
187                                           (long)(ovalue))
188 #define __sanitizer_syscall_pre_timer_create(which_clock, timer_event_spec,    \
189                                              created_timer_id)                 \
190   __sanitizer_syscall_pre_impl_timer_create(                                   \
191       (long)(which_clock), (long)(timer_event_spec), (long)(created_timer_id))
192 #define __sanitizer_syscall_post_timer_create(                                 \
193     res, which_clock, timer_event_spec, created_timer_id)                      \
194   __sanitizer_syscall_post_impl_timer_create(res, (long)(which_clock),         \
195                                              (long)(timer_event_spec),         \
196                                              (long)(created_timer_id))
197 #define __sanitizer_syscall_pre_timer_gettime(timer_id, setting)               \
198   __sanitizer_syscall_pre_impl_timer_gettime((long)(timer_id), (long)(setting))
199 #define __sanitizer_syscall_post_timer_gettime(res, timer_id, setting)         \
200   __sanitizer_syscall_post_impl_timer_gettime(res, (long)(timer_id),           \
201                                               (long)(setting))
202 #define __sanitizer_syscall_pre_timer_getoverrun(timer_id)                     \
203   __sanitizer_syscall_pre_impl_timer_getoverrun((long)(timer_id))
204 #define __sanitizer_syscall_post_timer_getoverrun(res, timer_id)               \
205   __sanitizer_syscall_post_impl_timer_getoverrun(res, (long)(timer_id))
206 #define __sanitizer_syscall_pre_timer_settime(timer_id, flags, new_setting,    \
207                                               old_setting)                     \
208   __sanitizer_syscall_pre_impl_timer_settime((long)(timer_id), (long)(flags),  \
209                                              (long)(new_setting),              \
210                                              (long)(old_setting))
211 #define __sanitizer_syscall_post_timer_settime(res, timer_id, flags,           \
212                                                new_setting, old_setting)       \
213   __sanitizer_syscall_post_impl_timer_settime(                                 \
214       res, (long)(timer_id), (long)(flags), (long)(new_setting),               \
215       (long)(old_setting))
216 #define __sanitizer_syscall_pre_timer_delete(timer_id)                         \
217   __sanitizer_syscall_pre_impl_timer_delete((long)(timer_id))
218 #define __sanitizer_syscall_post_timer_delete(res, timer_id)                   \
219   __sanitizer_syscall_post_impl_timer_delete(res, (long)(timer_id))
220 #define __sanitizer_syscall_pre_clock_settime(which_clock, tp)                 \
221   __sanitizer_syscall_pre_impl_clock_settime((long)(which_clock), (long)(tp))
222 #define __sanitizer_syscall_post_clock_settime(res, which_clock, tp)           \
223   __sanitizer_syscall_post_impl_clock_settime(res, (long)(which_clock),        \
224                                               (long)(tp))
225 #define __sanitizer_syscall_pre_clock_gettime(which_clock, tp)                 \
226   __sanitizer_syscall_pre_impl_clock_gettime((long)(which_clock), (long)(tp))
227 #define __sanitizer_syscall_post_clock_gettime(res, which_clock, tp)           \
228   __sanitizer_syscall_post_impl_clock_gettime(res, (long)(which_clock),        \
229                                               (long)(tp))
230 #define __sanitizer_syscall_pre_clock_adjtime(which_clock, tx)                 \
231   __sanitizer_syscall_pre_impl_clock_adjtime((long)(which_clock), (long)(tx))
232 #define __sanitizer_syscall_post_clock_adjtime(res, which_clock, tx)           \
233   __sanitizer_syscall_post_impl_clock_adjtime(res, (long)(which_clock),        \
234                                               (long)(tx))
235 #define __sanitizer_syscall_pre_clock_getres(which_clock, tp)                  \
236   __sanitizer_syscall_pre_impl_clock_getres((long)(which_clock), (long)(tp))
237 #define __sanitizer_syscall_post_clock_getres(res, which_clock, tp)            \
238   __sanitizer_syscall_post_impl_clock_getres(res, (long)(which_clock),         \
239                                              (long)(tp))
240 #define __sanitizer_syscall_pre_clock_nanosleep(which_clock, flags, rqtp,      \
241                                                 rmtp)                          \
242   __sanitizer_syscall_pre_impl_clock_nanosleep(                                \
243       (long)(which_clock), (long)(flags), (long)(rqtp), (long)(rmtp))
244 #define __sanitizer_syscall_post_clock_nanosleep(res, which_clock, flags,      \
245                                                  rqtp, rmtp)                   \
246   __sanitizer_syscall_post_impl_clock_nanosleep(                               \
247       res, (long)(which_clock), (long)(flags), (long)(rqtp), (long)(rmtp))
248 #define __sanitizer_syscall_pre_nice(increment)                                \
249   __sanitizer_syscall_pre_impl_nice((long)(increment))
250 #define __sanitizer_syscall_post_nice(res, increment)                          \
251   __sanitizer_syscall_post_impl_nice(res, (long)(increment))
252 #define __sanitizer_syscall_pre_sched_setscheduler(pid, policy, param)         \
253   __sanitizer_syscall_pre_impl_sched_setscheduler((long)(pid), (long)(policy), \
254                                                   (long)(param))
255 #define __sanitizer_syscall_post_sched_setscheduler(res, pid, policy, param)   \
256   __sanitizer_syscall_post_impl_sched_setscheduler(                            \
257       res, (long)(pid), (long)(policy), (long)(param))
258 #define __sanitizer_syscall_pre_sched_setparam(pid, param)                     \
259   __sanitizer_syscall_pre_impl_sched_setparam((long)(pid), (long)(param))
260 #define __sanitizer_syscall_post_sched_setparam(res, pid, param)               \
261   __sanitizer_syscall_post_impl_sched_setparam(res, (long)(pid), (long)(param))
262 #define __sanitizer_syscall_pre_sched_getscheduler(pid)                        \
263   __sanitizer_syscall_pre_impl_sched_getscheduler((long)(pid))
264 #define __sanitizer_syscall_post_sched_getscheduler(res, pid)                  \
265   __sanitizer_syscall_post_impl_sched_getscheduler(res, (long)(pid))
266 #define __sanitizer_syscall_pre_sched_getparam(pid, param)                     \
267   __sanitizer_syscall_pre_impl_sched_getparam((long)(pid), (long)(param))
268 #define __sanitizer_syscall_post_sched_getparam(res, pid, param)               \
269   __sanitizer_syscall_post_impl_sched_getparam(res, (long)(pid), (long)(param))
270 #define __sanitizer_syscall_pre_sched_setaffinity(pid, len, user_mask_ptr)     \
271   __sanitizer_syscall_pre_impl_sched_setaffinity((long)(pid), (long)(len),     \
272                                                  (long)(user_mask_ptr))
273 #define __sanitizer_syscall_post_sched_setaffinity(res, pid, len,              \
274                                                    user_mask_ptr)              \
275   __sanitizer_syscall_post_impl_sched_setaffinity(                             \
276       res, (long)(pid), (long)(len), (long)(user_mask_ptr))
277 #define __sanitizer_syscall_pre_sched_getaffinity(pid, len, user_mask_ptr)     \
278   __sanitizer_syscall_pre_impl_sched_getaffinity((long)(pid), (long)(len),     \
279                                                  (long)(user_mask_ptr))
280 #define __sanitizer_syscall_post_sched_getaffinity(res, pid, len,              \
281                                                    user_mask_ptr)              \
282   __sanitizer_syscall_post_impl_sched_getaffinity(                             \
283       res, (long)(pid), (long)(len), (long)(user_mask_ptr))
284 #define __sanitizer_syscall_pre_sched_yield()                                  \
285   __sanitizer_syscall_pre_impl_sched_yield()
286 #define __sanitizer_syscall_post_sched_yield(res)                              \
287   __sanitizer_syscall_post_impl_sched_yield(res)
288 #define __sanitizer_syscall_pre_sched_get_priority_max(policy)                 \
289   __sanitizer_syscall_pre_impl_sched_get_priority_max((long)(policy))
290 #define __sanitizer_syscall_post_sched_get_priority_max(res, policy)           \
291   __sanitizer_syscall_post_impl_sched_get_priority_max(res, (long)(policy))
292 #define __sanitizer_syscall_pre_sched_get_priority_min(policy)                 \
293   __sanitizer_syscall_pre_impl_sched_get_priority_min((long)(policy))
294 #define __sanitizer_syscall_post_sched_get_priority_min(res, policy)           \
295   __sanitizer_syscall_post_impl_sched_get_priority_min(res, (long)(policy))
296 #define __sanitizer_syscall_pre_sched_rr_get_interval(pid, interval)           \
297   __sanitizer_syscall_pre_impl_sched_rr_get_interval((long)(pid),              \
298                                                      (long)(interval))
299 #define __sanitizer_syscall_post_sched_rr_get_interval(res, pid, interval)     \
300   __sanitizer_syscall_post_impl_sched_rr_get_interval(res, (long)(pid),        \
301                                                       (long)(interval))
302 #define __sanitizer_syscall_pre_setpriority(which, who, niceval)               \
303   __sanitizer_syscall_pre_impl_setpriority((long)(which), (long)(who),         \
304                                            (long)(niceval))
305 #define __sanitizer_syscall_post_setpriority(res, which, who, niceval)         \
306   __sanitizer_syscall_post_impl_setpriority(res, (long)(which), (long)(who),   \
307                                             (long)(niceval))
308 #define __sanitizer_syscall_pre_getpriority(which, who)                        \
309   __sanitizer_syscall_pre_impl_getpriority((long)(which), (long)(who))
310 #define __sanitizer_syscall_post_getpriority(res, which, who)                  \
311   __sanitizer_syscall_post_impl_getpriority(res, (long)(which), (long)(who))
312 #define __sanitizer_syscall_pre_shutdown(arg0, arg1)                           \
313   __sanitizer_syscall_pre_impl_shutdown((long)(arg0), (long)(arg1))
314 #define __sanitizer_syscall_post_shutdown(res, arg0, arg1)                     \
315   __sanitizer_syscall_post_impl_shutdown(res, (long)(arg0), (long)(arg1))
316 #define __sanitizer_syscall_pre_reboot(magic1, magic2, cmd, arg)               \
317   __sanitizer_syscall_pre_impl_reboot((long)(magic1), (long)(magic2),          \
318                                       (long)(cmd), (long)(arg))
319 #define __sanitizer_syscall_post_reboot(res, magic1, magic2, cmd, arg)         \
320   __sanitizer_syscall_post_impl_reboot(res, (long)(magic1), (long)(magic2),    \
321                                        (long)(cmd), (long)(arg))
322 #define __sanitizer_syscall_pre_restart_syscall()                              \
323   __sanitizer_syscall_pre_impl_restart_syscall()
324 #define __sanitizer_syscall_post_restart_syscall(res)                          \
325   __sanitizer_syscall_post_impl_restart_syscall(res)
326 #define __sanitizer_syscall_pre_kexec_load(entry, nr_segments, segments,       \
327                                            flags)                              \
328   __sanitizer_syscall_pre_impl_kexec_load((long)(entry), (long)(nr_segments),  \
329                                           (long)(segments), (long)(flags))
330 #define __sanitizer_syscall_post_kexec_load(res, entry, nr_segments, segments, \
331                                             flags)                             \
332   __sanitizer_syscall_post_impl_kexec_load(res, (long)(entry),                 \
333                                            (long)(nr_segments),                \
334                                            (long)(segments), (long)(flags))
335 #define __sanitizer_syscall_pre_exit(error_code)                               \
336   __sanitizer_syscall_pre_impl_exit((long)(error_code))
337 #define __sanitizer_syscall_post_exit(res, error_code)                         \
338   __sanitizer_syscall_post_impl_exit(res, (long)(error_code))
339 #define __sanitizer_syscall_pre_exit_group(error_code)                         \
340   __sanitizer_syscall_pre_impl_exit_group((long)(error_code))
341 #define __sanitizer_syscall_post_exit_group(res, error_code)                   \
342   __sanitizer_syscall_post_impl_exit_group(res, (long)(error_code))
343 #define __sanitizer_syscall_pre_wait4(pid, stat_addr, options, ru)             \
344   __sanitizer_syscall_pre_impl_wait4((long)(pid), (long)(stat_addr),           \
345                                      (long)(options), (long)(ru))
346 #define __sanitizer_syscall_post_wait4(res, pid, stat_addr, options, ru)       \
347   __sanitizer_syscall_post_impl_wait4(res, (long)(pid), (long)(stat_addr),     \
348                                       (long)(options), (long)(ru))
349 #define __sanitizer_syscall_pre_waitid(which, pid, infop, options, ru)         \
350   __sanitizer_syscall_pre_impl_waitid(                                         \
351       (long)(which), (long)(pid), (long)(infop), (long)(options), (long)(ru))
352 #define __sanitizer_syscall_post_waitid(res, which, pid, infop, options, ru)   \
353   __sanitizer_syscall_post_impl_waitid(res, (long)(which), (long)(pid),        \
354                                        (long)(infop), (long)(options),         \
355                                        (long)(ru))
356 #define __sanitizer_syscall_pre_waitpid(pid, stat_addr, options)               \
357   __sanitizer_syscall_pre_impl_waitpid((long)(pid), (long)(stat_addr),         \
358                                        (long)(options))
359 #define __sanitizer_syscall_post_waitpid(res, pid, stat_addr, options)         \
360   __sanitizer_syscall_post_impl_waitpid(res, (long)(pid), (long)(stat_addr),   \
361                                         (long)(options))
362 #define __sanitizer_syscall_pre_set_tid_address(tidptr)                        \
363   __sanitizer_syscall_pre_impl_set_tid_address((long)(tidptr))
364 #define __sanitizer_syscall_post_set_tid_address(res, tidptr)                  \
365   __sanitizer_syscall_post_impl_set_tid_address(res, (long)(tidptr))
366 #define __sanitizer_syscall_pre_init_module(umod, len, uargs)                  \
367   __sanitizer_syscall_pre_impl_init_module((long)(umod), (long)(len),          \
368                                            (long)(uargs))
369 #define __sanitizer_syscall_post_init_module(res, umod, len, uargs)            \
370   __sanitizer_syscall_post_impl_init_module(res, (long)(umod), (long)(len),    \
371                                             (long)(uargs))
372 #define __sanitizer_syscall_pre_delete_module(name_user, flags)                \
373   __sanitizer_syscall_pre_impl_delete_module((long)(name_user), (long)(flags))
374 #define __sanitizer_syscall_post_delete_module(res, name_user, flags)          \
375   __sanitizer_syscall_post_impl_delete_module(res, (long)(name_user),          \
376                                               (long)(flags))
377 #define __sanitizer_syscall_pre_rt_sigprocmask(how, set, oset, sigsetsize)     \
378   __sanitizer_syscall_pre_impl_rt_sigprocmask(                                 \
379       (long)(how), (long)(set), (long)(oset), (long)(sigsetsize))
380 #define __sanitizer_syscall_post_rt_sigprocmask(res, how, set, oset,           \
381                                                 sigsetsize)                    \
382   __sanitizer_syscall_post_impl_rt_sigprocmask(                                \
383       res, (long)(how), (long)(set), (long)(oset), (long)(sigsetsize))
384 #define __sanitizer_syscall_pre_rt_sigpending(set, sigsetsize)                 \
385   __sanitizer_syscall_pre_impl_rt_sigpending((long)(set), (long)(sigsetsize))
386 #define __sanitizer_syscall_post_rt_sigpending(res, set, sigsetsize)           \
387   __sanitizer_syscall_post_impl_rt_sigpending(res, (long)(set),                \
388                                               (long)(sigsetsize))
389 #define __sanitizer_syscall_pre_rt_sigtimedwait(uthese, uinfo, uts,            \
390                                                 sigsetsize)                    \
391   __sanitizer_syscall_pre_impl_rt_sigtimedwait(                                \
392       (long)(uthese), (long)(uinfo), (long)(uts), (long)(sigsetsize))
393 #define __sanitizer_syscall_post_rt_sigtimedwait(res, uthese, uinfo, uts,      \
394                                                  sigsetsize)                   \
395   __sanitizer_syscall_post_impl_rt_sigtimedwait(                               \
396       res, (long)(uthese), (long)(uinfo), (long)(uts), (long)(sigsetsize))
397 #define __sanitizer_syscall_pre_rt_tgsigqueueinfo(tgid, pid, sig, uinfo)       \
398   __sanitizer_syscall_pre_impl_rt_tgsigqueueinfo((long)(tgid), (long)(pid),    \
399                                                  (long)(sig), (long)(uinfo))
400 #define __sanitizer_syscall_post_rt_tgsigqueueinfo(res, tgid, pid, sig, uinfo) \
401   __sanitizer_syscall_post_impl_rt_tgsigqueueinfo(                             \
402       res, (long)(tgid), (long)(pid), (long)(sig), (long)(uinfo))
403 #define __sanitizer_syscall_pre_kill(pid, sig)                                 \
404   __sanitizer_syscall_pre_impl_kill((long)(pid), (long)(sig))
405 #define __sanitizer_syscall_post_kill(res, pid, sig)                           \
406   __sanitizer_syscall_post_impl_kill(res, (long)(pid), (long)(sig))
407 #define __sanitizer_syscall_pre_tgkill(tgid, pid, sig)                         \
408   __sanitizer_syscall_pre_impl_tgkill((long)(tgid), (long)(pid), (long)(sig))
409 #define __sanitizer_syscall_post_tgkill(res, tgid, pid, sig)                   \
410   __sanitizer_syscall_post_impl_tgkill(res, (long)(tgid), (long)(pid),         \
411                                        (long)(sig))
412 #define __sanitizer_syscall_pre_tkill(pid, sig)                                \
413   __sanitizer_syscall_pre_impl_tkill((long)(pid), (long)(sig))
414 #define __sanitizer_syscall_post_tkill(res, pid, sig)                          \
415   __sanitizer_syscall_post_impl_tkill(res, (long)(pid), (long)(sig))
416 #define __sanitizer_syscall_pre_rt_sigqueueinfo(pid, sig, uinfo)               \
417   __sanitizer_syscall_pre_impl_rt_sigqueueinfo((long)(pid), (long)(sig),       \
418                                                (long)(uinfo))
419 #define __sanitizer_syscall_post_rt_sigqueueinfo(res, pid, sig, uinfo)         \
420   __sanitizer_syscall_post_impl_rt_sigqueueinfo(res, (long)(pid), (long)(sig), \
421                                                 (long)(uinfo))
422 #define __sanitizer_syscall_pre_sgetmask()                                     \
423   __sanitizer_syscall_pre_impl_sgetmask()
424 #define __sanitizer_syscall_post_sgetmask(res)                                 \
425   __sanitizer_syscall_post_impl_sgetmask(res)
426 #define __sanitizer_syscall_pre_ssetmask(newmask)                              \
427   __sanitizer_syscall_pre_impl_ssetmask((long)(newmask))
428 #define __sanitizer_syscall_post_ssetmask(res, newmask)                        \
429   __sanitizer_syscall_post_impl_ssetmask(res, (long)(newmask))
430 #define __sanitizer_syscall_pre_signal(sig, handler)                           \
431   __sanitizer_syscall_pre_impl_signal((long)(sig), (long)(handler))
432 #define __sanitizer_syscall_post_signal(res, sig, handler)                     \
433   __sanitizer_syscall_post_impl_signal(res, (long)(sig), (long)(handler))
434 #define __sanitizer_syscall_pre_pause() __sanitizer_syscall_pre_impl_pause()
435 #define __sanitizer_syscall_post_pause(res)                                    \
436   __sanitizer_syscall_post_impl_pause(res)
437 #define __sanitizer_syscall_pre_sync() __sanitizer_syscall_pre_impl_sync()
438 #define __sanitizer_syscall_post_sync(res)                                     \
439   __sanitizer_syscall_post_impl_sync(res)
440 #define __sanitizer_syscall_pre_fsync(fd)                                      \
441   __sanitizer_syscall_pre_impl_fsync((long)(fd))
442 #define __sanitizer_syscall_post_fsync(res, fd)                                \
443   __sanitizer_syscall_post_impl_fsync(res, (long)(fd))
444 #define __sanitizer_syscall_pre_fdatasync(fd)                                  \
445   __sanitizer_syscall_pre_impl_fdatasync((long)(fd))
446 #define __sanitizer_syscall_post_fdatasync(res, fd)                            \
447   __sanitizer_syscall_post_impl_fdatasync(res, (long)(fd))
448 #define __sanitizer_syscall_pre_bdflush(func, data)                            \
449   __sanitizer_syscall_pre_impl_bdflush((long)(func), (long)(data))
450 #define __sanitizer_syscall_post_bdflush(res, func, data)                      \
451   __sanitizer_syscall_post_impl_bdflush(res, (long)(func), (long)(data))
452 #define __sanitizer_syscall_pre_mount(dev_name, dir_name, type, flags, data)   \
453   __sanitizer_syscall_pre_impl_mount((long)(dev_name), (long)(dir_name),       \
454                                      (long)(type), (long)(flags),              \
455                                      (long)(data))
456 #define __sanitizer_syscall_post_mount(res, dev_name, dir_name, type, flags,   \
457                                        data)                                   \
458   __sanitizer_syscall_post_impl_mount(res, (long)(dev_name), (long)(dir_name), \
459                                       (long)(type), (long)(flags),             \
460                                       (long)(data))
461 #define __sanitizer_syscall_pre_umount(name, flags)                            \
462   __sanitizer_syscall_pre_impl_umount((long)(name), (long)(flags))
463 #define __sanitizer_syscall_post_umount(res, name, flags)                      \
464   __sanitizer_syscall_post_impl_umount(res, (long)(name), (long)(flags))
465 #define __sanitizer_syscall_pre_oldumount(name)                                \
466   __sanitizer_syscall_pre_impl_oldumount((long)(name))
467 #define __sanitizer_syscall_post_oldumount(res, name)                          \
468   __sanitizer_syscall_post_impl_oldumount(res, (long)(name))
469 #define __sanitizer_syscall_pre_truncate(path, length)                         \
470   __sanitizer_syscall_pre_impl_truncate((long)(path), (long)(length))
471 #define __sanitizer_syscall_post_truncate(res, path, length)                   \
472   __sanitizer_syscall_post_impl_truncate(res, (long)(path), (long)(length))
473 #define __sanitizer_syscall_pre_ftruncate(fd, length)                          \
474   __sanitizer_syscall_pre_impl_ftruncate((long)(fd), (long)(length))
475 #define __sanitizer_syscall_post_ftruncate(res, fd, length)                    \
476   __sanitizer_syscall_post_impl_ftruncate(res, (long)(fd), (long)(length))
477 #define __sanitizer_syscall_pre_stat(filename, statbuf)                        \
478   __sanitizer_syscall_pre_impl_stat((long)(filename), (long)(statbuf))
479 #define __sanitizer_syscall_post_stat(res, filename, statbuf)                  \
480   __sanitizer_syscall_post_impl_stat(res, (long)(filename), (long)(statbuf))
481 #define __sanitizer_syscall_pre_statfs(path, buf)                              \
482   __sanitizer_syscall_pre_impl_statfs((long)(path), (long)(buf))
483 #define __sanitizer_syscall_post_statfs(res, path, buf)                        \
484   __sanitizer_syscall_post_impl_statfs(res, (long)(path), (long)(buf))
485 #define __sanitizer_syscall_pre_statfs64(path, sz, buf)                        \
486   __sanitizer_syscall_pre_impl_statfs64((long)(path), (long)(sz), (long)(buf))
487 #define __sanitizer_syscall_post_statfs64(res, path, sz, buf)                  \
488   __sanitizer_syscall_post_impl_statfs64(res, (long)(path), (long)(sz),        \
489                                          (long)(buf))
490 #define __sanitizer_syscall_pre_fstatfs(fd, buf)                               \
491   __sanitizer_syscall_pre_impl_fstatfs((long)(fd), (long)(buf))
492 #define __sanitizer_syscall_post_fstatfs(res, fd, buf)                         \
493   __sanitizer_syscall_post_impl_fstatfs(res, (long)(fd), (long)(buf))
494 #define __sanitizer_syscall_pre_fstatfs64(fd, sz, buf)                         \
495   __sanitizer_syscall_pre_impl_fstatfs64((long)(fd), (long)(sz), (long)(buf))
496 #define __sanitizer_syscall_post_fstatfs64(res, fd, sz, buf)                   \
497   __sanitizer_syscall_post_impl_fstatfs64(res, (long)(fd), (long)(sz),         \
498                                           (long)(buf))
499 #define __sanitizer_syscall_pre_lstat(filename, statbuf)                       \
500   __sanitizer_syscall_pre_impl_lstat((long)(filename), (long)(statbuf))
501 #define __sanitizer_syscall_post_lstat(res, filename, statbuf)                 \
502   __sanitizer_syscall_post_impl_lstat(res, (long)(filename), (long)(statbuf))
503 #define __sanitizer_syscall_pre_fstat(fd, statbuf)                             \
504   __sanitizer_syscall_pre_impl_fstat((long)(fd), (long)(statbuf))
505 #define __sanitizer_syscall_post_fstat(res, fd, statbuf)                       \
506   __sanitizer_syscall_post_impl_fstat(res, (long)(fd), (long)(statbuf))
507 #define __sanitizer_syscall_pre_newstat(filename, statbuf)                     \
508   __sanitizer_syscall_pre_impl_newstat((long)(filename), (long)(statbuf))
509 #define __sanitizer_syscall_post_newstat(res, filename, statbuf)               \
510   __sanitizer_syscall_post_impl_newstat(res, (long)(filename), (long)(statbuf))
511 #define __sanitizer_syscall_pre_newlstat(filename, statbuf)                    \
512   __sanitizer_syscall_pre_impl_newlstat((long)(filename), (long)(statbuf))
513 #define __sanitizer_syscall_post_newlstat(res, filename, statbuf)              \
514   __sanitizer_syscall_post_impl_newlstat(res, (long)(filename), (long)(statbuf))
515 #define __sanitizer_syscall_pre_newfstat(fd, statbuf)                          \
516   __sanitizer_syscall_pre_impl_newfstat((long)(fd), (long)(statbuf))
517 #define __sanitizer_syscall_post_newfstat(res, fd, statbuf)                    \
518   __sanitizer_syscall_post_impl_newfstat(res, (long)(fd), (long)(statbuf))
519 #define __sanitizer_syscall_pre_ustat(dev, ubuf)                               \
520   __sanitizer_syscall_pre_impl_ustat((long)(dev), (long)(ubuf))
521 #define __sanitizer_syscall_post_ustat(res, dev, ubuf)                         \
522   __sanitizer_syscall_post_impl_ustat(res, (long)(dev), (long)(ubuf))
523 #define __sanitizer_syscall_pre_stat64(filename, statbuf)                      \
524   __sanitizer_syscall_pre_impl_stat64((long)(filename), (long)(statbuf))
525 #define __sanitizer_syscall_post_stat64(res, filename, statbuf)                \
526   __sanitizer_syscall_post_impl_stat64(res, (long)(filename), (long)(statbuf))
527 #define __sanitizer_syscall_pre_fstat64(fd, statbuf)                           \
528   __sanitizer_syscall_pre_impl_fstat64((long)(fd), (long)(statbuf))
529 #define __sanitizer_syscall_post_fstat64(res, fd, statbuf)                     \
530   __sanitizer_syscall_post_impl_fstat64(res, (long)(fd), (long)(statbuf))
531 #define __sanitizer_syscall_pre_lstat64(filename, statbuf)                     \
532   __sanitizer_syscall_pre_impl_lstat64((long)(filename), (long)(statbuf))
533 #define __sanitizer_syscall_post_lstat64(res, filename, statbuf)               \
534   __sanitizer_syscall_post_impl_lstat64(res, (long)(filename), (long)(statbuf))
535 #define __sanitizer_syscall_pre_setxattr(path, name, value, size, flags)       \
536   __sanitizer_syscall_pre_impl_setxattr(                                       \
537       (long)(path), (long)(name), (long)(value), (long)(size), (long)(flags))
538 #define __sanitizer_syscall_post_setxattr(res, path, name, value, size, flags) \
539   __sanitizer_syscall_post_impl_setxattr(res, (long)(path), (long)(name),      \
540                                          (long)(value), (long)(size),          \
541                                          (long)(flags))
542 #define __sanitizer_syscall_pre_lsetxattr(path, name, value, size, flags)      \
543   __sanitizer_syscall_pre_impl_lsetxattr(                                      \
544       (long)(path), (long)(name), (long)(value), (long)(size), (long)(flags))
545 #define __sanitizer_syscall_post_lsetxattr(res, path, name, value, size,       \
546                                            flags)                              \
547   __sanitizer_syscall_post_impl_lsetxattr(res, (long)(path), (long)(name),     \
548                                           (long)(value), (long)(size),         \
549                                           (long)(flags))
550 #define __sanitizer_syscall_pre_fsetxattr(fd, name, value, size, flags)        \
551   __sanitizer_syscall_pre_impl_fsetxattr(                                      \
552       (long)(fd), (long)(name), (long)(value), (long)(size), (long)(flags))
553 #define __sanitizer_syscall_post_fsetxattr(res, fd, name, value, size, flags)  \
554   __sanitizer_syscall_post_impl_fsetxattr(res, (long)(fd), (long)(name),       \
555                                           (long)(value), (long)(size),         \
556                                           (long)(flags))
557 #define __sanitizer_syscall_pre_getxattr(path, name, value, size)              \
558   __sanitizer_syscall_pre_impl_getxattr((long)(path), (long)(name),            \
559                                         (long)(value), (long)(size))
560 #define __sanitizer_syscall_post_getxattr(res, path, name, value, size)        \
561   __sanitizer_syscall_post_impl_getxattr(res, (long)(path), (long)(name),      \
562                                          (long)(value), (long)(size))
563 #define __sanitizer_syscall_pre_lgetxattr(path, name, value, size)             \
564   __sanitizer_syscall_pre_impl_lgetxattr((long)(path), (long)(name),           \
565                                          (long)(value), (long)(size))
566 #define __sanitizer_syscall_post_lgetxattr(res, path, name, value, size)       \
567   __sanitizer_syscall_post_impl_lgetxattr(res, (long)(path), (long)(name),     \
568                                           (long)(value), (long)(size))
569 #define __sanitizer_syscall_pre_fgetxattr(fd, name, value, size)               \
570   __sanitizer_syscall_pre_impl_fgetxattr((long)(fd), (long)(name),             \
571                                          (long)(value), (long)(size))
572 #define __sanitizer_syscall_post_fgetxattr(res, fd, name, value, size)         \
573   __sanitizer_syscall_post_impl_fgetxattr(res, (long)(fd), (long)(name),       \
574                                           (long)(value), (long)(size))
575 #define __sanitizer_syscall_pre_listxattr(path, list, size)                    \
576   __sanitizer_syscall_pre_impl_listxattr((long)(path), (long)(list),           \
577                                          (long)(size))
578 #define __sanitizer_syscall_post_listxattr(res, path, list, size)              \
579   __sanitizer_syscall_post_impl_listxattr(res, (long)(path), (long)(list),     \
580                                           (long)(size))
581 #define __sanitizer_syscall_pre_llistxattr(path, list, size)                   \
582   __sanitizer_syscall_pre_impl_llistxattr((long)(path), (long)(list),          \
583                                           (long)(size))
584 #define __sanitizer_syscall_post_llistxattr(res, path, list, size)             \
585   __sanitizer_syscall_post_impl_llistxattr(res, (long)(path), (long)(list),    \
586                                            (long)(size))
587 #define __sanitizer_syscall_pre_flistxattr(fd, list, size)                     \
588   __sanitizer_syscall_pre_impl_flistxattr((long)(fd), (long)(list),            \
589                                           (long)(size))
590 #define __sanitizer_syscall_post_flistxattr(res, fd, list, size)               \
591   __sanitizer_syscall_post_impl_flistxattr(res, (long)(fd), (long)(list),      \
592                                            (long)(size))
593 #define __sanitizer_syscall_pre_removexattr(path, name)                        \
594   __sanitizer_syscall_pre_impl_removexattr((long)(path), (long)(name))
595 #define __sanitizer_syscall_post_removexattr(res, path, name)                  \
596   __sanitizer_syscall_post_impl_removexattr(res, (long)(path), (long)(name))
597 #define __sanitizer_syscall_pre_lremovexattr(path, name)                       \
598   __sanitizer_syscall_pre_impl_lremovexattr((long)(path), (long)(name))
599 #define __sanitizer_syscall_post_lremovexattr(res, path, name)                 \
600   __sanitizer_syscall_post_impl_lremovexattr(res, (long)(path), (long)(name))
601 #define __sanitizer_syscall_pre_fremovexattr(fd, name)                         \
602   __sanitizer_syscall_pre_impl_fremovexattr((long)(fd), (long)(name))
603 #define __sanitizer_syscall_post_fremovexattr(res, fd, name)                   \
604   __sanitizer_syscall_post_impl_fremovexattr(res, (long)(fd), (long)(name))
605 #define __sanitizer_syscall_pre_brk(brk)                                       \
606   __sanitizer_syscall_pre_impl_brk((long)(brk))
607 #define __sanitizer_syscall_post_brk(res, brk)                                 \
608   __sanitizer_syscall_post_impl_brk(res, (long)(brk))
609 #define __sanitizer_syscall_pre_mprotect(start, len, prot)                     \
610   __sanitizer_syscall_pre_impl_mprotect((long)(start), (long)(len),            \
611                                         (long)(prot))
612 #define __sanitizer_syscall_post_mprotect(res, start, len, prot)               \
613   __sanitizer_syscall_post_impl_mprotect(res, (long)(start), (long)(len),      \
614                                          (long)(prot))
615 #define __sanitizer_syscall_pre_mremap(addr, old_len, new_len, flags,          \
616                                        new_addr)                               \
617   __sanitizer_syscall_pre_impl_mremap((long)(addr), (long)(old_len),           \
618                                       (long)(new_len), (long)(flags),          \
619                                       (long)(new_addr))
620 #define __sanitizer_syscall_post_mremap(res, addr, old_len, new_len, flags,    \
621                                         new_addr)                              \
622   __sanitizer_syscall_post_impl_mremap(res, (long)(addr), (long)(old_len),     \
623                                        (long)(new_len), (long)(flags),         \
624                                        (long)(new_addr))
625 #define __sanitizer_syscall_pre_remap_file_pages(start, size, prot, pgoff,     \
626                                                  flags)                        \
627   __sanitizer_syscall_pre_impl_remap_file_pages(                               \
628       (long)(start), (long)(size), (long)(prot), (long)(pgoff), (long)(flags))
629 #define __sanitizer_syscall_post_remap_file_pages(res, start, size, prot,      \
630                                                   pgoff, flags)                \
631   __sanitizer_syscall_post_impl_remap_file_pages(res, (long)(start),           \
632                                                  (long)(size), (long)(prot),   \
633                                                  (long)(pgoff), (long)(flags))
634 #define __sanitizer_syscall_pre_msync(start, len, flags)                       \
635   __sanitizer_syscall_pre_impl_msync((long)(start), (long)(len), (long)(flags))
636 #define __sanitizer_syscall_post_msync(res, start, len, flags)                 \
637   __sanitizer_syscall_post_impl_msync(res, (long)(start), (long)(len),         \
638                                       (long)(flags))
639 #define __sanitizer_syscall_pre_munmap(addr, len)                              \
640   __sanitizer_syscall_pre_impl_munmap((long)(addr), (long)(len))
641 #define __sanitizer_syscall_post_munmap(res, addr, len)                        \
642   __sanitizer_syscall_post_impl_munmap(res, (long)(addr), (long)(len))
643 #define __sanitizer_syscall_pre_mlock(start, len)                              \
644   __sanitizer_syscall_pre_impl_mlock((long)(start), (long)(len))
645 #define __sanitizer_syscall_post_mlock(res, start, len)                        \
646   __sanitizer_syscall_post_impl_mlock(res, (long)(start), (long)(len))
647 #define __sanitizer_syscall_pre_munlock(start, len)                            \
648   __sanitizer_syscall_pre_impl_munlock((long)(start), (long)(len))
649 #define __sanitizer_syscall_post_munlock(res, start, len)                      \
650   __sanitizer_syscall_post_impl_munlock(res, (long)(start), (long)(len))
651 #define __sanitizer_syscall_pre_mlockall(flags)                                \
652   __sanitizer_syscall_pre_impl_mlockall((long)(flags))
653 #define __sanitizer_syscall_post_mlockall(res, flags)                          \
654   __sanitizer_syscall_post_impl_mlockall(res, (long)(flags))
655 #define __sanitizer_syscall_pre_munlockall()                                   \
656   __sanitizer_syscall_pre_impl_munlockall()
657 #define __sanitizer_syscall_post_munlockall(res)                               \
658   __sanitizer_syscall_post_impl_munlockall(res)
659 #define __sanitizer_syscall_pre_madvise(start, len, behavior)                  \
660   __sanitizer_syscall_pre_impl_madvise((long)(start), (long)(len),             \
661                                        (long)(behavior))
662 #define __sanitizer_syscall_post_madvise(res, start, len, behavior)            \
663   __sanitizer_syscall_post_impl_madvise(res, (long)(start), (long)(len),       \
664                                         (long)(behavior))
665 #define __sanitizer_syscall_pre_mincore(start, len, vec)                       \
666   __sanitizer_syscall_pre_impl_mincore((long)(start), (long)(len), (long)(vec))
667 #define __sanitizer_syscall_post_mincore(res, start, len, vec)                 \
668   __sanitizer_syscall_post_impl_mincore(res, (long)(start), (long)(len),       \
669                                         (long)(vec))
670 #define __sanitizer_syscall_pre_pivot_root(new_root, put_old)                  \
671   __sanitizer_syscall_pre_impl_pivot_root((long)(new_root), (long)(put_old))
672 #define __sanitizer_syscall_post_pivot_root(res, new_root, put_old)            \
673   __sanitizer_syscall_post_impl_pivot_root(res, (long)(new_root),              \
674                                            (long)(put_old))
675 #define __sanitizer_syscall_pre_chroot(filename)                               \
676   __sanitizer_syscall_pre_impl_chroot((long)(filename))
677 #define __sanitizer_syscall_post_chroot(res, filename)                         \
678   __sanitizer_syscall_post_impl_chroot(res, (long)(filename))
679 #define __sanitizer_syscall_pre_mknod(filename, mode, dev)                     \
680   __sanitizer_syscall_pre_impl_mknod((long)(filename), (long)(mode),           \
681                                      (long)(dev))
682 #define __sanitizer_syscall_post_mknod(res, filename, mode, dev)               \
683   __sanitizer_syscall_post_impl_mknod(res, (long)(filename), (long)(mode),     \
684                                       (long)(dev))
685 #define __sanitizer_syscall_pre_link(oldname, newname)                         \
686   __sanitizer_syscall_pre_impl_link((long)(oldname), (long)(newname))
687 #define __sanitizer_syscall_post_link(res, oldname, newname)                   \
688   __sanitizer_syscall_post_impl_link(res, (long)(oldname), (long)(newname))
689 #define __sanitizer_syscall_pre_symlink(old, new_)                             \
690   __sanitizer_syscall_pre_impl_symlink((long)(old), (long)(new_))
691 #define __sanitizer_syscall_post_symlink(res, old, new_)                       \
692   __sanitizer_syscall_post_impl_symlink(res, (long)(old), (long)(new_))
693 #define __sanitizer_syscall_pre_unlink(pathname)                               \
694   __sanitizer_syscall_pre_impl_unlink((long)(pathname))
695 #define __sanitizer_syscall_post_unlink(res, pathname)                         \
696   __sanitizer_syscall_post_impl_unlink(res, (long)(pathname))
697 #define __sanitizer_syscall_pre_rename(oldname, newname)                       \
698   __sanitizer_syscall_pre_impl_rename((long)(oldname), (long)(newname))
699 #define __sanitizer_syscall_post_rename(res, oldname, newname)                 \
700   __sanitizer_syscall_post_impl_rename(res, (long)(oldname), (long)(newname))
701 #define __sanitizer_syscall_pre_chmod(filename, mode)                          \
702   __sanitizer_syscall_pre_impl_chmod((long)(filename), (long)(mode))
703 #define __sanitizer_syscall_post_chmod(res, filename, mode)                    \
704   __sanitizer_syscall_post_impl_chmod(res, (long)(filename), (long)(mode))
705 #define __sanitizer_syscall_pre_fchmod(fd, mode)                               \
706   __sanitizer_syscall_pre_impl_fchmod((long)(fd), (long)(mode))
707 #define __sanitizer_syscall_post_fchmod(res, fd, mode)                         \
708   __sanitizer_syscall_post_impl_fchmod(res, (long)(fd), (long)(mode))
709 #define __sanitizer_syscall_pre_fcntl(fd, cmd, arg)                            \
710   __sanitizer_syscall_pre_impl_fcntl((long)(fd), (long)(cmd), (long)(arg))
711 #define __sanitizer_syscall_post_fcntl(res, fd, cmd, arg)                      \
712   __sanitizer_syscall_post_impl_fcntl(res, (long)(fd), (long)(cmd), (long)(arg))
713 #define __sanitizer_syscall_pre_fcntl64(fd, cmd, arg)                          \
714   __sanitizer_syscall_pre_impl_fcntl64((long)(fd), (long)(cmd), (long)(arg))
715 #define __sanitizer_syscall_post_fcntl64(res, fd, cmd, arg)                    \
716   __sanitizer_syscall_post_impl_fcntl64(res, (long)(fd), (long)(cmd),          \
717                                         (long)(arg))
718 #define __sanitizer_syscall_pre_pipe(fildes)                                   \
719   __sanitizer_syscall_pre_impl_pipe((long)(fildes))
720 #define __sanitizer_syscall_post_pipe(res, fildes)                             \
721   __sanitizer_syscall_post_impl_pipe(res, (long)(fildes))
722 #define __sanitizer_syscall_pre_pipe2(fildes, flags)                           \
723   __sanitizer_syscall_pre_impl_pipe2((long)(fildes), (long)(flags))
724 #define __sanitizer_syscall_post_pipe2(res, fildes, flags)                     \
725   __sanitizer_syscall_post_impl_pipe2(res, (long)(fildes), (long)(flags))
726 #define __sanitizer_syscall_pre_dup(fildes)                                    \
727   __sanitizer_syscall_pre_impl_dup((long)(fildes))
728 #define __sanitizer_syscall_post_dup(res, fildes)                              \
729   __sanitizer_syscall_post_impl_dup(res, (long)(fildes))
730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd)                             \
731   __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd))
732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd)                       \
733   __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd))
734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags)                      \
735   __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags))
736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags)                \
737   __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd),        \
738                                      (long)(flags))
739 #define __sanitizer_syscall_pre_ioperm(from, num, on)                          \
740   __sanitizer_syscall_pre_impl_ioperm((long)(from), (long)(num), (long)(on))
741 #define __sanitizer_syscall_post_ioperm(res, from, num, on)                    \
742   __sanitizer_syscall_post_impl_ioperm(res, (long)(from), (long)(num),         \
743                                        (long)(on))
744 #define __sanitizer_syscall_pre_ioctl(fd, cmd, arg)                            \
745   __sanitizer_syscall_pre_impl_ioctl((long)(fd), (long)(cmd), (long)(arg))
746 #define __sanitizer_syscall_post_ioctl(res, fd, cmd, arg)                      \
747   __sanitizer_syscall_post_impl_ioctl(res, (long)(fd), (long)(cmd), (long)(arg))
748 #define __sanitizer_syscall_pre_flock(fd, cmd)                                 \
749   __sanitizer_syscall_pre_impl_flock((long)(fd), (long)(cmd))
750 #define __sanitizer_syscall_post_flock(res, fd, cmd)                           \
751   __sanitizer_syscall_post_impl_flock(res, (long)(fd), (long)(cmd))
752 #define __sanitizer_syscall_pre_io_setup(nr_reqs, ctx)                         \
753   __sanitizer_syscall_pre_impl_io_setup((long)(nr_reqs), (long)(ctx))
754 #define __sanitizer_syscall_post_io_setup(res, nr_reqs, ctx)                   \
755   __sanitizer_syscall_post_impl_io_setup(res, (long)(nr_reqs), (long)(ctx))
756 #define __sanitizer_syscall_pre_io_destroy(ctx)                                \
757   __sanitizer_syscall_pre_impl_io_destroy((long)(ctx))
758 #define __sanitizer_syscall_post_io_destroy(res, ctx)                          \
759   __sanitizer_syscall_post_impl_io_destroy(res, (long)(ctx))
760 #define __sanitizer_syscall_pre_io_getevents(ctx_id, min_nr, nr, events,       \
761                                              timeout)                          \
762   __sanitizer_syscall_pre_impl_io_getevents((long)(ctx_id), (long)(min_nr),    \
763                                             (long)(nr), (long)(events),        \
764                                             (long)(timeout))
765 #define __sanitizer_syscall_post_io_getevents(res, ctx_id, min_nr, nr, events, \
766                                               timeout)                         \
767   __sanitizer_syscall_post_impl_io_getevents(res, (long)(ctx_id),              \
768                                              (long)(min_nr), (long)(nr),       \
769                                              (long)(events), (long)(timeout))
770 #define __sanitizer_syscall_pre_io_submit(ctx_id, arg1, arg2)                  \
771   __sanitizer_syscall_pre_impl_io_submit((long)(ctx_id), (long)(arg1),         \
772                                          (long)(arg2))
773 #define __sanitizer_syscall_post_io_submit(res, ctx_id, arg1, arg2)            \
774   __sanitizer_syscall_post_impl_io_submit(res, (long)(ctx_id), (long)(arg1),   \
775                                           (long)(arg2))
776 #define __sanitizer_syscall_pre_io_cancel(ctx_id, iocb, result)                \
777   __sanitizer_syscall_pre_impl_io_cancel((long)(ctx_id), (long)(iocb),         \
778                                          (long)(result))
779 #define __sanitizer_syscall_post_io_cancel(res, ctx_id, iocb, result)          \
780   __sanitizer_syscall_post_impl_io_cancel(res, (long)(ctx_id), (long)(iocb),   \
781                                           (long)(result))
782 #define __sanitizer_syscall_pre_sendfile(out_fd, in_fd, offset, count)         \
783   __sanitizer_syscall_pre_impl_sendfile((long)(out_fd), (long)(in_fd),         \
784                                         (long)(offset), (long)(count))
785 #define __sanitizer_syscall_post_sendfile(res, out_fd, in_fd, offset, count)   \
786   __sanitizer_syscall_post_impl_sendfile(res, (long)(out_fd), (long)(in_fd),   \
787                                          (long)(offset), (long)(count))
788 #define __sanitizer_syscall_pre_sendfile64(out_fd, in_fd, offset, count)       \
789   __sanitizer_syscall_pre_impl_sendfile64((long)(out_fd), (long)(in_fd),       \
790                                           (long)(offset), (long)(count))
791 #define __sanitizer_syscall_post_sendfile64(res, out_fd, in_fd, offset, count) \
792   __sanitizer_syscall_post_impl_sendfile64(res, (long)(out_fd), (long)(in_fd), \
793                                            (long)(offset), (long)(count))
794 #define __sanitizer_syscall_pre_readlink(path, buf, bufsiz)                    \
795   __sanitizer_syscall_pre_impl_readlink((long)(path), (long)(buf),             \
796                                         (long)(bufsiz))
797 #define __sanitizer_syscall_post_readlink(res, path, buf, bufsiz)              \
798   __sanitizer_syscall_post_impl_readlink(res, (long)(path), (long)(buf),       \
799                                          (long)(bufsiz))
800 #define __sanitizer_syscall_pre_creat(pathname, mode)                          \
801   __sanitizer_syscall_pre_impl_creat((long)(pathname), (long)(mode))
802 #define __sanitizer_syscall_post_creat(res, pathname, mode)                    \
803   __sanitizer_syscall_post_impl_creat(res, (long)(pathname), (long)(mode))
804 #define __sanitizer_syscall_pre_open(filename, flags, mode)                    \
805   __sanitizer_syscall_pre_impl_open((long)(filename), (long)(flags),           \
806                                     (long)(mode))
807 #define __sanitizer_syscall_post_open(res, filename, flags, mode)              \
808   __sanitizer_syscall_post_impl_open(res, (long)(filename), (long)(flags),     \
809                                      (long)(mode))
810 #define __sanitizer_syscall_pre_close(fd)                                      \
811   __sanitizer_syscall_pre_impl_close((long)(fd))
812 #define __sanitizer_syscall_post_close(res, fd)                                \
813   __sanitizer_syscall_post_impl_close(res, (long)(fd))
814 #define __sanitizer_syscall_pre_access(filename, mode)                         \
815   __sanitizer_syscall_pre_impl_access((long)(filename), (long)(mode))
816 #define __sanitizer_syscall_post_access(res, filename, mode)                   \
817   __sanitizer_syscall_post_impl_access(res, (long)(filename), (long)(mode))
818 #define __sanitizer_syscall_pre_vhangup() __sanitizer_syscall_pre_impl_vhangup()
819 #define __sanitizer_syscall_post_vhangup(res)                                  \
820   __sanitizer_syscall_post_impl_vhangup(res)
821 #define __sanitizer_syscall_pre_chown(filename, user, group)                   \
822   __sanitizer_syscall_pre_impl_chown((long)(filename), (long)(user),           \
823                                      (long)(group))
824 #define __sanitizer_syscall_post_chown(res, filename, user, group)             \
825   __sanitizer_syscall_post_impl_chown(res, (long)(filename), (long)(user),     \
826                                       (long)(group))
827 #define __sanitizer_syscall_pre_lchown(filename, user, group)                  \
828   __sanitizer_syscall_pre_impl_lchown((long)(filename), (long)(user),          \
829                                       (long)(group))
830 #define __sanitizer_syscall_post_lchown(res, filename, user, group)            \
831   __sanitizer_syscall_post_impl_lchown(res, (long)(filename), (long)(user),    \
832                                        (long)(group))
833 #define __sanitizer_syscall_pre_fchown(fd, user, group)                        \
834   __sanitizer_syscall_pre_impl_fchown((long)(fd), (long)(user), (long)(group))
835 #define __sanitizer_syscall_post_fchown(res, fd, user, group)                  \
836   __sanitizer_syscall_post_impl_fchown(res, (long)(fd), (long)(user),          \
837                                        (long)(group))
838 #define __sanitizer_syscall_pre_chown16(filename, user, group)                 \
839   __sanitizer_syscall_pre_impl_chown16((long)(filename), (long)user,           \
840                                        (long)group)
841 #define __sanitizer_syscall_post_chown16(res, filename, user, group)           \
842   __sanitizer_syscall_post_impl_chown16(res, (long)(filename), (long)user,     \
843                                         (long)group)
844 #define __sanitizer_syscall_pre_lchown16(filename, user, group)                \
845   __sanitizer_syscall_pre_impl_lchown16((long)(filename), (long)user,          \
846                                         (long)group)
847 #define __sanitizer_syscall_post_lchown16(res, filename, user, group)          \
848   __sanitizer_syscall_post_impl_lchown16(res, (long)(filename), (long)user,    \
849                                          (long)group)
850 #define __sanitizer_syscall_pre_fchown16(fd, user, group)                      \
851   __sanitizer_syscall_pre_impl_fchown16((long)(fd), (long)user, (long)group)
852 #define __sanitizer_syscall_post_fchown16(res, fd, user, group)                \
853   __sanitizer_syscall_post_impl_fchown16(res, (long)(fd), (long)user,          \
854                                          (long)group)
855 #define __sanitizer_syscall_pre_setregid16(rgid, egid)                         \
856   __sanitizer_syscall_pre_impl_setregid16((long)rgid, (long)egid)
857 #define __sanitizer_syscall_post_setregid16(res, rgid, egid)                   \
858   __sanitizer_syscall_post_impl_setregid16(res, (long)rgid, (long)egid)
859 #define __sanitizer_syscall_pre_setgid16(gid)                                  \
860   __sanitizer_syscall_pre_impl_setgid16((long)gid)
861 #define __sanitizer_syscall_post_setgid16(res, gid)                            \
862   __sanitizer_syscall_post_impl_setgid16(res, (long)gid)
863 #define __sanitizer_syscall_pre_setreuid16(ruid, euid)                         \
864   __sanitizer_syscall_pre_impl_setreuid16((long)ruid, (long)euid)
865 #define __sanitizer_syscall_post_setreuid16(res, ruid, euid)                   \
866   __sanitizer_syscall_post_impl_setreuid16(res, (long)ruid, (long)euid)
867 #define __sanitizer_syscall_pre_setuid16(uid)                                  \
868   __sanitizer_syscall_pre_impl_setuid16((long)uid)
869 #define __sanitizer_syscall_post_setuid16(res, uid)                            \
870   __sanitizer_syscall_post_impl_setuid16(res, (long)uid)
871 #define __sanitizer_syscall_pre_setresuid16(ruid, euid, suid)                  \
872   __sanitizer_syscall_pre_impl_setresuid16((long)ruid, (long)euid, (long)suid)
873 #define __sanitizer_syscall_post_setresuid16(res, ruid, euid, suid)            \
874   __sanitizer_syscall_post_impl_setresuid16(res, (long)ruid, (long)euid,       \
875                                             (long)suid)
876 #define __sanitizer_syscall_pre_getresuid16(ruid, euid, suid)                  \
877   __sanitizer_syscall_pre_impl_getresuid16((long)(ruid), (long)(euid),         \
878                                            (long)(suid))
879 #define __sanitizer_syscall_post_getresuid16(res, ruid, euid, suid)            \
880   __sanitizer_syscall_post_impl_getresuid16(res, (long)(ruid), (long)(euid),   \
881                                             (long)(suid))
882 #define __sanitizer_syscall_pre_setresgid16(rgid, egid, sgid)                  \
883   __sanitizer_syscall_pre_impl_setresgid16((long)rgid, (long)egid, (long)sgid)
884 #define __sanitizer_syscall_post_setresgid16(res, rgid, egid, sgid)            \
885   __sanitizer_syscall_post_impl_setresgid16(res, (long)rgid, (long)egid,       \
886                                             (long)sgid)
887 #define __sanitizer_syscall_pre_getresgid16(rgid, egid, sgid)                  \
888   __sanitizer_syscall_pre_impl_getresgid16((long)(rgid), (long)(egid),         \
889                                            (long)(sgid))
890 #define __sanitizer_syscall_post_getresgid16(res, rgid, egid, sgid)            \
891   __sanitizer_syscall_post_impl_getresgid16(res, (long)(rgid), (long)(egid),   \
892                                             (long)(sgid))
893 #define __sanitizer_syscall_pre_setfsuid16(uid)                                \
894   __sanitizer_syscall_pre_impl_setfsuid16((long)uid)
895 #define __sanitizer_syscall_post_setfsuid16(res, uid)                          \
896   __sanitizer_syscall_post_impl_setfsuid16(res, (long)uid)
897 #define __sanitizer_syscall_pre_setfsgid16(gid)                                \
898   __sanitizer_syscall_pre_impl_setfsgid16((long)gid)
899 #define __sanitizer_syscall_post_setfsgid16(res, gid)                          \
900   __sanitizer_syscall_post_impl_setfsgid16(res, (long)gid)
901 #define __sanitizer_syscall_pre_getgroups16(gidsetsize, grouplist)             \
902   __sanitizer_syscall_pre_impl_getgroups16((long)(gidsetsize),                 \
903                                            (long)(grouplist))
904 #define __sanitizer_syscall_post_getgroups16(res, gidsetsize, grouplist)       \
905   __sanitizer_syscall_post_impl_getgroups16(res, (long)(gidsetsize),           \
906                                             (long)(grouplist))
907 #define __sanitizer_syscall_pre_setgroups16(gidsetsize, grouplist)             \
908   __sanitizer_syscall_pre_impl_setgroups16((long)(gidsetsize),                 \
909                                            (long)(grouplist))
910 #define __sanitizer_syscall_post_setgroups16(res, gidsetsize, grouplist)       \
911   __sanitizer_syscall_post_impl_setgroups16(res, (long)(gidsetsize),           \
912                                             (long)(grouplist))
913 #define __sanitizer_syscall_pre_getuid16()                                     \
914   __sanitizer_syscall_pre_impl_getuid16()
915 #define __sanitizer_syscall_post_getuid16(res)                                 \
916   __sanitizer_syscall_post_impl_getuid16(res)
917 #define __sanitizer_syscall_pre_geteuid16()                                    \
918   __sanitizer_syscall_pre_impl_geteuid16()
919 #define __sanitizer_syscall_post_geteuid16(res)                                \
920   __sanitizer_syscall_post_impl_geteuid16(res)
921 #define __sanitizer_syscall_pre_getgid16()                                     \
922   __sanitizer_syscall_pre_impl_getgid16()
923 #define __sanitizer_syscall_post_getgid16(res)                                 \
924   __sanitizer_syscall_post_impl_getgid16(res)
925 #define __sanitizer_syscall_pre_getegid16()                                    \
926   __sanitizer_syscall_pre_impl_getegid16()
927 #define __sanitizer_syscall_post_getegid16(res)                                \
928   __sanitizer_syscall_post_impl_getegid16(res)
929 #define __sanitizer_syscall_pre_utime(filename, times)                         \
930   __sanitizer_syscall_pre_impl_utime((long)(filename), (long)(times))
931 #define __sanitizer_syscall_post_utime(res, filename, times)                   \
932   __sanitizer_syscall_post_impl_utime(res, (long)(filename), (long)(times))
933 #define __sanitizer_syscall_pre_utimes(filename, utimes)                       \
934   __sanitizer_syscall_pre_impl_utimes((long)(filename), (long)(utimes))
935 #define __sanitizer_syscall_post_utimes(res, filename, utimes)                 \
936   __sanitizer_syscall_post_impl_utimes(res, (long)(filename), (long)(utimes))
937 #define __sanitizer_syscall_pre_lseek(fd, offset, origin)                      \
938   __sanitizer_syscall_pre_impl_lseek((long)(fd), (long)(offset), (long)(origin))
939 #define __sanitizer_syscall_post_lseek(res, fd, offset, origin)                \
940   __sanitizer_syscall_post_impl_lseek(res, (long)(fd), (long)(offset),         \
941                                       (long)(origin))
942 #define __sanitizer_syscall_pre_llseek(fd, offset_high, offset_low, result,    \
943                                        origin)                                 \
944   __sanitizer_syscall_pre_impl_llseek((long)(fd), (long)(offset_high),         \
945                                       (long)(offset_low), (long)(result),      \
946                                       (long)(origin))
947 #define __sanitizer_syscall_post_llseek(res, fd, offset_high, offset_low,      \
948                                         result, origin)                        \
949   __sanitizer_syscall_post_impl_llseek(res, (long)(fd), (long)(offset_high),   \
950                                        (long)(offset_low), (long)(result),     \
951                                        (long)(origin))
952 #define __sanitizer_syscall_pre_read(fd, buf, count)                           \
953   __sanitizer_syscall_pre_impl_read((long)(fd), (long)(buf), (long)(count))
954 #define __sanitizer_syscall_post_read(res, fd, buf, count)                     \
955   __sanitizer_syscall_post_impl_read(res, (long)(fd), (long)(buf),             \
956                                      (long)(count))
957 #define __sanitizer_syscall_pre_readv(fd, vec, vlen)                           \
958   __sanitizer_syscall_pre_impl_readv((long)(fd), (long)(vec), (long)(vlen))
959 #define __sanitizer_syscall_post_readv(res, fd, vec, vlen)                     \
960   __sanitizer_syscall_post_impl_readv(res, (long)(fd), (long)(vec),            \
961                                       (long)(vlen))
962 #define __sanitizer_syscall_pre_write(fd, buf, count)                          \
963   __sanitizer_syscall_pre_impl_write((long)(fd), (long)(buf), (long)(count))
964 #define __sanitizer_syscall_post_write(res, fd, buf, count)                    \
965   __sanitizer_syscall_post_impl_write(res, (long)(fd), (long)(buf),            \
966                                       (long)(count))
967 #define __sanitizer_syscall_pre_writev(fd, vec, vlen)                          \
968   __sanitizer_syscall_pre_impl_writev((long)(fd), (long)(vec), (long)(vlen))
969 #define __sanitizer_syscall_post_writev(res, fd, vec, vlen)                    \
970   __sanitizer_syscall_post_impl_writev(res, (long)(fd), (long)(vec),           \
971                                        (long)(vlen))
972 
973 #ifdef _LP64
974 #define __sanitizer_syscall_pre_pread64(fd, buf, count, pos)                   \
975   __sanitizer_syscall_pre_impl_pread64((long)(fd), (long)(buf), (long)(count), \
976                                        (long)(pos))
977 #define __sanitizer_syscall_post_pread64(res, fd, buf, count, pos)             \
978   __sanitizer_syscall_post_impl_pread64(res, (long)(fd), (long)(buf),          \
979                                         (long)(count), (long)(pos))
980 #define __sanitizer_syscall_pre_pwrite64(fd, buf, count, pos)                  \
981   __sanitizer_syscall_pre_impl_pwrite64((long)(fd), (long)(buf),               \
982                                         (long)(count), (long)(pos))
983 #define __sanitizer_syscall_post_pwrite64(res, fd, buf, count, pos)            \
984   __sanitizer_syscall_post_impl_pwrite64(res, (long)(fd), (long)(buf),         \
985                                          (long)(count), (long)(pos))
986 #else
987 #define __sanitizer_syscall_pre_pread64(fd, buf, count, pos0, pos1)            \
988   __sanitizer_syscall_pre_impl_pread64((long)(fd), (long)(buf), (long)(count), \
989                                        (long)(pos0), (long)(pos1))
990 #define __sanitizer_syscall_post_pread64(res, fd, buf, count, pos0, pos1)      \
991   __sanitizer_syscall_post_impl_pread64(                                       \
992       res, (long)(fd), (long)(buf), (long)(count), (long)(pos0), (long)(pos1))
993 #define __sanitizer_syscall_pre_pwrite64(fd, buf, count, pos0, pos1)           \
994   __sanitizer_syscall_pre_impl_pwrite64(                                       \
995       (long)(fd), (long)(buf), (long)(count), (long)(pos0), (long)(pos1))
996 #define __sanitizer_syscall_post_pwrite64(res, fd, buf, count, pos0, pos1)     \
997   __sanitizer_syscall_post_impl_pwrite64(                                      \
998       res, (long)(fd), (long)(buf), (long)(count), (long)(pos0), (long)(pos1))
999 #endif
1000 
1001 #define __sanitizer_syscall_pre_preadv(fd, vec, vlen, pos_l, pos_h)            \
1002   __sanitizer_syscall_pre_impl_preadv((long)(fd), (long)(vec), (long)(vlen),   \
1003                                       (long)(pos_l), (long)(pos_h))
1004 #define __sanitizer_syscall_post_preadv(res, fd, vec, vlen, pos_l, pos_h)      \
1005   __sanitizer_syscall_post_impl_preadv(res, (long)(fd), (long)(vec),           \
1006                                        (long)(vlen), (long)(pos_l),            \
1007                                        (long)(pos_h))
1008 #define __sanitizer_syscall_pre_pwritev(fd, vec, vlen, pos_l, pos_h)           \
1009   __sanitizer_syscall_pre_impl_pwritev((long)(fd), (long)(vec), (long)(vlen),  \
1010                                        (long)(pos_l), (long)(pos_h))
1011 #define __sanitizer_syscall_post_pwritev(res, fd, vec, vlen, pos_l, pos_h)     \
1012   __sanitizer_syscall_post_impl_pwritev(res, (long)(fd), (long)(vec),          \
1013                                         (long)(vlen), (long)(pos_l),           \
1014                                         (long)(pos_h))
1015 #define __sanitizer_syscall_pre_getcwd(buf, size)                              \
1016   __sanitizer_syscall_pre_impl_getcwd((long)(buf), (long)(size))
1017 #define __sanitizer_syscall_post_getcwd(res, buf, size)                        \
1018   __sanitizer_syscall_post_impl_getcwd(res, (long)(buf), (long)(size))
1019 #define __sanitizer_syscall_pre_mkdir(pathname, mode)                          \
1020   __sanitizer_syscall_pre_impl_mkdir((long)(pathname), (long)(mode))
1021 #define __sanitizer_syscall_post_mkdir(res, pathname, mode)                    \
1022   __sanitizer_syscall_post_impl_mkdir(res, (long)(pathname), (long)(mode))
1023 #define __sanitizer_syscall_pre_chdir(filename)                                \
1024   __sanitizer_syscall_pre_impl_chdir((long)(filename))
1025 #define __sanitizer_syscall_post_chdir(res, filename)                          \
1026   __sanitizer_syscall_post_impl_chdir(res, (long)(filename))
1027 #define __sanitizer_syscall_pre_fchdir(fd)                                     \
1028   __sanitizer_syscall_pre_impl_fchdir((long)(fd))
1029 #define __sanitizer_syscall_post_fchdir(res, fd)                               \
1030   __sanitizer_syscall_post_impl_fchdir(res, (long)(fd))
1031 #define __sanitizer_syscall_pre_rmdir(pathname)                                \
1032   __sanitizer_syscall_pre_impl_rmdir((long)(pathname))
1033 #define __sanitizer_syscall_post_rmdir(res, pathname)                          \
1034   __sanitizer_syscall_post_impl_rmdir(res, (long)(pathname))
1035 #define __sanitizer_syscall_pre_lookup_dcookie(cookie64, buf, len)             \
1036   __sanitizer_syscall_pre_impl_lookup_dcookie((long)(cookie64), (long)(buf),   \
1037                                               (long)(len))
1038 #define __sanitizer_syscall_post_lookup_dcookie(res, cookie64, buf, len)       \
1039   __sanitizer_syscall_post_impl_lookup_dcookie(res, (long)(cookie64),          \
1040                                                (long)(buf), (long)(len))
1041 #define __sanitizer_syscall_pre_quotactl(cmd, special, id, addr)               \
1042   __sanitizer_syscall_pre_impl_quotactl((long)(cmd), (long)(special),          \
1043                                         (long)(id), (long)(addr))
1044 #define __sanitizer_syscall_post_quotactl(res, cmd, special, id, addr)         \
1045   __sanitizer_syscall_post_impl_quotactl(res, (long)(cmd), (long)(special),    \
1046                                          (long)(id), (long)(addr))
1047 #define __sanitizer_syscall_pre_getdents(fd, dirent, count)                    \
1048   __sanitizer_syscall_pre_impl_getdents((long)(fd), (long)(dirent),            \
1049                                         (long)(count))
1050 #define __sanitizer_syscall_post_getdents(res, fd, dirent, count)              \
1051   __sanitizer_syscall_post_impl_getdents(res, (long)(fd), (long)(dirent),      \
1052                                          (long)(count))
1053 #define __sanitizer_syscall_pre_getdents64(fd, dirent, count)                  \
1054   __sanitizer_syscall_pre_impl_getdents64((long)(fd), (long)(dirent),          \
1055                                           (long)(count))
1056 #define __sanitizer_syscall_post_getdents64(res, fd, dirent, count)            \
1057   __sanitizer_syscall_post_impl_getdents64(res, (long)(fd), (long)(dirent),    \
1058                                            (long)(count))
1059 #define __sanitizer_syscall_pre_setsockopt(fd, level, optname, optval, optlen) \
1060   __sanitizer_syscall_pre_impl_setsockopt((long)(fd), (long)(level),           \
1061                                           (long)(optname), (long)(optval),     \
1062                                           (long)(optlen))
1063 #define __sanitizer_syscall_post_setsockopt(res, fd, level, optname, optval,   \
1064                                             optlen)                            \
1065   __sanitizer_syscall_post_impl_setsockopt(res, (long)(fd), (long)(level),     \
1066                                            (long)(optname), (long)(optval),    \
1067                                            (long)(optlen))
1068 #define __sanitizer_syscall_pre_getsockopt(fd, level, optname, optval, optlen) \
1069   __sanitizer_syscall_pre_impl_getsockopt((long)(fd), (long)(level),           \
1070                                           (long)(optname), (long)(optval),     \
1071                                           (long)(optlen))
1072 #define __sanitizer_syscall_post_getsockopt(res, fd, level, optname, optval,   \
1073                                             optlen)                            \
1074   __sanitizer_syscall_post_impl_getsockopt(res, (long)(fd), (long)(level),     \
1075                                            (long)(optname), (long)(optval),    \
1076                                            (long)(optlen))
1077 #define __sanitizer_syscall_pre_bind(arg0, arg1, arg2)                         \
1078   __sanitizer_syscall_pre_impl_bind((long)(arg0), (long)(arg1), (long)(arg2))
1079 #define __sanitizer_syscall_post_bind(res, arg0, arg1, arg2)                   \
1080   __sanitizer_syscall_post_impl_bind(res, (long)(arg0), (long)(arg1),          \
1081                                      (long)(arg2))
1082 #define __sanitizer_syscall_pre_connect(arg0, arg1, arg2)                      \
1083   __sanitizer_syscall_pre_impl_connect((long)(arg0), (long)(arg1), (long)(arg2))
1084 #define __sanitizer_syscall_post_connect(res, arg0, arg1, arg2)                \
1085   __sanitizer_syscall_post_impl_connect(res, (long)(arg0), (long)(arg1),       \
1086                                         (long)(arg2))
1087 #define __sanitizer_syscall_pre_accept(arg0, arg1, arg2)                       \
1088   __sanitizer_syscall_pre_impl_accept((long)(arg0), (long)(arg1), (long)(arg2))
1089 #define __sanitizer_syscall_post_accept(res, arg0, arg1, arg2)                 \
1090   __sanitizer_syscall_post_impl_accept(res, (long)(arg0), (long)(arg1),        \
1091                                        (long)(arg2))
1092 #define __sanitizer_syscall_pre_accept4(arg0, arg1, arg2, arg3)                \
1093   __sanitizer_syscall_pre_impl_accept4((long)(arg0), (long)(arg1),             \
1094                                        (long)(arg2), (long)(arg3))
1095 #define __sanitizer_syscall_post_accept4(res, arg0, arg1, arg2, arg3)          \
1096   __sanitizer_syscall_post_impl_accept4(res, (long)(arg0), (long)(arg1),       \
1097                                         (long)(arg2), (long)(arg3))
1098 #define __sanitizer_syscall_pre_getsockname(arg0, arg1, arg2)                  \
1099   __sanitizer_syscall_pre_impl_getsockname((long)(arg0), (long)(arg1),         \
1100                                            (long)(arg2))
1101 #define __sanitizer_syscall_post_getsockname(res, arg0, arg1, arg2)            \
1102   __sanitizer_syscall_post_impl_getsockname(res, (long)(arg0), (long)(arg1),   \
1103                                             (long)(arg2))
1104 #define __sanitizer_syscall_pre_getpeername(arg0, arg1, arg2)                  \
1105   __sanitizer_syscall_pre_impl_getpeername((long)(arg0), (long)(arg1),         \
1106                                            (long)(arg2))
1107 #define __sanitizer_syscall_post_getpeername(res, arg0, arg1, arg2)            \
1108   __sanitizer_syscall_post_impl_getpeername(res, (long)(arg0), (long)(arg1),   \
1109                                             (long)(arg2))
1110 #define __sanitizer_syscall_pre_send(arg0, arg1, arg2, arg3)                   \
1111   __sanitizer_syscall_pre_impl_send((long)(arg0), (long)(arg1), (long)(arg2),  \
1112                                     (long)(arg3))
1113 #define __sanitizer_syscall_post_send(res, arg0, arg1, arg2, arg3)             \
1114   __sanitizer_syscall_post_impl_send(res, (long)(arg0), (long)(arg1),          \
1115                                      (long)(arg2), (long)(arg3))
1116 #define __sanitizer_syscall_pre_sendto(arg0, arg1, arg2, arg3, arg4, arg5)     \
1117   __sanitizer_syscall_pre_impl_sendto((long)(arg0), (long)(arg1),              \
1118                                       (long)(arg2), (long)(arg3),              \
1119                                       (long)(arg4), (long)(arg5))
1120 #define __sanitizer_syscall_post_sendto(res, arg0, arg1, arg2, arg3, arg4,     \
1121                                         arg5)                                  \
1122   __sanitizer_syscall_post_impl_sendto(res, (long)(arg0), (long)(arg1),        \
1123                                        (long)(arg2), (long)(arg3),             \
1124                                        (long)(arg4), (long)(arg5))
1125 #define __sanitizer_syscall_pre_sendmsg(fd, msg, flags)                        \
1126   __sanitizer_syscall_pre_impl_sendmsg((long)(fd), (long)(msg), (long)(flags))
1127 #define __sanitizer_syscall_post_sendmsg(res, fd, msg, flags)                  \
1128   __sanitizer_syscall_post_impl_sendmsg(res, (long)(fd), (long)(msg),          \
1129                                         (long)(flags))
1130 #define __sanitizer_syscall_pre_sendmmsg(fd, msg, vlen, flags)                 \
1131   __sanitizer_syscall_pre_impl_sendmmsg((long)(fd), (long)(msg), (long)(vlen), \
1132                                         (long)(flags))
1133 #define __sanitizer_syscall_post_sendmmsg(res, fd, msg, vlen, flags)           \
1134   __sanitizer_syscall_post_impl_sendmmsg(res, (long)(fd), (long)(msg),         \
1135                                          (long)(vlen), (long)(flags))
1136 #define __sanitizer_syscall_pre_recv(arg0, arg1, arg2, arg3)                   \
1137   __sanitizer_syscall_pre_impl_recv((long)(arg0), (long)(arg1), (long)(arg2),  \
1138                                     (long)(arg3))
1139 #define __sanitizer_syscall_post_recv(res, arg0, arg1, arg2, arg3)             \
1140   __sanitizer_syscall_post_impl_recv(res, (long)(arg0), (long)(arg1),          \
1141                                      (long)(arg2), (long)(arg3))
1142 #define __sanitizer_syscall_pre_recvfrom(arg0, arg1, arg2, arg3, arg4, arg5)   \
1143   __sanitizer_syscall_pre_impl_recvfrom((long)(arg0), (long)(arg1),            \
1144                                         (long)(arg2), (long)(arg3),            \
1145                                         (long)(arg4), (long)(arg5))
1146 #define __sanitizer_syscall_post_recvfrom(res, arg0, arg1, arg2, arg3, arg4,   \
1147                                           arg5)                                \
1148   __sanitizer_syscall_post_impl_recvfrom(res, (long)(arg0), (long)(arg1),      \
1149                                          (long)(arg2), (long)(arg3),           \
1150                                          (long)(arg4), (long)(arg5))
1151 #define __sanitizer_syscall_pre_recvmsg(fd, msg, flags)                        \
1152   __sanitizer_syscall_pre_impl_recvmsg((long)(fd), (long)(msg), (long)(flags))
1153 #define __sanitizer_syscall_post_recvmsg(res, fd, msg, flags)                  \
1154   __sanitizer_syscall_post_impl_recvmsg(res, (long)(fd), (long)(msg),          \
1155                                         (long)(flags))
1156 #define __sanitizer_syscall_pre_recvmmsg(fd, msg, vlen, flags, timeout)        \
1157   __sanitizer_syscall_pre_impl_recvmmsg((long)(fd), (long)(msg), (long)(vlen), \
1158                                         (long)(flags), (long)(timeout))
1159 #define __sanitizer_syscall_post_recvmmsg(res, fd, msg, vlen, flags, timeout)  \
1160   __sanitizer_syscall_post_impl_recvmmsg(res, (long)(fd), (long)(msg),         \
1161                                          (long)(vlen), (long)(flags),          \
1162                                          (long)(timeout))
1163 #define __sanitizer_syscall_pre_socket(arg0, arg1, arg2)                       \
1164   __sanitizer_syscall_pre_impl_socket((long)(arg0), (long)(arg1), (long)(arg2))
1165 #define __sanitizer_syscall_post_socket(res, arg0, arg1, arg2)                 \
1166   __sanitizer_syscall_post_impl_socket(res, (long)(arg0), (long)(arg1),        \
1167                                        (long)(arg2))
1168 #define __sanitizer_syscall_pre_socketpair(arg0, arg1, arg2, arg3)             \
1169   __sanitizer_syscall_pre_impl_socketpair((long)(arg0), (long)(arg1),          \
1170                                           (long)(arg2), (long)(arg3))
1171 #define __sanitizer_syscall_post_socketpair(res, arg0, arg1, arg2, arg3)       \
1172   __sanitizer_syscall_post_impl_socketpair(res, (long)(arg0), (long)(arg1),    \
1173                                            (long)(arg2), (long)(arg3))
1174 #define __sanitizer_syscall_pre_socketcall(call, args)                         \
1175   __sanitizer_syscall_pre_impl_socketcall((long)(call), (long)(args))
1176 #define __sanitizer_syscall_post_socketcall(res, call, args)                   \
1177   __sanitizer_syscall_post_impl_socketcall(res, (long)(call), (long)(args))
1178 #define __sanitizer_syscall_pre_listen(arg0, arg1)                             \
1179   __sanitizer_syscall_pre_impl_listen((long)(arg0), (long)(arg1))
1180 #define __sanitizer_syscall_post_listen(res, arg0, arg1)                       \
1181   __sanitizer_syscall_post_impl_listen(res, (long)(arg0), (long)(arg1))
1182 #define __sanitizer_syscall_pre_poll(ufds, nfds, timeout)                      \
1183   __sanitizer_syscall_pre_impl_poll((long)(ufds), (long)(nfds), (long)(timeout))
1184 #define __sanitizer_syscall_post_poll(res, ufds, nfds, timeout)                \
1185   __sanitizer_syscall_post_impl_poll(res, (long)(ufds), (long)(nfds),          \
1186                                      (long)(timeout))
1187 #define __sanitizer_syscall_pre_select(n, inp, outp, exp, tvp)                 \
1188   __sanitizer_syscall_pre_impl_select((long)(n), (long)(inp), (long)(outp),    \
1189                                       (long)(exp), (long)(tvp))
1190 #define __sanitizer_syscall_post_select(res, n, inp, outp, exp, tvp)           \
1191   __sanitizer_syscall_post_impl_select(res, (long)(n), (long)(inp),            \
1192                                        (long)(outp), (long)(exp), (long)(tvp))
1193 #define __sanitizer_syscall_pre_old_select(arg)                                \
1194   __sanitizer_syscall_pre_impl_old_select((long)(arg))
1195 #define __sanitizer_syscall_post_old_select(res, arg)                          \
1196   __sanitizer_syscall_post_impl_old_select(res, (long)(arg))
1197 #define __sanitizer_syscall_pre_epoll_create(size)                             \
1198   __sanitizer_syscall_pre_impl_epoll_create((long)(size))
1199 #define __sanitizer_syscall_post_epoll_create(res, size)                       \
1200   __sanitizer_syscall_post_impl_epoll_create(res, (long)(size))
1201 #define __sanitizer_syscall_pre_epoll_create1(flags)                           \
1202   __sanitizer_syscall_pre_impl_epoll_create1((long)(flags))
1203 #define __sanitizer_syscall_post_epoll_create1(res, flags)                     \
1204   __sanitizer_syscall_post_impl_epoll_create1(res, (long)(flags))
1205 #define __sanitizer_syscall_pre_epoll_ctl(epfd, op, fd, event)                 \
1206   __sanitizer_syscall_pre_impl_epoll_ctl((long)(epfd), (long)(op), (long)(fd), \
1207                                          (long)(event))
1208 #define __sanitizer_syscall_post_epoll_ctl(res, epfd, op, fd, event)           \
1209   __sanitizer_syscall_post_impl_epoll_ctl(res, (long)(epfd), (long)(op),       \
1210                                           (long)(fd), (long)(event))
1211 #define __sanitizer_syscall_pre_epoll_wait(epfd, events, maxevents, timeout)   \
1212   __sanitizer_syscall_pre_impl_epoll_wait((long)(epfd), (long)(events),        \
1213                                           (long)(maxevents), (long)(timeout))
1214 #define __sanitizer_syscall_post_epoll_wait(res, epfd, events, maxevents,      \
1215                                             timeout)                           \
1216   __sanitizer_syscall_post_impl_epoll_wait(res, (long)(epfd), (long)(events),  \
1217                                            (long)(maxevents), (long)(timeout))
1218 #define __sanitizer_syscall_pre_epoll_pwait(epfd, events, maxevents, timeout,  \
1219                                             sigmask, sigsetsize)               \
1220   __sanitizer_syscall_pre_impl_epoll_pwait(                                    \
1221       (long)(epfd), (long)(events), (long)(maxevents), (long)(timeout),        \
1222       (long)(sigmask), (long)(sigsetsize))
1223 #define __sanitizer_syscall_post_epoll_pwait(res, epfd, events, maxevents,     \
1224                                              timeout, sigmask, sigsetsize)     \
1225   __sanitizer_syscall_post_impl_epoll_pwait(                                   \
1226       res, (long)(epfd), (long)(events), (long)(maxevents), (long)(timeout),   \
1227       (long)(sigmask), (long)(sigsetsize))
1228 #define __sanitizer_syscall_pre_epoll_pwait2(epfd, events, maxevents, timeout, \
1229                                              sigmask, sigsetsize)              \
1230   __sanitizer_syscall_pre_impl_epoll_pwait2(                                   \
1231       (long)(epfd), (long)(events), (long)(maxevents), (long)(timeout),        \
1232       (long)(sigmask), (long)(sigsetsize))
1233 #define __sanitizer_syscall_post_epoll_pwait2(res, epfd, events, maxevents,    \
1234                                               timeout, sigmask, sigsetsize)    \
1235   __sanitizer_syscall_post_impl_epoll_pwait2(                                  \
1236       res, (long)(epfd), (long)(events), (long)(maxevents), (long)(timeout),   \
1237       (long)(sigmask), (long)(sigsetsize))
1238 #define __sanitizer_syscall_pre_gethostname(name, len)                         \
1239   __sanitizer_syscall_pre_impl_gethostname((long)(name), (long)(len))
1240 #define __sanitizer_syscall_post_gethostname(res, name, len)                   \
1241   __sanitizer_syscall_post_impl_gethostname(res, (long)(name), (long)(len))
1242 #define __sanitizer_syscall_pre_sethostname(name, len)                         \
1243   __sanitizer_syscall_pre_impl_sethostname((long)(name), (long)(len))
1244 #define __sanitizer_syscall_post_sethostname(res, name, len)                   \
1245   __sanitizer_syscall_post_impl_sethostname(res, (long)(name), (long)(len))
1246 #define __sanitizer_syscall_pre_setdomainname(name, len)                       \
1247   __sanitizer_syscall_pre_impl_setdomainname((long)(name), (long)(len))
1248 #define __sanitizer_syscall_post_setdomainname(res, name, len)                 \
1249   __sanitizer_syscall_post_impl_setdomainname(res, (long)(name), (long)(len))
1250 #define __sanitizer_syscall_pre_newuname(name)                                 \
1251   __sanitizer_syscall_pre_impl_newuname((long)(name))
1252 #define __sanitizer_syscall_post_newuname(res, name)                           \
1253   __sanitizer_syscall_post_impl_newuname(res, (long)(name))
1254 #define __sanitizer_syscall_pre_uname(arg0)                                    \
1255   __sanitizer_syscall_pre_impl_uname((long)(arg0))
1256 #define __sanitizer_syscall_post_uname(res, arg0)                              \
1257   __sanitizer_syscall_post_impl_uname(res, (long)(arg0))
1258 #define __sanitizer_syscall_pre_olduname(arg0)                                 \
1259   __sanitizer_syscall_pre_impl_olduname((long)(arg0))
1260 #define __sanitizer_syscall_post_olduname(res, arg0)                           \
1261   __sanitizer_syscall_post_impl_olduname(res, (long)(arg0))
1262 #define __sanitizer_syscall_pre_getrlimit(resource, rlim)                      \
1263   __sanitizer_syscall_pre_impl_getrlimit((long)(resource), (long)(rlim))
1264 #define __sanitizer_syscall_post_getrlimit(res, resource, rlim)                \
1265   __sanitizer_syscall_post_impl_getrlimit(res, (long)(resource), (long)(rlim))
1266 #define __sanitizer_syscall_pre_old_getrlimit(resource, rlim)                  \
1267   __sanitizer_syscall_pre_impl_old_getrlimit((long)(resource), (long)(rlim))
1268 #define __sanitizer_syscall_post_old_getrlimit(res, resource, rlim)            \
1269   __sanitizer_syscall_post_impl_old_getrlimit(res, (long)(resource),           \
1270                                               (long)(rlim))
1271 #define __sanitizer_syscall_pre_setrlimit(resource, rlim)                      \
1272   __sanitizer_syscall_pre_impl_setrlimit((long)(resource), (long)(rlim))
1273 #define __sanitizer_syscall_post_setrlimit(res, resource, rlim)                \
1274   __sanitizer_syscall_post_impl_setrlimit(res, (long)(resource), (long)(rlim))
1275 #define __sanitizer_syscall_pre_prlimit64(pid, resource, new_rlim, old_rlim)   \
1276   __sanitizer_syscall_pre_impl_prlimit64((long)(pid), (long)(resource),        \
1277                                          (long)(new_rlim), (long)(old_rlim))
1278 #define __sanitizer_syscall_post_prlimit64(res, pid, resource, new_rlim,       \
1279                                            old_rlim)                           \
1280   __sanitizer_syscall_post_impl_prlimit64(res, (long)(pid), (long)(resource),  \
1281                                           (long)(new_rlim), (long)(old_rlim))
1282 #define __sanitizer_syscall_pre_getrusage(who, ru)                             \
1283   __sanitizer_syscall_pre_impl_getrusage((long)(who), (long)(ru))
1284 #define __sanitizer_syscall_post_getrusage(res, who, ru)                       \
1285   __sanitizer_syscall_post_impl_getrusage(res, (long)(who), (long)(ru))
1286 #define __sanitizer_syscall_pre_umask(mask)                                    \
1287   __sanitizer_syscall_pre_impl_umask((long)(mask))
1288 #define __sanitizer_syscall_post_umask(res, mask)                              \
1289   __sanitizer_syscall_post_impl_umask(res, (long)(mask))
1290 #define __sanitizer_syscall_pre_msgget(key, msgflg)                            \
1291   __sanitizer_syscall_pre_impl_msgget((long)(key), (long)(msgflg))
1292 #define __sanitizer_syscall_post_msgget(res, key, msgflg)                      \
1293   __sanitizer_syscall_post_impl_msgget(res, (long)(key), (long)(msgflg))
1294 #define __sanitizer_syscall_pre_msgsnd(msqid, msgp, msgsz, msgflg)             \
1295   __sanitizer_syscall_pre_impl_msgsnd((long)(msqid), (long)(msgp),             \
1296                                       (long)(msgsz), (long)(msgflg))
1297 #define __sanitizer_syscall_post_msgsnd(res, msqid, msgp, msgsz, msgflg)       \
1298   __sanitizer_syscall_post_impl_msgsnd(res, (long)(msqid), (long)(msgp),       \
1299                                        (long)(msgsz), (long)(msgflg))
1300 #define __sanitizer_syscall_pre_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg)     \
1301   __sanitizer_syscall_pre_impl_msgrcv((long)(msqid), (long)(msgp),             \
1302                                       (long)(msgsz), (long)(msgtyp),           \
1303                                       (long)(msgflg))
1304 #define __sanitizer_syscall_post_msgrcv(res, msqid, msgp, msgsz, msgtyp,       \
1305                                         msgflg)                                \
1306   __sanitizer_syscall_post_impl_msgrcv(res, (long)(msqid), (long)(msgp),       \
1307                                        (long)(msgsz), (long)(msgtyp),          \
1308                                        (long)(msgflg))
1309 #define __sanitizer_syscall_pre_msgctl(msqid, cmd, buf)                        \
1310   __sanitizer_syscall_pre_impl_msgctl((long)(msqid), (long)(cmd), (long)(buf))
1311 #define __sanitizer_syscall_post_msgctl(res, msqid, cmd, buf)                  \
1312   __sanitizer_syscall_post_impl_msgctl(res, (long)(msqid), (long)(cmd),        \
1313                                        (long)(buf))
1314 #define __sanitizer_syscall_pre_semget(key, nsems, semflg)                     \
1315   __sanitizer_syscall_pre_impl_semget((long)(key), (long)(nsems),              \
1316                                       (long)(semflg))
1317 #define __sanitizer_syscall_post_semget(res, key, nsems, semflg)               \
1318   __sanitizer_syscall_post_impl_semget(res, (long)(key), (long)(nsems),        \
1319                                        (long)(semflg))
1320 #define __sanitizer_syscall_pre_semop(semid, sops, nsops)                      \
1321   __sanitizer_syscall_pre_impl_semop((long)(semid), (long)(sops), (long)(nsops))
1322 #define __sanitizer_syscall_post_semop(res, semid, sops, nsops)                \
1323   __sanitizer_syscall_post_impl_semop(res, (long)(semid), (long)(sops),        \
1324                                       (long)(nsops))
1325 #define __sanitizer_syscall_pre_semctl(semid, semnum, cmd, arg)                \
1326   __sanitizer_syscall_pre_impl_semctl((long)(semid), (long)(semnum),           \
1327                                       (long)(cmd), (long)(arg))
1328 #define __sanitizer_syscall_post_semctl(res, semid, semnum, cmd, arg)          \
1329   __sanitizer_syscall_post_impl_semctl(res, (long)(semid), (long)(semnum),     \
1330                                        (long)(cmd), (long)(arg))
1331 #define __sanitizer_syscall_pre_semtimedop(semid, sops, nsops, timeout)        \
1332   __sanitizer_syscall_pre_impl_semtimedop((long)(semid), (long)(sops),         \
1333                                           (long)(nsops), (long)(timeout))
1334 #define __sanitizer_syscall_post_semtimedop(res, semid, sops, nsops, timeout)  \
1335   __sanitizer_syscall_post_impl_semtimedop(res, (long)(semid), (long)(sops),   \
1336                                            (long)(nsops), (long)(timeout))
1337 #define __sanitizer_syscall_pre_shmat(shmid, shmaddr, shmflg)                  \
1338   __sanitizer_syscall_pre_impl_shmat((long)(shmid), (long)(shmaddr),           \
1339                                      (long)(shmflg))
1340 #define __sanitizer_syscall_post_shmat(res, shmid, shmaddr, shmflg)            \
1341   __sanitizer_syscall_post_impl_shmat(res, (long)(shmid), (long)(shmaddr),     \
1342                                       (long)(shmflg))
1343 #define __sanitizer_syscall_pre_shmget(key, size, flag)                        \
1344   __sanitizer_syscall_pre_impl_shmget((long)(key), (long)(size), (long)(flag))
1345 #define __sanitizer_syscall_post_shmget(res, key, size, flag)                  \
1346   __sanitizer_syscall_post_impl_shmget(res, (long)(key), (long)(size),         \
1347                                        (long)(flag))
1348 #define __sanitizer_syscall_pre_shmdt(shmaddr)                                 \
1349   __sanitizer_syscall_pre_impl_shmdt((long)(shmaddr))
1350 #define __sanitizer_syscall_post_shmdt(res, shmaddr)                           \
1351   __sanitizer_syscall_post_impl_shmdt(res, (long)(shmaddr))
1352 #define __sanitizer_syscall_pre_shmctl(shmid, cmd, buf)                        \
1353   __sanitizer_syscall_pre_impl_shmctl((long)(shmid), (long)(cmd), (long)(buf))
1354 #define __sanitizer_syscall_post_shmctl(res, shmid, cmd, buf)                  \
1355   __sanitizer_syscall_post_impl_shmctl(res, (long)(shmid), (long)(cmd),        \
1356                                        (long)(buf))
1357 #define __sanitizer_syscall_pre_ipc(call, first, second, third, ptr, fifth)    \
1358   __sanitizer_syscall_pre_impl_ipc((long)(call), (long)(first),                \
1359                                    (long)(second), (long)(third), (long)(ptr), \
1360                                    (long)(fifth))
1361 #define __sanitizer_syscall_post_ipc(res, call, first, second, third, ptr,     \
1362                                      fifth)                                    \
1363   __sanitizer_syscall_post_impl_ipc(res, (long)(call), (long)(first),          \
1364                                     (long)(second), (long)(third),             \
1365                                     (long)(ptr), (long)(fifth))
1366 #define __sanitizer_syscall_pre_mq_open(name, oflag, mode, attr)               \
1367   __sanitizer_syscall_pre_impl_mq_open((long)(name), (long)(oflag),            \
1368                                        (long)(mode), (long)(attr))
1369 #define __sanitizer_syscall_post_mq_open(res, name, oflag, mode, attr)         \
1370   __sanitizer_syscall_post_impl_mq_open(res, (long)(name), (long)(oflag),      \
1371                                         (long)(mode), (long)(attr))
1372 #define __sanitizer_syscall_pre_mq_unlink(name)                                \
1373   __sanitizer_syscall_pre_impl_mq_unlink((long)(name))
1374 #define __sanitizer_syscall_post_mq_unlink(res, name)                          \
1375   __sanitizer_syscall_post_impl_mq_unlink(res, (long)(name))
1376 #define __sanitizer_syscall_pre_mq_timedsend(mqdes, msg_ptr, msg_len,          \
1377                                              msg_prio, abs_timeout)            \
1378   __sanitizer_syscall_pre_impl_mq_timedsend((long)(mqdes), (long)(msg_ptr),    \
1379                                             (long)(msg_len), (long)(msg_prio), \
1380                                             (long)(abs_timeout))
1381 #define __sanitizer_syscall_post_mq_timedsend(res, mqdes, msg_ptr, msg_len,    \
1382                                               msg_prio, abs_timeout)           \
1383   __sanitizer_syscall_post_impl_mq_timedsend(                                  \
1384       res, (long)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio),  \
1385       (long)(abs_timeout))
1386 #define __sanitizer_syscall_pre_mq_timedreceive(mqdes, msg_ptr, msg_len,       \
1387                                                 msg_prio, abs_timeout)         \
1388   __sanitizer_syscall_pre_impl_mq_timedreceive(                                \
1389       (long)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio),       \
1390       (long)(abs_timeout))
1391 #define __sanitizer_syscall_post_mq_timedreceive(res, mqdes, msg_ptr, msg_len, \
1392                                                  msg_prio, abs_timeout)        \
1393   __sanitizer_syscall_post_impl_mq_timedreceive(                               \
1394       res, (long)(mqdes), (long)(msg_ptr), (long)(msg_len), (long)(msg_prio),  \
1395       (long)(abs_timeout))
1396 #define __sanitizer_syscall_pre_mq_notify(mqdes, notification)                 \
1397   __sanitizer_syscall_pre_impl_mq_notify((long)(mqdes), (long)(notification))
1398 #define __sanitizer_syscall_post_mq_notify(res, mqdes, notification)           \
1399   __sanitizer_syscall_post_impl_mq_notify(res, (long)(mqdes),                  \
1400                                           (long)(notification))
1401 #define __sanitizer_syscall_pre_mq_getsetattr(mqdes, mqstat, omqstat)          \
1402   __sanitizer_syscall_pre_impl_mq_getsetattr((long)(mqdes), (long)(mqstat),    \
1403                                              (long)(omqstat))
1404 #define __sanitizer_syscall_post_mq_getsetattr(res, mqdes, mqstat, omqstat)    \
1405   __sanitizer_syscall_post_impl_mq_getsetattr(res, (long)(mqdes),              \
1406                                               (long)(mqstat), (long)(omqstat))
1407 #define __sanitizer_syscall_pre_pciconfig_iobase(which, bus, devfn)            \
1408   __sanitizer_syscall_pre_impl_pciconfig_iobase((long)(which), (long)(bus),    \
1409                                                 (long)(devfn))
1410 #define __sanitizer_syscall_post_pciconfig_iobase(res, which, bus, devfn)      \
1411   __sanitizer_syscall_post_impl_pciconfig_iobase(res, (long)(which),           \
1412                                                  (long)(bus), (long)(devfn))
1413 #define __sanitizer_syscall_pre_pciconfig_read(bus, dfn, off, len, buf)        \
1414   __sanitizer_syscall_pre_impl_pciconfig_read(                                 \
1415       (long)(bus), (long)(dfn), (long)(off), (long)(len), (long)(buf))
1416 #define __sanitizer_syscall_post_pciconfig_read(res, bus, dfn, off, len, buf)  \
1417   __sanitizer_syscall_post_impl_pciconfig_read(                                \
1418       res, (long)(bus), (long)(dfn), (long)(off), (long)(len), (long)(buf))
1419 #define __sanitizer_syscall_pre_pciconfig_write(bus, dfn, off, len, buf)       \
1420   __sanitizer_syscall_pre_impl_pciconfig_write(                                \
1421       (long)(bus), (long)(dfn), (long)(off), (long)(len), (long)(buf))
1422 #define __sanitizer_syscall_post_pciconfig_write(res, bus, dfn, off, len, buf) \
1423   __sanitizer_syscall_post_impl_pciconfig_write(                               \
1424       res, (long)(bus), (long)(dfn), (long)(off), (long)(len), (long)(buf))
1425 #define __sanitizer_syscall_pre_swapon(specialfile, swap_flags)                \
1426   __sanitizer_syscall_pre_impl_swapon((long)(specialfile), (long)(swap_flags))
1427 #define __sanitizer_syscall_post_swapon(res, specialfile, swap_flags)          \
1428   __sanitizer_syscall_post_impl_swapon(res, (long)(specialfile),               \
1429                                        (long)(swap_flags))
1430 #define __sanitizer_syscall_pre_swapoff(specialfile)                           \
1431   __sanitizer_syscall_pre_impl_swapoff((long)(specialfile))
1432 #define __sanitizer_syscall_post_swapoff(res, specialfile)                     \
1433   __sanitizer_syscall_post_impl_swapoff(res, (long)(specialfile))
1434 #define __sanitizer_syscall_pre_sysctl(args)                                   \
1435   __sanitizer_syscall_pre_impl_sysctl((long)(args))
1436 #define __sanitizer_syscall_post_sysctl(res, args)                             \
1437   __sanitizer_syscall_post_impl_sysctl(res, (long)(args))
1438 #define __sanitizer_syscall_pre_sysinfo(info)                                  \
1439   __sanitizer_syscall_pre_impl_sysinfo((long)(info))
1440 #define __sanitizer_syscall_post_sysinfo(res, info)                            \
1441   __sanitizer_syscall_post_impl_sysinfo(res, (long)(info))
1442 #define __sanitizer_syscall_pre_sysfs(option, arg1, arg2)                      \
1443   __sanitizer_syscall_pre_impl_sysfs((long)(option), (long)(arg1), (long)(arg2))
1444 #define __sanitizer_syscall_post_sysfs(res, option, arg1, arg2)                \
1445   __sanitizer_syscall_post_impl_sysfs(res, (long)(option), (long)(arg1),       \
1446                                       (long)(arg2))
1447 #define __sanitizer_syscall_pre_syslog(type, buf, len)                         \
1448   __sanitizer_syscall_pre_impl_syslog((long)(type), (long)(buf), (long)(len))
1449 #define __sanitizer_syscall_post_syslog(res, type, buf, len)                   \
1450   __sanitizer_syscall_post_impl_syslog(res, (long)(type), (long)(buf),         \
1451                                        (long)(len))
1452 #define __sanitizer_syscall_pre_uselib(library)                                \
1453   __sanitizer_syscall_pre_impl_uselib((long)(library))
1454 #define __sanitizer_syscall_post_uselib(res, library)                          \
1455   __sanitizer_syscall_post_impl_uselib(res, (long)(library))
1456 #define __sanitizer_syscall_pre_ni_syscall()                                   \
1457   __sanitizer_syscall_pre_impl_ni_syscall()
1458 #define __sanitizer_syscall_post_ni_syscall(res)                               \
1459   __sanitizer_syscall_post_impl_ni_syscall(res)
1460 #define __sanitizer_syscall_pre_ptrace(request, pid, addr, data)               \
1461   __sanitizer_syscall_pre_impl_ptrace((long)(request), (long)(pid),            \
1462                                       (long)(addr), (long)(data))
1463 #define __sanitizer_syscall_post_ptrace(res, request, pid, addr, data)         \
1464   __sanitizer_syscall_post_impl_ptrace(res, (long)(request), (long)(pid),      \
1465                                        (long)(addr), (long)(data))
1466 #define __sanitizer_syscall_pre_add_key(_type, _description, _payload, plen,   \
1467                                         destringid)                            \
1468   __sanitizer_syscall_pre_impl_add_key((long)(_type), (long)(_description),    \
1469                                        (long)(_payload), (long)(plen),         \
1470                                        (long)(destringid))
1471 #define __sanitizer_syscall_post_add_key(res, _type, _description, _payload,   \
1472                                          plen, destringid)                     \
1473   __sanitizer_syscall_post_impl_add_key(                                       \
1474       res, (long)(_type), (long)(_description), (long)(_payload),              \
1475       (long)(plen), (long)(destringid))
1476 #define __sanitizer_syscall_pre_request_key(_type, _description,               \
1477                                             _callout_info, destringid)         \
1478   __sanitizer_syscall_pre_impl_request_key(                                    \
1479       (long)(_type), (long)(_description), (long)(_callout_info),              \
1480       (long)(destringid))
1481 #define __sanitizer_syscall_post_request_key(res, _type, _description,         \
1482                                              _callout_info, destringid)        \
1483   __sanitizer_syscall_post_impl_request_key(                                   \
1484       res, (long)(_type), (long)(_description), (long)(_callout_info),         \
1485       (long)(destringid))
1486 #define __sanitizer_syscall_pre_keyctl(cmd, arg2, arg3, arg4, arg5)            \
1487   __sanitizer_syscall_pre_impl_keyctl((long)(cmd), (long)(arg2), (long)(arg3), \
1488                                       (long)(arg4), (long)(arg5))
1489 #define __sanitizer_syscall_post_keyctl(res, cmd, arg2, arg3, arg4, arg5)      \
1490   __sanitizer_syscall_post_impl_keyctl(res, (long)(cmd), (long)(arg2),         \
1491                                        (long)(arg3), (long)(arg4),             \
1492                                        (long)(arg5))
1493 #define __sanitizer_syscall_pre_ioprio_set(which, who, ioprio)                 \
1494   __sanitizer_syscall_pre_impl_ioprio_set((long)(which), (long)(who),          \
1495                                           (long)(ioprio))
1496 #define __sanitizer_syscall_post_ioprio_set(res, which, who, ioprio)           \
1497   __sanitizer_syscall_post_impl_ioprio_set(res, (long)(which), (long)(who),    \
1498                                            (long)(ioprio))
1499 #define __sanitizer_syscall_pre_ioprio_get(which, who)                         \
1500   __sanitizer_syscall_pre_impl_ioprio_get((long)(which), (long)(who))
1501 #define __sanitizer_syscall_post_ioprio_get(res, which, who)                   \
1502   __sanitizer_syscall_post_impl_ioprio_get(res, (long)(which), (long)(who))
1503 #define __sanitizer_syscall_pre_set_mempolicy(mode, nmask, maxnode)            \
1504   __sanitizer_syscall_pre_impl_set_mempolicy((long)(mode), (long)(nmask),      \
1505                                              (long)(maxnode))
1506 #define __sanitizer_syscall_post_set_mempolicy(res, mode, nmask, maxnode)      \
1507   __sanitizer_syscall_post_impl_set_mempolicy(res, (long)(mode),               \
1508                                               (long)(nmask), (long)(maxnode))
1509 #define __sanitizer_syscall_pre_migrate_pages(pid, maxnode, from, to)          \
1510   __sanitizer_syscall_pre_impl_migrate_pages((long)(pid), (long)(maxnode),     \
1511                                              (long)(from), (long)(to))
1512 #define __sanitizer_syscall_post_migrate_pages(res, pid, maxnode, from, to)    \
1513   __sanitizer_syscall_post_impl_migrate_pages(                                 \
1514       res, (long)(pid), (long)(maxnode), (long)(from), (long)(to))
1515 #define __sanitizer_syscall_pre_move_pages(pid, nr_pages, pages, nodes,        \
1516                                            status, flags)                      \
1517   __sanitizer_syscall_pre_impl_move_pages((long)(pid), (long)(nr_pages),       \
1518                                           (long)(pages), (long)(nodes),        \
1519                                           (long)(status), (long)(flags))
1520 #define __sanitizer_syscall_post_move_pages(res, pid, nr_pages, pages, nodes,  \
1521                                             status, flags)                     \
1522   __sanitizer_syscall_post_impl_move_pages(res, (long)(pid), (long)(nr_pages), \
1523                                            (long)(pages), (long)(nodes),       \
1524                                            (long)(status), (long)(flags))
1525 #define __sanitizer_syscall_pre_mbind(start, len, mode, nmask, maxnode, flags) \
1526   __sanitizer_syscall_pre_impl_mbind((long)(start), (long)(len), (long)(mode), \
1527                                      (long)(nmask), (long)(maxnode),           \
1528                                      (long)(flags))
1529 #define __sanitizer_syscall_post_mbind(res, start, len, mode, nmask, maxnode,  \
1530                                        flags)                                  \
1531   __sanitizer_syscall_post_impl_mbind(res, (long)(start), (long)(len),         \
1532                                       (long)(mode), (long)(nmask),             \
1533                                       (long)(maxnode), (long)(flags))
1534 #define __sanitizer_syscall_pre_get_mempolicy(policy, nmask, maxnode, addr,    \
1535                                               flags)                           \
1536   __sanitizer_syscall_pre_impl_get_mempolicy((long)(policy), (long)(nmask),    \
1537                                              (long)(maxnode), (long)(addr),    \
1538                                              (long)(flags))
1539 #define __sanitizer_syscall_post_get_mempolicy(res, policy, nmask, maxnode,    \
1540                                                addr, flags)                    \
1541   __sanitizer_syscall_post_impl_get_mempolicy(res, (long)(policy),             \
1542                                               (long)(nmask), (long)(maxnode),  \
1543                                               (long)(addr), (long)(flags))
1544 #define __sanitizer_syscall_pre_inotify_init()                                 \
1545   __sanitizer_syscall_pre_impl_inotify_init()
1546 #define __sanitizer_syscall_post_inotify_init(res)                             \
1547   __sanitizer_syscall_post_impl_inotify_init(res)
1548 #define __sanitizer_syscall_pre_inotify_init1(flags)                           \
1549   __sanitizer_syscall_pre_impl_inotify_init1((long)(flags))
1550 #define __sanitizer_syscall_post_inotify_init1(res, flags)                     \
1551   __sanitizer_syscall_post_impl_inotify_init1(res, (long)(flags))
1552 #define __sanitizer_syscall_pre_inotify_add_watch(fd, path, mask)              \
1553   __sanitizer_syscall_pre_impl_inotify_add_watch((long)(fd), (long)(path),     \
1554                                                  (long)(mask))
1555 #define __sanitizer_syscall_post_inotify_add_watch(res, fd, path, mask)        \
1556   __sanitizer_syscall_post_impl_inotify_add_watch(res, (long)(fd),             \
1557                                                   (long)(path), (long)(mask))
1558 #define __sanitizer_syscall_pre_inotify_rm_watch(fd, wd)                       \
1559   __sanitizer_syscall_pre_impl_inotify_rm_watch((long)(fd), (long)(wd))
1560 #define __sanitizer_syscall_post_inotify_rm_watch(res, fd, wd)                 \
1561   __sanitizer_syscall_post_impl_inotify_rm_watch(res, (long)(fd), (long)(wd))
1562 #define __sanitizer_syscall_pre_spu_run(fd, unpc, ustatus)                     \
1563   __sanitizer_syscall_pre_impl_spu_run((long)(fd), (long)(unpc),               \
1564                                        (long)(ustatus))
1565 #define __sanitizer_syscall_post_spu_run(res, fd, unpc, ustatus)               \
1566   __sanitizer_syscall_post_impl_spu_run(res, (long)(fd), (long)(unpc),         \
1567                                         (long)(ustatus))
1568 #define __sanitizer_syscall_pre_spu_create(name, flags, mode, fd)              \
1569   __sanitizer_syscall_pre_impl_spu_create((long)(name), (long)(flags),         \
1570                                           (long)(mode), (long)(fd))
1571 #define __sanitizer_syscall_post_spu_create(res, name, flags, mode, fd)        \
1572   __sanitizer_syscall_post_impl_spu_create(res, (long)(name), (long)(flags),   \
1573                                            (long)(mode), (long)(fd))
1574 #define __sanitizer_syscall_pre_mknodat(dfd, filename, mode, dev)              \
1575   __sanitizer_syscall_pre_impl_mknodat((long)(dfd), (long)(filename),          \
1576                                        (long)(mode), (long)(dev))
1577 #define __sanitizer_syscall_post_mknodat(res, dfd, filename, mode, dev)        \
1578   __sanitizer_syscall_post_impl_mknodat(res, (long)(dfd), (long)(filename),    \
1579                                         (long)(mode), (long)(dev))
1580 #define __sanitizer_syscall_pre_mkdirat(dfd, pathname, mode)                   \
1581   __sanitizer_syscall_pre_impl_mkdirat((long)(dfd), (long)(pathname),          \
1582                                        (long)(mode))
1583 #define __sanitizer_syscall_post_mkdirat(res, dfd, pathname, mode)             \
1584   __sanitizer_syscall_post_impl_mkdirat(res, (long)(dfd), (long)(pathname),    \
1585                                         (long)(mode))
1586 #define __sanitizer_syscall_pre_unlinkat(dfd, pathname, flag)                  \
1587   __sanitizer_syscall_pre_impl_unlinkat((long)(dfd), (long)(pathname),         \
1588                                         (long)(flag))
1589 #define __sanitizer_syscall_post_unlinkat(res, dfd, pathname, flag)            \
1590   __sanitizer_syscall_post_impl_unlinkat(res, (long)(dfd), (long)(pathname),   \
1591                                          (long)(flag))
1592 #define __sanitizer_syscall_pre_symlinkat(oldname, newdfd, newname)            \
1593   __sanitizer_syscall_pre_impl_symlinkat((long)(oldname), (long)(newdfd),      \
1594                                          (long)(newname))
1595 #define __sanitizer_syscall_post_symlinkat(res, oldname, newdfd, newname)      \
1596   __sanitizer_syscall_post_impl_symlinkat(res, (long)(oldname),                \
1597                                           (long)(newdfd), (long)(newname))
1598 #define __sanitizer_syscall_pre_linkat(olddfd, oldname, newdfd, newname,       \
1599                                        flags)                                  \
1600   __sanitizer_syscall_pre_impl_linkat((long)(olddfd), (long)(oldname),         \
1601                                       (long)(newdfd), (long)(newname),         \
1602                                       (long)(flags))
1603 #define __sanitizer_syscall_post_linkat(res, olddfd, oldname, newdfd, newname, \
1604                                         flags)                                 \
1605   __sanitizer_syscall_post_impl_linkat(res, (long)(olddfd), (long)(oldname),   \
1606                                        (long)(newdfd), (long)(newname),        \
1607                                        (long)(flags))
1608 #define __sanitizer_syscall_pre_renameat(olddfd, oldname, newdfd, newname)     \
1609   __sanitizer_syscall_pre_impl_renameat((long)(olddfd), (long)(oldname),       \
1610                                         (long)(newdfd), (long)(newname))
1611 #define __sanitizer_syscall_post_renameat(res, olddfd, oldname, newdfd,        \
1612                                           newname)                             \
1613   __sanitizer_syscall_post_impl_renameat(res, (long)(olddfd), (long)(oldname), \
1614                                          (long)(newdfd), (long)(newname))
1615 #define __sanitizer_syscall_pre_futimesat(dfd, filename, utimes)               \
1616   __sanitizer_syscall_pre_impl_futimesat((long)(dfd), (long)(filename),        \
1617                                          (long)(utimes))
1618 #define __sanitizer_syscall_post_futimesat(res, dfd, filename, utimes)         \
1619   __sanitizer_syscall_post_impl_futimesat(res, (long)(dfd), (long)(filename),  \
1620                                           (long)(utimes))
1621 #define __sanitizer_syscall_pre_faccessat(dfd, filename, mode)                 \
1622   __sanitizer_syscall_pre_impl_faccessat((long)(dfd), (long)(filename),        \
1623                                          (long)(mode))
1624 #define __sanitizer_syscall_post_faccessat(res, dfd, filename, mode)           \
1625   __sanitizer_syscall_post_impl_faccessat(res, (long)(dfd), (long)(filename),  \
1626                                           (long)(mode))
1627 #define __sanitizer_syscall_pre_fchmodat(dfd, filename, mode)                  \
1628   __sanitizer_syscall_pre_impl_fchmodat((long)(dfd), (long)(filename),         \
1629                                         (long)(mode))
1630 #define __sanitizer_syscall_post_fchmodat(res, dfd, filename, mode)            \
1631   __sanitizer_syscall_post_impl_fchmodat(res, (long)(dfd), (long)(filename),   \
1632                                          (long)(mode))
1633 #define __sanitizer_syscall_pre_fchownat(dfd, filename, user, group, flag)     \
1634   __sanitizer_syscall_pre_impl_fchownat((long)(dfd), (long)(filename),         \
1635                                         (long)(user), (long)(group),           \
1636                                         (long)(flag))
1637 #define __sanitizer_syscall_post_fchownat(res, dfd, filename, user, group,     \
1638                                           flag)                                \
1639   __sanitizer_syscall_post_impl_fchownat(res, (long)(dfd), (long)(filename),   \
1640                                          (long)(user), (long)(group),          \
1641                                          (long)(flag))
1642 #define __sanitizer_syscall_pre_openat(dfd, filename, flags, mode)             \
1643   __sanitizer_syscall_pre_impl_openat((long)(dfd), (long)(filename),           \
1644                                       (long)(flags), (long)(mode))
1645 #define __sanitizer_syscall_post_openat(res, dfd, filename, flags, mode)       \
1646   __sanitizer_syscall_post_impl_openat(res, (long)(dfd), (long)(filename),     \
1647                                        (long)(flags), (long)(mode))
1648 #define __sanitizer_syscall_pre_newfstatat(dfd, filename, statbuf, flag)       \
1649   __sanitizer_syscall_pre_impl_newfstatat((long)(dfd), (long)(filename),       \
1650                                           (long)(statbuf), (long)(flag))
1651 #define __sanitizer_syscall_post_newfstatat(res, dfd, filename, statbuf, flag) \
1652   __sanitizer_syscall_post_impl_newfstatat(res, (long)(dfd), (long)(filename), \
1653                                            (long)(statbuf), (long)(flag))
1654 #define __sanitizer_syscall_pre_fstatat64(dfd, filename, statbuf, flag)        \
1655   __sanitizer_syscall_pre_impl_fstatat64((long)(dfd), (long)(filename),        \
1656                                          (long)(statbuf), (long)(flag))
1657 #define __sanitizer_syscall_post_fstatat64(res, dfd, filename, statbuf, flag)  \
1658   __sanitizer_syscall_post_impl_fstatat64(res, (long)(dfd), (long)(filename),  \
1659                                           (long)(statbuf), (long)(flag))
1660 #define __sanitizer_syscall_pre_readlinkat(dfd, path, buf, bufsiz)             \
1661   __sanitizer_syscall_pre_impl_readlinkat((long)(dfd), (long)(path),           \
1662                                           (long)(buf), (long)(bufsiz))
1663 #define __sanitizer_syscall_post_readlinkat(res, dfd, path, buf, bufsiz)       \
1664   __sanitizer_syscall_post_impl_readlinkat(res, (long)(dfd), (long)(path),     \
1665                                            (long)(buf), (long)(bufsiz))
1666 #define __sanitizer_syscall_pre_utimensat(dfd, filename, utimes, flags)        \
1667   __sanitizer_syscall_pre_impl_utimensat((long)(dfd), (long)(filename),        \
1668                                          (long)(utimes), (long)(flags))
1669 #define __sanitizer_syscall_post_utimensat(res, dfd, filename, utimes, flags)  \
1670   __sanitizer_syscall_post_impl_utimensat(res, (long)(dfd), (long)(filename),  \
1671                                           (long)(utimes), (long)(flags))
1672 #define __sanitizer_syscall_pre_unshare(unshare_flags)                         \
1673   __sanitizer_syscall_pre_impl_unshare((long)(unshare_flags))
1674 #define __sanitizer_syscall_post_unshare(res, unshare_flags)                   \
1675   __sanitizer_syscall_post_impl_unshare(res, (long)(unshare_flags))
1676 #define __sanitizer_syscall_pre_splice(fd_in, off_in, fd_out, off_out, len,    \
1677                                        flags)                                  \
1678   __sanitizer_syscall_pre_impl_splice((long)(fd_in), (long)(off_in),           \
1679                                       (long)(fd_out), (long)(off_out),         \
1680                                       (long)(len), (long)(flags))
1681 #define __sanitizer_syscall_post_splice(res, fd_in, off_in, fd_out, off_out,   \
1682                                         len, flags)                            \
1683   __sanitizer_syscall_post_impl_splice(res, (long)(fd_in), (long)(off_in),     \
1684                                        (long)(fd_out), (long)(off_out),        \
1685                                        (long)(len), (long)(flags))
1686 #define __sanitizer_syscall_pre_vmsplice(fd, iov, nr_segs, flags)              \
1687   __sanitizer_syscall_pre_impl_vmsplice((long)(fd), (long)(iov),               \
1688                                         (long)(nr_segs), (long)(flags))
1689 #define __sanitizer_syscall_post_vmsplice(res, fd, iov, nr_segs, flags)        \
1690   __sanitizer_syscall_post_impl_vmsplice(res, (long)(fd), (long)(iov),         \
1691                                          (long)(nr_segs), (long)(flags))
1692 #define __sanitizer_syscall_pre_tee(fdin, fdout, len, flags)                   \
1693   __sanitizer_syscall_pre_impl_tee((long)(fdin), (long)(fdout), (long)(len),   \
1694                                    (long)(flags))
1695 #define __sanitizer_syscall_post_tee(res, fdin, fdout, len, flags)             \
1696   __sanitizer_syscall_post_impl_tee(res, (long)(fdin), (long)(fdout),          \
1697                                     (long)(len), (long)(flags))
1698 #define __sanitizer_syscall_pre_get_robust_list(pid, head_ptr, len_ptr)        \
1699   __sanitizer_syscall_pre_impl_get_robust_list((long)(pid), (long)(head_ptr),  \
1700                                                (long)(len_ptr))
1701 #define __sanitizer_syscall_post_get_robust_list(res, pid, head_ptr, len_ptr)  \
1702   __sanitizer_syscall_post_impl_get_robust_list(                               \
1703       res, (long)(pid), (long)(head_ptr), (long)(len_ptr))
1704 #define __sanitizer_syscall_pre_set_robust_list(head, len)                     \
1705   __sanitizer_syscall_pre_impl_set_robust_list((long)(head), (long)(len))
1706 #define __sanitizer_syscall_post_set_robust_list(res, head, len)               \
1707   __sanitizer_syscall_post_impl_set_robust_list(res, (long)(head), (long)(len))
1708 #define __sanitizer_syscall_pre_getcpu(cpu, node, cache)                       \
1709   __sanitizer_syscall_pre_impl_getcpu((long)(cpu), (long)(node), (long)(cache))
1710 #define __sanitizer_syscall_post_getcpu(res, cpu, node, cache)                 \
1711   __sanitizer_syscall_post_impl_getcpu(res, (long)(cpu), (long)(node),         \
1712                                        (long)(cache))
1713 #define __sanitizer_syscall_pre_signalfd(ufd, user_mask, sizemask)             \
1714   __sanitizer_syscall_pre_impl_signalfd((long)(ufd), (long)(user_mask),        \
1715                                         (long)(sizemask))
1716 #define __sanitizer_syscall_post_signalfd(res, ufd, user_mask, sizemask)       \
1717   __sanitizer_syscall_post_impl_signalfd(res, (long)(ufd), (long)(user_mask),  \
1718                                          (long)(sizemask))
1719 #define __sanitizer_syscall_pre_signalfd4(ufd, user_mask, sizemask, flags)     \
1720   __sanitizer_syscall_pre_impl_signalfd4((long)(ufd), (long)(user_mask),       \
1721                                          (long)(sizemask), (long)(flags))
1722 #define __sanitizer_syscall_post_signalfd4(res, ufd, user_mask, sizemask,      \
1723                                            flags)                              \
1724   __sanitizer_syscall_post_impl_signalfd4(res, (long)(ufd), (long)(user_mask), \
1725                                           (long)(sizemask), (long)(flags))
1726 #define __sanitizer_syscall_pre_timerfd_create(clockid, flags)                 \
1727   __sanitizer_syscall_pre_impl_timerfd_create((long)(clockid), (long)(flags))
1728 #define __sanitizer_syscall_post_timerfd_create(res, clockid, flags)           \
1729   __sanitizer_syscall_post_impl_timerfd_create(res, (long)(clockid),           \
1730                                                (long)(flags))
1731 #define __sanitizer_syscall_pre_timerfd_settime(ufd, flags, utmr, otmr)        \
1732   __sanitizer_syscall_pre_impl_timerfd_settime((long)(ufd), (long)(flags),     \
1733                                                (long)(utmr), (long)(otmr))
1734 #define __sanitizer_syscall_post_timerfd_settime(res, ufd, flags, utmr, otmr)  \
1735   __sanitizer_syscall_post_impl_timerfd_settime(                               \
1736       res, (long)(ufd), (long)(flags), (long)(utmr), (long)(otmr))
1737 #define __sanitizer_syscall_pre_timerfd_gettime(ufd, otmr)                     \
1738   __sanitizer_syscall_pre_impl_timerfd_gettime((long)(ufd), (long)(otmr))
1739 #define __sanitizer_syscall_post_timerfd_gettime(res, ufd, otmr)               \
1740   __sanitizer_syscall_post_impl_timerfd_gettime(res, (long)(ufd), (long)(otmr))
1741 #define __sanitizer_syscall_pre_eventfd(count)                                 \
1742   __sanitizer_syscall_pre_impl_eventfd((long)(count))
1743 #define __sanitizer_syscall_post_eventfd(res, count)                           \
1744   __sanitizer_syscall_post_impl_eventfd(res, (long)(count))
1745 #define __sanitizer_syscall_pre_eventfd2(count, flags)                         \
1746   __sanitizer_syscall_pre_impl_eventfd2((long)(count), (long)(flags))
1747 #define __sanitizer_syscall_post_eventfd2(res, count, flags)                   \
1748   __sanitizer_syscall_post_impl_eventfd2(res, (long)(count), (long)(flags))
1749 #define __sanitizer_syscall_pre_old_readdir(arg0, arg1, arg2)                  \
1750   __sanitizer_syscall_pre_impl_old_readdir((long)(arg0), (long)(arg1),         \
1751                                            (long)(arg2))
1752 #define __sanitizer_syscall_post_old_readdir(res, arg0, arg1, arg2)            \
1753   __sanitizer_syscall_post_impl_old_readdir(res, (long)(arg0), (long)(arg1),   \
1754                                             (long)(arg2))
1755 #define __sanitizer_syscall_pre_pselect6(arg0, arg1, arg2, arg3, arg4, arg5)   \
1756   __sanitizer_syscall_pre_impl_pselect6((long)(arg0), (long)(arg1),            \
1757                                         (long)(arg2), (long)(arg3),            \
1758                                         (long)(arg4), (long)(arg5))
1759 #define __sanitizer_syscall_post_pselect6(res, arg0, arg1, arg2, arg3, arg4,   \
1760                                           arg5)                                \
1761   __sanitizer_syscall_post_impl_pselect6(res, (long)(arg0), (long)(arg1),      \
1762                                          (long)(arg2), (long)(arg3),           \
1763                                          (long)(arg4), (long)(arg5))
1764 #define __sanitizer_syscall_pre_ppoll(arg0, arg1, arg2, arg3, arg4)            \
1765   __sanitizer_syscall_pre_impl_ppoll((long)(arg0), (long)(arg1), (long)(arg2), \
1766                                      (long)(arg3), (long)(arg4))
1767 #define __sanitizer_syscall_post_ppoll(res, arg0, arg1, arg2, arg3, arg4)      \
1768   __sanitizer_syscall_post_impl_ppoll(res, (long)(arg0), (long)(arg1),         \
1769                                       (long)(arg2), (long)(arg3),              \
1770                                       (long)(arg4))
1771 #define __sanitizer_syscall_pre_syncfs(fd)                                     \
1772   __sanitizer_syscall_pre_impl_syncfs((long)(fd))
1773 #define __sanitizer_syscall_post_syncfs(res, fd)                               \
1774   __sanitizer_syscall_post_impl_syncfs(res, (long)(fd))
1775 #define __sanitizer_syscall_pre_perf_event_open(attr_uptr, pid, cpu, group_fd, \
1776                                                 flags)                         \
1777   __sanitizer_syscall_pre_impl_perf_event_open((long)(attr_uptr), (long)(pid), \
1778                                                (long)(cpu), (long)(group_fd),  \
1779                                                (long)(flags))
1780 #define __sanitizer_syscall_post_perf_event_open(res, attr_uptr, pid, cpu,     \
1781                                                  group_fd, flags)              \
1782   __sanitizer_syscall_post_impl_perf_event_open(                               \
1783       res, (long)(attr_uptr), (long)(pid), (long)(cpu), (long)(group_fd),      \
1784       (long)(flags))
1785 #define __sanitizer_syscall_pre_mmap_pgoff(addr, len, prot, flags, fd, pgoff)  \
1786   __sanitizer_syscall_pre_impl_mmap_pgoff((long)(addr), (long)(len),           \
1787                                           (long)(prot), (long)(flags),         \
1788                                           (long)(fd), (long)(pgoff))
1789 #define __sanitizer_syscall_post_mmap_pgoff(res, addr, len, prot, flags, fd,   \
1790                                             pgoff)                             \
1791   __sanitizer_syscall_post_impl_mmap_pgoff(res, (long)(addr), (long)(len),     \
1792                                            (long)(prot), (long)(flags),        \
1793                                            (long)(fd), (long)(pgoff))
1794 #define __sanitizer_syscall_pre_old_mmap(arg)                                  \
1795   __sanitizer_syscall_pre_impl_old_mmap((long)(arg))
1796 #define __sanitizer_syscall_post_old_mmap(res, arg)                            \
1797   __sanitizer_syscall_post_impl_old_mmap(res, (long)(arg))
1798 #define __sanitizer_syscall_pre_name_to_handle_at(dfd, name, handle, mnt_id,   \
1799                                                   flag)                        \
1800   __sanitizer_syscall_pre_impl_name_to_handle_at(                              \
1801       (long)(dfd), (long)(name), (long)(handle), (long)(mnt_id), (long)(flag))
1802 #define __sanitizer_syscall_post_name_to_handle_at(res, dfd, name, handle,     \
1803                                                    mnt_id, flag)               \
1804   __sanitizer_syscall_post_impl_name_to_handle_at(                             \
1805       res, (long)(dfd), (long)(name), (long)(handle), (long)(mnt_id),          \
1806       (long)(flag))
1807 #define __sanitizer_syscall_pre_open_by_handle_at(mountdirfd, handle, flags)   \
1808   __sanitizer_syscall_pre_impl_open_by_handle_at(                              \
1809       (long)(mountdirfd), (long)(handle), (long)(flags))
1810 #define __sanitizer_syscall_post_open_by_handle_at(res, mountdirfd, handle,    \
1811                                                    flags)                      \
1812   __sanitizer_syscall_post_impl_open_by_handle_at(                             \
1813       res, (long)(mountdirfd), (long)(handle), (long)(flags))
1814 #define __sanitizer_syscall_pre_setns(fd, nstype)                              \
1815   __sanitizer_syscall_pre_impl_setns((long)(fd), (long)(nstype))
1816 #define __sanitizer_syscall_post_setns(res, fd, nstype)                        \
1817   __sanitizer_syscall_post_impl_setns(res, (long)(fd), (long)(nstype))
1818 #define __sanitizer_syscall_pre_process_vm_readv(pid, lvec, liovcnt, rvec,     \
1819                                                  riovcnt, flags)               \
1820   __sanitizer_syscall_pre_impl_process_vm_readv(                               \
1821       (long)(pid), (long)(lvec), (long)(liovcnt), (long)(rvec),                \
1822       (long)(riovcnt), (long)(flags))
1823 #define __sanitizer_syscall_post_process_vm_readv(res, pid, lvec, liovcnt,     \
1824                                                   rvec, riovcnt, flags)        \
1825   __sanitizer_syscall_post_impl_process_vm_readv(                              \
1826       res, (long)(pid), (long)(lvec), (long)(liovcnt), (long)(rvec),           \
1827       (long)(riovcnt), (long)(flags))
1828 #define __sanitizer_syscall_pre_process_vm_writev(pid, lvec, liovcnt, rvec,    \
1829                                                   riovcnt, flags)              \
1830   __sanitizer_syscall_pre_impl_process_vm_writev(                              \
1831       (long)(pid), (long)(lvec), (long)(liovcnt), (long)(rvec),                \
1832       (long)(riovcnt), (long)(flags))
1833 #define __sanitizer_syscall_post_process_vm_writev(res, pid, lvec, liovcnt,    \
1834                                                    rvec, riovcnt, flags)       \
1835   __sanitizer_syscall_post_impl_process_vm_writev(                             \
1836       res, (long)(pid), (long)(lvec), (long)(liovcnt), (long)(rvec),           \
1837       (long)(riovcnt), (long)(flags))
1838 #define __sanitizer_syscall_pre_fork() __sanitizer_syscall_pre_impl_fork()
1839 #define __sanitizer_syscall_post_fork(res)                                     \
1840   __sanitizer_syscall_post_impl_fork(res)
1841 #define __sanitizer_syscall_pre_vfork() __sanitizer_syscall_pre_impl_vfork()
1842 #define __sanitizer_syscall_post_vfork(res)                                    \
1843   __sanitizer_syscall_post_impl_vfork(res)
1844 #define __sanitizer_syscall_pre_sigaction(signum, act, oldact)                 \
1845   __sanitizer_syscall_pre_impl_sigaction((long)signum, (long)act, (long)oldact)
1846 #define __sanitizer_syscall_post_sigaction(res, signum, act, oldact)           \
1847   __sanitizer_syscall_post_impl_sigaction(res, (long)signum, (long)act,        \
1848                                           (long)oldact)
1849 #define __sanitizer_syscall_pre_rt_sigaction(signum, act, oldact, sz)          \
1850   __sanitizer_syscall_pre_impl_rt_sigaction((long)signum, (long)act,           \
1851                                             (long)oldact, (long)sz)
1852 #define __sanitizer_syscall_post_rt_sigaction(res, signum, act, oldact, sz)    \
1853   __sanitizer_syscall_post_impl_rt_sigaction(res, (long)signum, (long)act,     \
1854                                              (long)oldact, (long)sz)
1855 #define __sanitizer_syscall_pre_sigaltstack(ss, oss)                           \
1856   __sanitizer_syscall_pre_impl_sigaltstack((long)ss, (long)oss)
1857 #define __sanitizer_syscall_post_sigaltstack(res, ss, oss)                     \
1858   __sanitizer_syscall_post_impl_sigaltstack(res, (long)ss, (long)oss)
1859 #define __sanitizer_syscall_pre_futex(uaddr, futex_op, val, timeout, uaddr2,   \
1860                                       val3)                                    \
1861   __sanitizer_syscall_pre_impl_futex((long)uaddr, (long)futex_op, (long)val,   \
1862                                      (long)timeout, (long)uaddr2, (long)val3)
1863 #define __sanitizer_syscall_post_futex(res, uaddr, futex_op, val, timeout,     \
1864                                        uaddr2, val3)                           \
1865   __sanitizer_syscall_post_impl_futex(res, (long)uaddr, (long)futex_op,        \
1866                                       (long)val, (long)timeout, (long)uaddr2,  \
1867                                       (long)val3)
1868 
1869 // And now a few syscalls we don't handle yet.
1870 #define __sanitizer_syscall_pre_afs_syscall(...)
1871 #define __sanitizer_syscall_pre_arch_prctl(...)
1872 #define __sanitizer_syscall_pre_break(...)
1873 #define __sanitizer_syscall_pre_chown32(...)
1874 #define __sanitizer_syscall_pre_clone(...)
1875 #define __sanitizer_syscall_pre_create_module(...)
1876 #define __sanitizer_syscall_pre_epoll_ctl_old(...)
1877 #define __sanitizer_syscall_pre_epoll_wait_old(...)
1878 #define __sanitizer_syscall_pre_execve(...)
1879 #define __sanitizer_syscall_pre_fadvise64(...)
1880 #define __sanitizer_syscall_pre_fadvise64_64(...)
1881 #define __sanitizer_syscall_pre_fallocate(...)
1882 #define __sanitizer_syscall_pre_fanotify_init(...)
1883 #define __sanitizer_syscall_pre_fanotify_mark(...)
1884 #define __sanitizer_syscall_pre_fchown32(...)
1885 #define __sanitizer_syscall_pre_ftime(...)
1886 #define __sanitizer_syscall_pre_ftruncate64(...)
1887 #define __sanitizer_syscall_pre_getegid32(...)
1888 #define __sanitizer_syscall_pre_geteuid32(...)
1889 #define __sanitizer_syscall_pre_getgid32(...)
1890 #define __sanitizer_syscall_pre_getgroups32(...)
1891 #define __sanitizer_syscall_pre_get_kernel_syms(...)
1892 #define __sanitizer_syscall_pre_getpmsg(...)
1893 #define __sanitizer_syscall_pre_getresgid32(...)
1894 #define __sanitizer_syscall_pre_getresuid32(...)
1895 #define __sanitizer_syscall_pre_get_thread_area(...)
1896 #define __sanitizer_syscall_pre_getuid32(...)
1897 #define __sanitizer_syscall_pre_gtty(...)
1898 #define __sanitizer_syscall_pre_idle(...)
1899 #define __sanitizer_syscall_pre_iopl(...)
1900 #define __sanitizer_syscall_pre_lchown32(...)
1901 #define __sanitizer_syscall_pre__llseek(...)
1902 #define __sanitizer_syscall_pre_lock(...)
1903 #define __sanitizer_syscall_pre_madvise1(...)
1904 #define __sanitizer_syscall_pre_mmap(...)
1905 #define __sanitizer_syscall_pre_mmap2(...)
1906 #define __sanitizer_syscall_pre_modify_ldt(...)
1907 #define __sanitizer_syscall_pre_mpx(...)
1908 #define __sanitizer_syscall_pre__newselect(...)
1909 #define __sanitizer_syscall_pre_nfsservctl(...)
1910 #define __sanitizer_syscall_pre_oldfstat(...)
1911 #define __sanitizer_syscall_pre_oldlstat(...)
1912 #define __sanitizer_syscall_pre_oldolduname(...)
1913 #define __sanitizer_syscall_pre_oldstat(...)
1914 #define __sanitizer_syscall_pre_prctl(...)
1915 #define __sanitizer_syscall_pre_prof(...)
1916 #define __sanitizer_syscall_pre_profil(...)
1917 #define __sanitizer_syscall_pre_putpmsg(...)
1918 #define __sanitizer_syscall_pre_query_module(...)
1919 #define __sanitizer_syscall_pre_readahead(...)
1920 #define __sanitizer_syscall_pre_readdir(...)
1921 #define __sanitizer_syscall_pre_rt_sigreturn(...)
1922 #define __sanitizer_syscall_pre_rt_sigsuspend(...)
1923 #define __sanitizer_syscall_pre_security(...)
1924 #define __sanitizer_syscall_pre_setfsgid32(...)
1925 #define __sanitizer_syscall_pre_setfsuid32(...)
1926 #define __sanitizer_syscall_pre_setgid32(...)
1927 #define __sanitizer_syscall_pre_setgroups32(...)
1928 #define __sanitizer_syscall_pre_setregid32(...)
1929 #define __sanitizer_syscall_pre_setresgid32(...)
1930 #define __sanitizer_syscall_pre_setresuid32(...)
1931 #define __sanitizer_syscall_pre_setreuid32(...)
1932 #define __sanitizer_syscall_pre_set_thread_area(...)
1933 #define __sanitizer_syscall_pre_setuid32(...)
1934 #define __sanitizer_syscall_pre_sigreturn(...)
1935 #define __sanitizer_syscall_pre_sigsuspend(...)
1936 #define __sanitizer_syscall_pre_stty(...)
1937 #define __sanitizer_syscall_pre_sync_file_range(...)
1938 #define __sanitizer_syscall_pre__sysctl(...)
1939 #define __sanitizer_syscall_pre_truncate64(...)
1940 #define __sanitizer_syscall_pre_tuxcall(...)
1941 #define __sanitizer_syscall_pre_ugetrlimit(...)
1942 #define __sanitizer_syscall_pre_ulimit(...)
1943 #define __sanitizer_syscall_pre_umount2(...)
1944 #define __sanitizer_syscall_pre_vm86(...)
1945 #define __sanitizer_syscall_pre_vm86old(...)
1946 #define __sanitizer_syscall_pre_vserver(...)
1947 
1948 #define __sanitizer_syscall_post_afs_syscall(res, ...)
1949 #define __sanitizer_syscall_post_arch_prctl(res, ...)
1950 #define __sanitizer_syscall_post_break(res, ...)
1951 #define __sanitizer_syscall_post_chown32(res, ...)
1952 #define __sanitizer_syscall_post_clone(res, ...)
1953 #define __sanitizer_syscall_post_create_module(res, ...)
1954 #define __sanitizer_syscall_post_epoll_ctl_old(res, ...)
1955 #define __sanitizer_syscall_post_epoll_wait_old(res, ...)
1956 #define __sanitizer_syscall_post_execve(res, ...)
1957 #define __sanitizer_syscall_post_fadvise64(res, ...)
1958 #define __sanitizer_syscall_post_fadvise64_64(res, ...)
1959 #define __sanitizer_syscall_post_fallocate(res, ...)
1960 #define __sanitizer_syscall_post_fanotify_init(res, ...)
1961 #define __sanitizer_syscall_post_fanotify_mark(res, ...)
1962 #define __sanitizer_syscall_post_fchown32(res, ...)
1963 #define __sanitizer_syscall_post_ftime(res, ...)
1964 #define __sanitizer_syscall_post_ftruncate64(res, ...)
1965 #define __sanitizer_syscall_post_getegid32(res, ...)
1966 #define __sanitizer_syscall_post_geteuid32(res, ...)
1967 #define __sanitizer_syscall_post_getgid32(res, ...)
1968 #define __sanitizer_syscall_post_getgroups32(res, ...)
1969 #define __sanitizer_syscall_post_get_kernel_syms(res, ...)
1970 #define __sanitizer_syscall_post_getpmsg(res, ...)
1971 #define __sanitizer_syscall_post_getresgid32(res, ...)
1972 #define __sanitizer_syscall_post_getresuid32(res, ...)
1973 #define __sanitizer_syscall_post_get_thread_area(res, ...)
1974 #define __sanitizer_syscall_post_getuid32(res, ...)
1975 #define __sanitizer_syscall_post_gtty(res, ...)
1976 #define __sanitizer_syscall_post_idle(res, ...)
1977 #define __sanitizer_syscall_post_iopl(res, ...)
1978 #define __sanitizer_syscall_post_lchown32(res, ...)
1979 #define __sanitizer_syscall_post__llseek(res, ...)
1980 #define __sanitizer_syscall_post_lock(res, ...)
1981 #define __sanitizer_syscall_post_madvise1(res, ...)
1982 #define __sanitizer_syscall_post_mmap2(res, ...)
1983 #define __sanitizer_syscall_post_mmap(res, ...)
1984 #define __sanitizer_syscall_post_modify_ldt(res, ...)
1985 #define __sanitizer_syscall_post_mpx(res, ...)
1986 #define __sanitizer_syscall_post__newselect(res, ...)
1987 #define __sanitizer_syscall_post_nfsservctl(res, ...)
1988 #define __sanitizer_syscall_post_oldfstat(res, ...)
1989 #define __sanitizer_syscall_post_oldlstat(res, ...)
1990 #define __sanitizer_syscall_post_oldolduname(res, ...)
1991 #define __sanitizer_syscall_post_oldstat(res, ...)
1992 #define __sanitizer_syscall_post_prctl(res, ...)
1993 #define __sanitizer_syscall_post_profil(res, ...)
1994 #define __sanitizer_syscall_post_prof(res, ...)
1995 #define __sanitizer_syscall_post_putpmsg(res, ...)
1996 #define __sanitizer_syscall_post_query_module(res, ...)
1997 #define __sanitizer_syscall_post_readahead(res, ...)
1998 #define __sanitizer_syscall_post_readdir(res, ...)
1999 #define __sanitizer_syscall_post_rt_sigreturn(res, ...)
2000 #define __sanitizer_syscall_post_rt_sigsuspend(res, ...)
2001 #define __sanitizer_syscall_post_security(res, ...)
2002 #define __sanitizer_syscall_post_setfsgid32(res, ...)
2003 #define __sanitizer_syscall_post_setfsuid32(res, ...)
2004 #define __sanitizer_syscall_post_setgid32(res, ...)
2005 #define __sanitizer_syscall_post_setgroups32(res, ...)
2006 #define __sanitizer_syscall_post_setregid32(res, ...)
2007 #define __sanitizer_syscall_post_setresgid32(res, ...)
2008 #define __sanitizer_syscall_post_setresuid32(res, ...)
2009 #define __sanitizer_syscall_post_setreuid32(res, ...)
2010 #define __sanitizer_syscall_post_set_thread_area(res, ...)
2011 #define __sanitizer_syscall_post_setuid32(res, ...)
2012 #define __sanitizer_syscall_post_sigreturn(res, ...)
2013 #define __sanitizer_syscall_post_sigsuspend(res, ...)
2014 #define __sanitizer_syscall_post_stty(res, ...)
2015 #define __sanitizer_syscall_post_sync_file_range(res, ...)
2016 #define __sanitizer_syscall_post__sysctl(res, ...)
2017 #define __sanitizer_syscall_post_truncate64(res, ...)
2018 #define __sanitizer_syscall_post_tuxcall(res, ...)
2019 #define __sanitizer_syscall_post_ugetrlimit(res, ...)
2020 #define __sanitizer_syscall_post_ulimit(res, ...)
2021 #define __sanitizer_syscall_post_umount2(res, ...)
2022 #define __sanitizer_syscall_post_vm86old(res, ...)
2023 #define __sanitizer_syscall_post_vm86(res, ...)
2024 #define __sanitizer_syscall_post_vserver(res, ...)
2025 
2026 #ifdef __cplusplus
2027 extern "C" {
2028 #endif
2029 
2030 // Private declarations. Do not call directly from user code. Use macros above.
2031 void __sanitizer_syscall_pre_impl_time(long tloc);
2032 void __sanitizer_syscall_post_impl_time(long res, long tloc);
2033 void __sanitizer_syscall_pre_impl_stime(long tptr);
2034 void __sanitizer_syscall_post_impl_stime(long res, long tptr);
2035 void __sanitizer_syscall_pre_impl_gettimeofday(long tv, long tz);
2036 void __sanitizer_syscall_post_impl_gettimeofday(long res, long tv, long tz);
2037 void __sanitizer_syscall_pre_impl_settimeofday(long tv, long tz);
2038 void __sanitizer_syscall_post_impl_settimeofday(long res, long tv, long tz);
2039 void __sanitizer_syscall_pre_impl_adjtimex(long txc_p);
2040 void __sanitizer_syscall_post_impl_adjtimex(long res, long txc_p);
2041 void __sanitizer_syscall_pre_impl_times(long tbuf);
2042 void __sanitizer_syscall_post_impl_times(long res, long tbuf);
2043 void __sanitizer_syscall_pre_impl_gettid();
2044 void __sanitizer_syscall_post_impl_gettid(long res);
2045 void __sanitizer_syscall_pre_impl_nanosleep(long rqtp, long rmtp);
2046 void __sanitizer_syscall_post_impl_nanosleep(long res, long rqtp, long rmtp);
2047 void __sanitizer_syscall_pre_impl_alarm(long seconds);
2048 void __sanitizer_syscall_post_impl_alarm(long res, long seconds);
2049 void __sanitizer_syscall_pre_impl_getpid();
2050 void __sanitizer_syscall_post_impl_getpid(long res);
2051 void __sanitizer_syscall_pre_impl_getppid();
2052 void __sanitizer_syscall_post_impl_getppid(long res);
2053 void __sanitizer_syscall_pre_impl_getuid();
2054 void __sanitizer_syscall_post_impl_getuid(long res);
2055 void __sanitizer_syscall_pre_impl_geteuid();
2056 void __sanitizer_syscall_post_impl_geteuid(long res);
2057 void __sanitizer_syscall_pre_impl_getgid();
2058 void __sanitizer_syscall_post_impl_getgid(long res);
2059 void __sanitizer_syscall_pre_impl_getegid();
2060 void __sanitizer_syscall_post_impl_getegid(long res);
2061 void __sanitizer_syscall_pre_impl_getresuid(long ruid, long euid, long suid);
2062 void __sanitizer_syscall_post_impl_getresuid(long res, long ruid, long euid,
2063                                              long suid);
2064 void __sanitizer_syscall_pre_impl_getresgid(long rgid, long egid, long sgid);
2065 void __sanitizer_syscall_post_impl_getresgid(long res, long rgid, long egid,
2066                                              long sgid);
2067 void __sanitizer_syscall_pre_impl_getpgid(long pid);
2068 void __sanitizer_syscall_post_impl_getpgid(long res, long pid);
2069 void __sanitizer_syscall_pre_impl_getpgrp();
2070 void __sanitizer_syscall_post_impl_getpgrp(long res);
2071 void __sanitizer_syscall_pre_impl_getsid(long pid);
2072 void __sanitizer_syscall_post_impl_getsid(long res, long pid);
2073 void __sanitizer_syscall_pre_impl_getgroups(long gidsetsize, long grouplist);
2074 void __sanitizer_syscall_post_impl_getgroups(long res, long gidsetsize,
2075                                              long grouplist);
2076 void __sanitizer_syscall_pre_impl_setregid(long rgid, long egid);
2077 void __sanitizer_syscall_post_impl_setregid(long res, long rgid, long egid);
2078 void __sanitizer_syscall_pre_impl_setgid(long gid);
2079 void __sanitizer_syscall_post_impl_setgid(long res, long gid);
2080 void __sanitizer_syscall_pre_impl_setreuid(long ruid, long euid);
2081 void __sanitizer_syscall_post_impl_setreuid(long res, long ruid, long euid);
2082 void __sanitizer_syscall_pre_impl_setuid(long uid);
2083 void __sanitizer_syscall_post_impl_setuid(long res, long uid);
2084 void __sanitizer_syscall_pre_impl_setresuid(long ruid, long euid, long suid);
2085 void __sanitizer_syscall_post_impl_setresuid(long res, long ruid, long euid,
2086                                              long suid);
2087 void __sanitizer_syscall_pre_impl_setresgid(long rgid, long egid, long sgid);
2088 void __sanitizer_syscall_post_impl_setresgid(long res, long rgid, long egid,
2089                                              long sgid);
2090 void __sanitizer_syscall_pre_impl_setfsuid(long uid);
2091 void __sanitizer_syscall_post_impl_setfsuid(long res, long uid);
2092 void __sanitizer_syscall_pre_impl_setfsgid(long gid);
2093 void __sanitizer_syscall_post_impl_setfsgid(long res, long gid);
2094 void __sanitizer_syscall_pre_impl_setpgid(long pid, long pgid);
2095 void __sanitizer_syscall_post_impl_setpgid(long res, long pid, long pgid);
2096 void __sanitizer_syscall_pre_impl_setsid();
2097 void __sanitizer_syscall_post_impl_setsid(long res);
2098 void __sanitizer_syscall_pre_impl_setgroups(long gidsetsize, long grouplist);
2099 void __sanitizer_syscall_post_impl_setgroups(long res, long gidsetsize,
2100                                              long grouplist);
2101 void __sanitizer_syscall_pre_impl_acct(long name);
2102 void __sanitizer_syscall_post_impl_acct(long res, long name);
2103 void __sanitizer_syscall_pre_impl_capget(long header, long dataptr);
2104 void __sanitizer_syscall_post_impl_capget(long res, long header, long dataptr);
2105 void __sanitizer_syscall_pre_impl_capset(long header, long data);
2106 void __sanitizer_syscall_post_impl_capset(long res, long header, long data);
2107 void __sanitizer_syscall_pre_impl_personality(long personality);
2108 void __sanitizer_syscall_post_impl_personality(long res, long personality);
2109 void __sanitizer_syscall_pre_impl_sigpending(long set);
2110 void __sanitizer_syscall_post_impl_sigpending(long res, long set);
2111 void __sanitizer_syscall_pre_impl_sigprocmask(long how, long set, long oset);
2112 void __sanitizer_syscall_post_impl_sigprocmask(long res, long how, long set,
2113                                                long oset);
2114 void __sanitizer_syscall_pre_impl_getitimer(long which, long value);
2115 void __sanitizer_syscall_post_impl_getitimer(long res, long which, long value);
2116 void __sanitizer_syscall_pre_impl_setitimer(long which, long value,
2117                                             long ovalue);
2118 void __sanitizer_syscall_post_impl_setitimer(long res, long which, long value,
2119                                              long ovalue);
2120 void __sanitizer_syscall_pre_impl_timer_create(long which_clock,
2121                                                long timer_event_spec,
2122                                                long created_timer_id);
2123 void __sanitizer_syscall_post_impl_timer_create(long res, long which_clock,
2124                                                 long timer_event_spec,
2125                                                 long created_timer_id);
2126 void __sanitizer_syscall_pre_impl_timer_gettime(long timer_id, long setting);
2127 void __sanitizer_syscall_post_impl_timer_gettime(long res, long timer_id,
2128                                                  long setting);
2129 void __sanitizer_syscall_pre_impl_timer_getoverrun(long timer_id);
2130 void __sanitizer_syscall_post_impl_timer_getoverrun(long res, long timer_id);
2131 void __sanitizer_syscall_pre_impl_timer_settime(long timer_id, long flags,
2132                                                 long new_setting,
2133                                                 long old_setting);
2134 void __sanitizer_syscall_post_impl_timer_settime(long res, long timer_id,
2135                                                  long flags, long new_setting,
2136                                                  long old_setting);
2137 void __sanitizer_syscall_pre_impl_timer_delete(long timer_id);
2138 void __sanitizer_syscall_post_impl_timer_delete(long res, long timer_id);
2139 void __sanitizer_syscall_pre_impl_clock_settime(long which_clock, long tp);
2140 void __sanitizer_syscall_post_impl_clock_settime(long res, long which_clock,
2141                                                  long tp);
2142 void __sanitizer_syscall_pre_impl_clock_gettime(long which_clock, long tp);
2143 void __sanitizer_syscall_post_impl_clock_gettime(long res, long which_clock,
2144                                                  long tp);
2145 void __sanitizer_syscall_pre_impl_clock_adjtime(long which_clock, long tx);
2146 void __sanitizer_syscall_post_impl_clock_adjtime(long res, long which_clock,
2147                                                  long tx);
2148 void __sanitizer_syscall_pre_impl_clock_getres(long which_clock, long tp);
2149 void __sanitizer_syscall_post_impl_clock_getres(long res, long which_clock,
2150                                                 long tp);
2151 void __sanitizer_syscall_pre_impl_clock_nanosleep(long which_clock, long flags,
2152                                                   long rqtp, long rmtp);
2153 void __sanitizer_syscall_post_impl_clock_nanosleep(long res, long which_clock,
2154                                                    long flags, long rqtp,
2155                                                    long rmtp);
2156 void __sanitizer_syscall_pre_impl_nice(long increment);
2157 void __sanitizer_syscall_post_impl_nice(long res, long increment);
2158 void __sanitizer_syscall_pre_impl_sched_setscheduler(long pid, long policy,
2159                                                      long param);
2160 void __sanitizer_syscall_post_impl_sched_setscheduler(long res, long pid,
2161                                                       long policy, long param);
2162 void __sanitizer_syscall_pre_impl_sched_setparam(long pid, long param);
2163 void __sanitizer_syscall_post_impl_sched_setparam(long res, long pid,
2164                                                   long param);
2165 void __sanitizer_syscall_pre_impl_sched_getscheduler(long pid);
2166 void __sanitizer_syscall_post_impl_sched_getscheduler(long res, long pid);
2167 void __sanitizer_syscall_pre_impl_sched_getparam(long pid, long param);
2168 void __sanitizer_syscall_post_impl_sched_getparam(long res, long pid,
2169                                                   long param);
2170 void __sanitizer_syscall_pre_impl_sched_setaffinity(long pid, long len,
2171                                                     long user_mask_ptr);
2172 void __sanitizer_syscall_post_impl_sched_setaffinity(long res, long pid,
2173                                                      long len,
2174                                                      long user_mask_ptr);
2175 void __sanitizer_syscall_pre_impl_sched_getaffinity(long pid, long len,
2176                                                     long user_mask_ptr);
2177 void __sanitizer_syscall_post_impl_sched_getaffinity(long res, long pid,
2178                                                      long len,
2179                                                      long user_mask_ptr);
2180 void __sanitizer_syscall_pre_impl_sched_yield();
2181 void __sanitizer_syscall_post_impl_sched_yield(long res);
2182 void __sanitizer_syscall_pre_impl_sched_get_priority_max(long policy);
2183 void __sanitizer_syscall_post_impl_sched_get_priority_max(long res,
2184                                                           long policy);
2185 void __sanitizer_syscall_pre_impl_sched_get_priority_min(long policy);
2186 void __sanitizer_syscall_post_impl_sched_get_priority_min(long res,
2187                                                           long policy);
2188 void __sanitizer_syscall_pre_impl_sched_rr_get_interval(long pid,
2189                                                         long interval);
2190 void __sanitizer_syscall_post_impl_sched_rr_get_interval(long res, long pid,
2191                                                          long interval);
2192 void __sanitizer_syscall_pre_impl_setpriority(long which, long who,
2193                                               long niceval);
2194 void __sanitizer_syscall_post_impl_setpriority(long res, long which, long who,
2195                                                long niceval);
2196 void __sanitizer_syscall_pre_impl_getpriority(long which, long who);
2197 void __sanitizer_syscall_post_impl_getpriority(long res, long which, long who);
2198 void __sanitizer_syscall_pre_impl_shutdown(long arg0, long arg1);
2199 void __sanitizer_syscall_post_impl_shutdown(long res, long arg0, long arg1);
2200 void __sanitizer_syscall_pre_impl_reboot(long magic1, long magic2, long cmd,
2201                                          long arg);
2202 void __sanitizer_syscall_post_impl_reboot(long res, long magic1, long magic2,
2203                                           long cmd, long arg);
2204 void __sanitizer_syscall_pre_impl_restart_syscall();
2205 void __sanitizer_syscall_post_impl_restart_syscall(long res);
2206 void __sanitizer_syscall_pre_impl_kexec_load(long entry, long nr_segments,
2207                                              long segments, long flags);
2208 void __sanitizer_syscall_post_impl_kexec_load(long res, long entry,
2209                                               long nr_segments, long segments,
2210                                               long flags);
2211 void __sanitizer_syscall_pre_impl_exit(long error_code);
2212 void __sanitizer_syscall_post_impl_exit(long res, long error_code);
2213 void __sanitizer_syscall_pre_impl_exit_group(long error_code);
2214 void __sanitizer_syscall_post_impl_exit_group(long res, long error_code);
2215 void __sanitizer_syscall_pre_impl_wait4(long pid, long stat_addr, long options,
2216                                         long ru);
2217 void __sanitizer_syscall_post_impl_wait4(long res, long pid, long stat_addr,
2218                                          long options, long ru);
2219 void __sanitizer_syscall_pre_impl_waitid(long which, long pid, long infop,
2220                                          long options, long ru);
2221 void __sanitizer_syscall_post_impl_waitid(long res, long which, long pid,
2222                                           long infop, long options, long ru);
2223 void __sanitizer_syscall_pre_impl_waitpid(long pid, long stat_addr,
2224                                           long options);
2225 void __sanitizer_syscall_post_impl_waitpid(long res, long pid, long stat_addr,
2226                                            long options);
2227 void __sanitizer_syscall_pre_impl_set_tid_address(long tidptr);
2228 void __sanitizer_syscall_post_impl_set_tid_address(long res, long tidptr);
2229 void __sanitizer_syscall_pre_impl_init_module(long umod, long len, long uargs);
2230 void __sanitizer_syscall_post_impl_init_module(long res, long umod, long len,
2231                                                long uargs);
2232 void __sanitizer_syscall_pre_impl_delete_module(long name_user, long flags);
2233 void __sanitizer_syscall_post_impl_delete_module(long res, long name_user,
2234                                                  long flags);
2235 void __sanitizer_syscall_pre_impl_rt_sigprocmask(long how, long set, long oset,
2236                                                  long sigsetsize);
2237 void __sanitizer_syscall_post_impl_rt_sigprocmask(long res, long how, long set,
2238                                                   long oset, long sigsetsize);
2239 void __sanitizer_syscall_pre_impl_rt_sigpending(long set, long sigsetsize);
2240 void __sanitizer_syscall_post_impl_rt_sigpending(long res, long set,
2241                                                  long sigsetsize);
2242 void __sanitizer_syscall_pre_impl_rt_sigtimedwait(long uthese, long uinfo,
2243                                                   long uts, long sigsetsize);
2244 void __sanitizer_syscall_post_impl_rt_sigtimedwait(long res, long uthese,
2245                                                    long uinfo, long uts,
2246                                                    long sigsetsize);
2247 void __sanitizer_syscall_pre_impl_rt_tgsigqueueinfo(long tgid, long pid,
2248                                                     long sig, long uinfo);
2249 void __sanitizer_syscall_post_impl_rt_tgsigqueueinfo(long res, long tgid,
2250                                                      long pid, long sig,
2251                                                      long uinfo);
2252 void __sanitizer_syscall_pre_impl_kill(long pid, long sig);
2253 void __sanitizer_syscall_post_impl_kill(long res, long pid, long sig);
2254 void __sanitizer_syscall_pre_impl_tgkill(long tgid, long pid, long sig);
2255 void __sanitizer_syscall_post_impl_tgkill(long res, long tgid, long pid,
2256                                           long sig);
2257 void __sanitizer_syscall_pre_impl_tkill(long pid, long sig);
2258 void __sanitizer_syscall_post_impl_tkill(long res, long pid, long sig);
2259 void __sanitizer_syscall_pre_impl_rt_sigqueueinfo(long pid, long sig,
2260                                                   long uinfo);
2261 void __sanitizer_syscall_post_impl_rt_sigqueueinfo(long res, long pid, long sig,
2262                                                    long uinfo);
2263 void __sanitizer_syscall_pre_impl_sgetmask();
2264 void __sanitizer_syscall_post_impl_sgetmask(long res);
2265 void __sanitizer_syscall_pre_impl_ssetmask(long newmask);
2266 void __sanitizer_syscall_post_impl_ssetmask(long res, long newmask);
2267 void __sanitizer_syscall_pre_impl_signal(long sig, long handler);
2268 void __sanitizer_syscall_post_impl_signal(long res, long sig, long handler);
2269 void __sanitizer_syscall_pre_impl_pause();
2270 void __sanitizer_syscall_post_impl_pause(long res);
2271 void __sanitizer_syscall_pre_impl_sync();
2272 void __sanitizer_syscall_post_impl_sync(long res);
2273 void __sanitizer_syscall_pre_impl_fsync(long fd);
2274 void __sanitizer_syscall_post_impl_fsync(long res, long fd);
2275 void __sanitizer_syscall_pre_impl_fdatasync(long fd);
2276 void __sanitizer_syscall_post_impl_fdatasync(long res, long fd);
2277 void __sanitizer_syscall_pre_impl_bdflush(long func, long data);
2278 void __sanitizer_syscall_post_impl_bdflush(long res, long func, long data);
2279 void __sanitizer_syscall_pre_impl_mount(long dev_name, long dir_name, long type,
2280                                         long flags, long data);
2281 void __sanitizer_syscall_post_impl_mount(long res, long dev_name, long dir_name,
2282                                          long type, long flags, long data);
2283 void __sanitizer_syscall_pre_impl_umount(long name, long flags);
2284 void __sanitizer_syscall_post_impl_umount(long res, long name, long flags);
2285 void __sanitizer_syscall_pre_impl_oldumount(long name);
2286 void __sanitizer_syscall_post_impl_oldumount(long res, long name);
2287 void __sanitizer_syscall_pre_impl_truncate(long path, long length);
2288 void __sanitizer_syscall_post_impl_truncate(long res, long path, long length);
2289 void __sanitizer_syscall_pre_impl_ftruncate(long fd, long length);
2290 void __sanitizer_syscall_post_impl_ftruncate(long res, long fd, long length);
2291 void __sanitizer_syscall_pre_impl_stat(long filename, long statbuf);
2292 void __sanitizer_syscall_post_impl_stat(long res, long filename, long statbuf);
2293 void __sanitizer_syscall_pre_impl_statfs(long path, long buf);
2294 void __sanitizer_syscall_post_impl_statfs(long res, long path, long buf);
2295 void __sanitizer_syscall_pre_impl_statfs64(long path, long sz, long buf);
2296 void __sanitizer_syscall_post_impl_statfs64(long res, long path, long sz,
2297                                             long buf);
2298 void __sanitizer_syscall_pre_impl_fstatfs(long fd, long buf);
2299 void __sanitizer_syscall_post_impl_fstatfs(long res, long fd, long buf);
2300 void __sanitizer_syscall_pre_impl_fstatfs64(long fd, long sz, long buf);
2301 void __sanitizer_syscall_post_impl_fstatfs64(long res, long fd, long sz,
2302                                              long buf);
2303 void __sanitizer_syscall_pre_impl_lstat(long filename, long statbuf);
2304 void __sanitizer_syscall_post_impl_lstat(long res, long filename, long statbuf);
2305 void __sanitizer_syscall_pre_impl_fstat(long fd, long statbuf);
2306 void __sanitizer_syscall_post_impl_fstat(long res, long fd, long statbuf);
2307 void __sanitizer_syscall_pre_impl_newstat(long filename, long statbuf);
2308 void __sanitizer_syscall_post_impl_newstat(long res, long filename,
2309                                            long statbuf);
2310 void __sanitizer_syscall_pre_impl_newlstat(long filename, long statbuf);
2311 void __sanitizer_syscall_post_impl_newlstat(long res, long filename,
2312                                             long statbuf);
2313 void __sanitizer_syscall_pre_impl_newfstat(long fd, long statbuf);
2314 void __sanitizer_syscall_post_impl_newfstat(long res, long fd, long statbuf);
2315 void __sanitizer_syscall_pre_impl_ustat(long dev, long ubuf);
2316 void __sanitizer_syscall_post_impl_ustat(long res, long dev, long ubuf);
2317 void __sanitizer_syscall_pre_impl_stat64(long filename, long statbuf);
2318 void __sanitizer_syscall_post_impl_stat64(long res, long filename,
2319                                           long statbuf);
2320 void __sanitizer_syscall_pre_impl_fstat64(long fd, long statbuf);
2321 void __sanitizer_syscall_post_impl_fstat64(long res, long fd, long statbuf);
2322 void __sanitizer_syscall_pre_impl_lstat64(long filename, long statbuf);
2323 void __sanitizer_syscall_post_impl_lstat64(long res, long filename,
2324                                            long statbuf);
2325 void __sanitizer_syscall_pre_impl_setxattr(long path, long name, long value,
2326                                            long size, long flags);
2327 void __sanitizer_syscall_post_impl_setxattr(long res, long path, long name,
2328                                             long value, long size, long flags);
2329 void __sanitizer_syscall_pre_impl_lsetxattr(long path, long name, long value,
2330                                             long size, long flags);
2331 void __sanitizer_syscall_post_impl_lsetxattr(long res, long path, long name,
2332                                              long value, long size, long flags);
2333 void __sanitizer_syscall_pre_impl_fsetxattr(long fd, long name, long value,
2334                                             long size, long flags);
2335 void __sanitizer_syscall_post_impl_fsetxattr(long res, long fd, long name,
2336                                              long value, long size, long flags);
2337 void __sanitizer_syscall_pre_impl_getxattr(long path, long name, long value,
2338                                            long size);
2339 void __sanitizer_syscall_post_impl_getxattr(long res, long path, long name,
2340                                             long value, long size);
2341 void __sanitizer_syscall_pre_impl_lgetxattr(long path, long name, long value,
2342                                             long size);
2343 void __sanitizer_syscall_post_impl_lgetxattr(long res, long path, long name,
2344                                              long value, long size);
2345 void __sanitizer_syscall_pre_impl_fgetxattr(long fd, long name, long value,
2346                                             long size);
2347 void __sanitizer_syscall_post_impl_fgetxattr(long res, long fd, long name,
2348                                              long value, long size);
2349 void __sanitizer_syscall_pre_impl_listxattr(long path, long list, long size);
2350 void __sanitizer_syscall_post_impl_listxattr(long res, long path, long list,
2351                                              long size);
2352 void __sanitizer_syscall_pre_impl_llistxattr(long path, long list, long size);
2353 void __sanitizer_syscall_post_impl_llistxattr(long res, long path, long list,
2354                                               long size);
2355 void __sanitizer_syscall_pre_impl_flistxattr(long fd, long list, long size);
2356 void __sanitizer_syscall_post_impl_flistxattr(long res, long fd, long list,
2357                                               long size);
2358 void __sanitizer_syscall_pre_impl_removexattr(long path, long name);
2359 void __sanitizer_syscall_post_impl_removexattr(long res, long path, long name);
2360 void __sanitizer_syscall_pre_impl_lremovexattr(long path, long name);
2361 void __sanitizer_syscall_post_impl_lremovexattr(long res, long path, long name);
2362 void __sanitizer_syscall_pre_impl_fremovexattr(long fd, long name);
2363 void __sanitizer_syscall_post_impl_fremovexattr(long res, long fd, long name);
2364 void __sanitizer_syscall_pre_impl_brk(long brk);
2365 void __sanitizer_syscall_post_impl_brk(long res, long brk);
2366 void __sanitizer_syscall_pre_impl_mprotect(long start, long len, long prot);
2367 void __sanitizer_syscall_post_impl_mprotect(long res, long start, long len,
2368                                             long prot);
2369 void __sanitizer_syscall_pre_impl_mremap(long addr, long old_len, long new_len,
2370                                          long flags, long new_addr);
2371 void __sanitizer_syscall_post_impl_mremap(long res, long addr, long old_len,
2372                                           long new_len, long flags,
2373                                           long new_addr);
2374 void __sanitizer_syscall_pre_impl_remap_file_pages(long start, long size,
2375                                                    long prot, long pgoff,
2376                                                    long flags);
2377 void __sanitizer_syscall_post_impl_remap_file_pages(long res, long start,
2378                                                     long size, long prot,
2379                                                     long pgoff, long flags);
2380 void __sanitizer_syscall_pre_impl_msync(long start, long len, long flags);
2381 void __sanitizer_syscall_post_impl_msync(long res, long start, long len,
2382                                          long flags);
2383 void __sanitizer_syscall_pre_impl_munmap(long addr, long len);
2384 void __sanitizer_syscall_post_impl_munmap(long res, long addr, long len);
2385 void __sanitizer_syscall_pre_impl_mlock(long start, long len);
2386 void __sanitizer_syscall_post_impl_mlock(long res, long start, long len);
2387 void __sanitizer_syscall_pre_impl_munlock(long start, long len);
2388 void __sanitizer_syscall_post_impl_munlock(long res, long start, long len);
2389 void __sanitizer_syscall_pre_impl_mlockall(long flags);
2390 void __sanitizer_syscall_post_impl_mlockall(long res, long flags);
2391 void __sanitizer_syscall_pre_impl_munlockall();
2392 void __sanitizer_syscall_post_impl_munlockall(long res);
2393 void __sanitizer_syscall_pre_impl_madvise(long start, long len, long behavior);
2394 void __sanitizer_syscall_post_impl_madvise(long res, long start, long len,
2395                                            long behavior);
2396 void __sanitizer_syscall_pre_impl_mincore(long start, long len, long vec);
2397 void __sanitizer_syscall_post_impl_mincore(long res, long start, long len,
2398                                            long vec);
2399 void __sanitizer_syscall_pre_impl_pivot_root(long new_root, long put_old);
2400 void __sanitizer_syscall_post_impl_pivot_root(long res, long new_root,
2401                                               long put_old);
2402 void __sanitizer_syscall_pre_impl_chroot(long filename);
2403 void __sanitizer_syscall_post_impl_chroot(long res, long filename);
2404 void __sanitizer_syscall_pre_impl_mknod(long filename, long mode, long dev);
2405 void __sanitizer_syscall_post_impl_mknod(long res, long filename, long mode,
2406                                          long dev);
2407 void __sanitizer_syscall_pre_impl_link(long oldname, long newname);
2408 void __sanitizer_syscall_post_impl_link(long res, long oldname, long newname);
2409 void __sanitizer_syscall_pre_impl_symlink(long old, long new_);
2410 void __sanitizer_syscall_post_impl_symlink(long res, long old, long new_);
2411 void __sanitizer_syscall_pre_impl_unlink(long pathname);
2412 void __sanitizer_syscall_post_impl_unlink(long res, long pathname);
2413 void __sanitizer_syscall_pre_impl_rename(long oldname, long newname);
2414 void __sanitizer_syscall_post_impl_rename(long res, long oldname, long newname);
2415 void __sanitizer_syscall_pre_impl_chmod(long filename, long mode);
2416 void __sanitizer_syscall_post_impl_chmod(long res, long filename, long mode);
2417 void __sanitizer_syscall_pre_impl_fchmod(long fd, long mode);
2418 void __sanitizer_syscall_post_impl_fchmod(long res, long fd, long mode);
2419 void __sanitizer_syscall_pre_impl_fcntl(long fd, long cmd, long arg);
2420 void __sanitizer_syscall_post_impl_fcntl(long res, long fd, long cmd, long arg);
2421 void __sanitizer_syscall_pre_impl_fcntl64(long fd, long cmd, long arg);
2422 void __sanitizer_syscall_post_impl_fcntl64(long res, long fd, long cmd,
2423                                            long arg);
2424 void __sanitizer_syscall_pre_impl_pipe(long fildes);
2425 void __sanitizer_syscall_post_impl_pipe(long res, long fildes);
2426 void __sanitizer_syscall_pre_impl_pipe2(long fildes, long flags);
2427 void __sanitizer_syscall_post_impl_pipe2(long res, long fildes, long flags);
2428 void __sanitizer_syscall_pre_impl_dup(long fildes);
2429 void __sanitizer_syscall_post_impl_dup(long res, long fildes);
2430 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd);
2431 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd);
2432 void __sanitizer_syscall_pre_impl_dup3(long oldfd, long newfd, long flags);
2433 void __sanitizer_syscall_post_impl_dup3(long res, long oldfd, long newfd,
2434                                         long flags);
2435 void __sanitizer_syscall_pre_impl_ioperm(long from, long num, long on);
2436 void __sanitizer_syscall_post_impl_ioperm(long res, long from, long num,
2437                                           long on);
2438 void __sanitizer_syscall_pre_impl_ioctl(long fd, long cmd, long arg);
2439 void __sanitizer_syscall_post_impl_ioctl(long res, long fd, long cmd, long arg);
2440 void __sanitizer_syscall_pre_impl_flock(long fd, long cmd);
2441 void __sanitizer_syscall_post_impl_flock(long res, long fd, long cmd);
2442 void __sanitizer_syscall_pre_impl_io_setup(long nr_reqs, long ctx);
2443 void __sanitizer_syscall_post_impl_io_setup(long res, long nr_reqs, long ctx);
2444 void __sanitizer_syscall_pre_impl_io_destroy(long ctx);
2445 void __sanitizer_syscall_post_impl_io_destroy(long res, long ctx);
2446 void __sanitizer_syscall_pre_impl_io_getevents(long ctx_id, long min_nr,
2447                                                long nr, long events,
2448                                                long timeout);
2449 void __sanitizer_syscall_post_impl_io_getevents(long res, long ctx_id,
2450                                                 long min_nr, long nr,
2451                                                 long events, long timeout);
2452 void __sanitizer_syscall_pre_impl_io_submit(long ctx_id, long arg1, long arg2);
2453 void __sanitizer_syscall_post_impl_io_submit(long res, long ctx_id, long arg1,
2454                                              long arg2);
2455 void __sanitizer_syscall_pre_impl_io_cancel(long ctx_id, long iocb,
2456                                             long result);
2457 void __sanitizer_syscall_post_impl_io_cancel(long res, long ctx_id, long iocb,
2458                                              long result);
2459 void __sanitizer_syscall_pre_impl_sendfile(long out_fd, long in_fd, long offset,
2460                                            long count);
2461 void __sanitizer_syscall_post_impl_sendfile(long res, long out_fd, long in_fd,
2462                                             long offset, long count);
2463 void __sanitizer_syscall_pre_impl_sendfile64(long out_fd, long in_fd,
2464                                              long offset, long count);
2465 void __sanitizer_syscall_post_impl_sendfile64(long res, long out_fd, long in_fd,
2466                                               long offset, long count);
2467 void __sanitizer_syscall_pre_impl_readlink(long path, long buf, long bufsiz);
2468 void __sanitizer_syscall_post_impl_readlink(long res, long path, long buf,
2469                                             long bufsiz);
2470 void __sanitizer_syscall_pre_impl_creat(long pathname, long mode);
2471 void __sanitizer_syscall_post_impl_creat(long res, long pathname, long mode);
2472 void __sanitizer_syscall_pre_impl_open(long filename, long flags, long mode);
2473 void __sanitizer_syscall_post_impl_open(long res, long filename, long flags,
2474                                         long mode);
2475 void __sanitizer_syscall_pre_impl_close(long fd);
2476 void __sanitizer_syscall_post_impl_close(long res, long fd);
2477 void __sanitizer_syscall_pre_impl_access(long filename, long mode);
2478 void __sanitizer_syscall_post_impl_access(long res, long filename, long mode);
2479 void __sanitizer_syscall_pre_impl_vhangup();
2480 void __sanitizer_syscall_post_impl_vhangup(long res);
2481 void __sanitizer_syscall_pre_impl_chown(long filename, long user, long group);
2482 void __sanitizer_syscall_post_impl_chown(long res, long filename, long user,
2483                                          long group);
2484 void __sanitizer_syscall_pre_impl_lchown(long filename, long user, long group);
2485 void __sanitizer_syscall_post_impl_lchown(long res, long filename, long user,
2486                                           long group);
2487 void __sanitizer_syscall_pre_impl_fchown(long fd, long user, long group);
2488 void __sanitizer_syscall_post_impl_fchown(long res, long fd, long user,
2489                                           long group);
2490 void __sanitizer_syscall_pre_impl_chown16(long filename, long user, long group);
2491 void __sanitizer_syscall_post_impl_chown16(long res, long filename, long user,
2492                                            long group);
2493 void __sanitizer_syscall_pre_impl_lchown16(long filename, long user,
2494                                            long group);
2495 void __sanitizer_syscall_post_impl_lchown16(long res, long filename, long user,
2496                                             long group);
2497 void __sanitizer_syscall_pre_impl_fchown16(long fd, long user, long group);
2498 void __sanitizer_syscall_post_impl_fchown16(long res, long fd, long user,
2499                                             long group);
2500 void __sanitizer_syscall_pre_impl_setregid16(long rgid, long egid);
2501 void __sanitizer_syscall_post_impl_setregid16(long res, long rgid, long egid);
2502 void __sanitizer_syscall_pre_impl_setgid16(long gid);
2503 void __sanitizer_syscall_post_impl_setgid16(long res, long gid);
2504 void __sanitizer_syscall_pre_impl_setreuid16(long ruid, long euid);
2505 void __sanitizer_syscall_post_impl_setreuid16(long res, long ruid, long euid);
2506 void __sanitizer_syscall_pre_impl_setuid16(long uid);
2507 void __sanitizer_syscall_post_impl_setuid16(long res, long uid);
2508 void __sanitizer_syscall_pre_impl_setresuid16(long ruid, long euid, long suid);
2509 void __sanitizer_syscall_post_impl_setresuid16(long res, long ruid, long euid,
2510                                                long suid);
2511 void __sanitizer_syscall_pre_impl_getresuid16(long ruid, long euid, long suid);
2512 void __sanitizer_syscall_post_impl_getresuid16(long res, long ruid, long euid,
2513                                                long suid);
2514 void __sanitizer_syscall_pre_impl_setresgid16(long rgid, long egid, long sgid);
2515 void __sanitizer_syscall_post_impl_setresgid16(long res, long rgid, long egid,
2516                                                long sgid);
2517 void __sanitizer_syscall_pre_impl_getresgid16(long rgid, long egid, long sgid);
2518 void __sanitizer_syscall_post_impl_getresgid16(long res, long rgid, long egid,
2519                                                long sgid);
2520 void __sanitizer_syscall_pre_impl_setfsuid16(long uid);
2521 void __sanitizer_syscall_post_impl_setfsuid16(long res, long uid);
2522 void __sanitizer_syscall_pre_impl_setfsgid16(long gid);
2523 void __sanitizer_syscall_post_impl_setfsgid16(long res, long gid);
2524 void __sanitizer_syscall_pre_impl_getgroups16(long gidsetsize, long grouplist);
2525 void __sanitizer_syscall_post_impl_getgroups16(long res, long gidsetsize,
2526                                                long grouplist);
2527 void __sanitizer_syscall_pre_impl_setgroups16(long gidsetsize, long grouplist);
2528 void __sanitizer_syscall_post_impl_setgroups16(long res, long gidsetsize,
2529                                                long grouplist);
2530 void __sanitizer_syscall_pre_impl_getuid16();
2531 void __sanitizer_syscall_post_impl_getuid16(long res);
2532 void __sanitizer_syscall_pre_impl_geteuid16();
2533 void __sanitizer_syscall_post_impl_geteuid16(long res);
2534 void __sanitizer_syscall_pre_impl_getgid16();
2535 void __sanitizer_syscall_post_impl_getgid16(long res);
2536 void __sanitizer_syscall_pre_impl_getegid16();
2537 void __sanitizer_syscall_post_impl_getegid16(long res);
2538 void __sanitizer_syscall_pre_impl_utime(long filename, long times);
2539 void __sanitizer_syscall_post_impl_utime(long res, long filename, long times);
2540 void __sanitizer_syscall_pre_impl_utimes(long filename, long utimes);
2541 void __sanitizer_syscall_post_impl_utimes(long res, long filename, long utimes);
2542 void __sanitizer_syscall_pre_impl_lseek(long fd, long offset, long origin);
2543 void __sanitizer_syscall_post_impl_lseek(long res, long fd, long offset,
2544                                          long origin);
2545 void __sanitizer_syscall_pre_impl_llseek(long fd, long offset_high,
2546                                          long offset_low, long result,
2547                                          long origin);
2548 void __sanitizer_syscall_post_impl_llseek(long res, long fd, long offset_high,
2549                                           long offset_low, long result,
2550                                           long origin);
2551 void __sanitizer_syscall_pre_impl_read(long fd, long buf, long count);
2552 void __sanitizer_syscall_post_impl_read(long res, long fd, long buf,
2553                                         long count);
2554 void __sanitizer_syscall_pre_impl_readv(long fd, long vec, long vlen);
2555 void __sanitizer_syscall_post_impl_readv(long res, long fd, long vec,
2556                                          long vlen);
2557 void __sanitizer_syscall_pre_impl_write(long fd, long buf, long count);
2558 void __sanitizer_syscall_post_impl_write(long res, long fd, long buf,
2559                                          long count);
2560 void __sanitizer_syscall_pre_impl_writev(long fd, long vec, long vlen);
2561 void __sanitizer_syscall_post_impl_writev(long res, long fd, long vec,
2562                                           long vlen);
2563 
2564 #ifdef _LP64
2565 void __sanitizer_syscall_pre_impl_pread64(long fd, long buf, long count,
2566                                           long pos);
2567 void __sanitizer_syscall_post_impl_pread64(long res, long fd, long buf,
2568                                            long count, long pos);
2569 void __sanitizer_syscall_pre_impl_pwrite64(long fd, long buf, long count,
2570                                            long pos);
2571 void __sanitizer_syscall_post_impl_pwrite64(long res, long fd, long buf,
2572                                             long count, long pos);
2573 #else
2574 void __sanitizer_syscall_pre_impl_pread64(long fd, long buf, long count,
2575                                           long pos0, long pos1);
2576 void __sanitizer_syscall_post_impl_pread64(long res, long fd, long buf,
2577                                            long count, long pos0, long pos1);
2578 void __sanitizer_syscall_pre_impl_pwrite64(long fd, long buf, long count,
2579                                            long pos0, long pos1);
2580 void __sanitizer_syscall_post_impl_pwrite64(long res, long fd, long buf,
2581                                             long count, long pos0, long pos1);
2582 #endif
2583 
2584 void __sanitizer_syscall_pre_impl_preadv(long fd, long vec, long vlen,
2585                                          long pos_l, long pos_h);
2586 void __sanitizer_syscall_post_impl_preadv(long res, long fd, long vec,
2587                                           long vlen, long pos_l, long pos_h);
2588 void __sanitizer_syscall_pre_impl_pwritev(long fd, long vec, long vlen,
2589                                           long pos_l, long pos_h);
2590 void __sanitizer_syscall_post_impl_pwritev(long res, long fd, long vec,
2591                                            long vlen, long pos_l, long pos_h);
2592 void __sanitizer_syscall_pre_impl_getcwd(long buf, long size);
2593 void __sanitizer_syscall_post_impl_getcwd(long res, long buf, long size);
2594 void __sanitizer_syscall_pre_impl_mkdir(long pathname, long mode);
2595 void __sanitizer_syscall_post_impl_mkdir(long res, long pathname, long mode);
2596 void __sanitizer_syscall_pre_impl_chdir(long filename);
2597 void __sanitizer_syscall_post_impl_chdir(long res, long filename);
2598 void __sanitizer_syscall_pre_impl_fchdir(long fd);
2599 void __sanitizer_syscall_post_impl_fchdir(long res, long fd);
2600 void __sanitizer_syscall_pre_impl_rmdir(long pathname);
2601 void __sanitizer_syscall_post_impl_rmdir(long res, long pathname);
2602 void __sanitizer_syscall_pre_impl_lookup_dcookie(long cookie64, long buf,
2603                                                  long len);
2604 void __sanitizer_syscall_post_impl_lookup_dcookie(long res, long cookie64,
2605                                                   long buf, long len);
2606 void __sanitizer_syscall_pre_impl_quotactl(long cmd, long special, long id,
2607                                            long addr);
2608 void __sanitizer_syscall_post_impl_quotactl(long res, long cmd, long special,
2609                                             long id, long addr);
2610 void __sanitizer_syscall_pre_impl_getdents(long fd, long dirent, long count);
2611 void __sanitizer_syscall_post_impl_getdents(long res, long fd, long dirent,
2612                                             long count);
2613 void __sanitizer_syscall_pre_impl_getdents64(long fd, long dirent, long count);
2614 void __sanitizer_syscall_post_impl_getdents64(long res, long fd, long dirent,
2615                                               long count);
2616 void __sanitizer_syscall_pre_impl_setsockopt(long fd, long level, long optname,
2617                                              long optval, long optlen);
2618 void __sanitizer_syscall_post_impl_setsockopt(long res, long fd, long level,
2619                                               long optname, long optval,
2620                                               long optlen);
2621 void __sanitizer_syscall_pre_impl_getsockopt(long fd, long level, long optname,
2622                                              long optval, long optlen);
2623 void __sanitizer_syscall_post_impl_getsockopt(long res, long fd, long level,
2624                                               long optname, long optval,
2625                                               long optlen);
2626 void __sanitizer_syscall_pre_impl_bind(long arg0, long arg1, long arg2);
2627 void __sanitizer_syscall_post_impl_bind(long res, long arg0, long arg1,
2628                                         long arg2);
2629 void __sanitizer_syscall_pre_impl_connect(long arg0, long arg1, long arg2);
2630 void __sanitizer_syscall_post_impl_connect(long res, long arg0, long arg1,
2631                                            long arg2);
2632 void __sanitizer_syscall_pre_impl_accept(long arg0, long arg1, long arg2);
2633 void __sanitizer_syscall_post_impl_accept(long res, long arg0, long arg1,
2634                                           long arg2);
2635 void __sanitizer_syscall_pre_impl_accept4(long arg0, long arg1, long arg2,
2636                                           long arg3);
2637 void __sanitizer_syscall_post_impl_accept4(long res, long arg0, long arg1,
2638                                            long arg2, long arg3);
2639 void __sanitizer_syscall_pre_impl_getsockname(long arg0, long arg1, long arg2);
2640 void __sanitizer_syscall_post_impl_getsockname(long res, long arg0, long arg1,
2641                                                long arg2);
2642 void __sanitizer_syscall_pre_impl_getpeername(long arg0, long arg1, long arg2);
2643 void __sanitizer_syscall_post_impl_getpeername(long res, long arg0, long arg1,
2644                                                long arg2);
2645 void __sanitizer_syscall_pre_impl_send(long arg0, long arg1, long arg2,
2646                                        long arg3);
2647 void __sanitizer_syscall_post_impl_send(long res, long arg0, long arg1,
2648                                         long arg2, long arg3);
2649 void __sanitizer_syscall_pre_impl_sendto(long arg0, long arg1, long arg2,
2650                                          long arg3, long arg4, long arg5);
2651 void __sanitizer_syscall_post_impl_sendto(long res, long arg0, long arg1,
2652                                           long arg2, long arg3, long arg4,
2653                                           long arg5);
2654 void __sanitizer_syscall_pre_impl_sendmsg(long fd, long msg, long flags);
2655 void __sanitizer_syscall_post_impl_sendmsg(long res, long fd, long msg,
2656                                            long flags);
2657 void __sanitizer_syscall_pre_impl_sendmmsg(long fd, long msg, long vlen,
2658                                            long flags);
2659 void __sanitizer_syscall_post_impl_sendmmsg(long res, long fd, long msg,
2660                                             long vlen, long flags);
2661 void __sanitizer_syscall_pre_impl_recv(long arg0, long arg1, long arg2,
2662                                        long arg3);
2663 void __sanitizer_syscall_post_impl_recv(long res, long arg0, long arg1,
2664                                         long arg2, long arg3);
2665 void __sanitizer_syscall_pre_impl_recvfrom(long arg0, long arg1, long arg2,
2666                                            long arg3, long arg4, long arg5);
2667 void __sanitizer_syscall_post_impl_recvfrom(long res, long arg0, long arg1,
2668                                             long arg2, long arg3, long arg4,
2669                                             long arg5);
2670 void __sanitizer_syscall_pre_impl_recvmsg(long fd, long msg, long flags);
2671 void __sanitizer_syscall_post_impl_recvmsg(long res, long fd, long msg,
2672                                            long flags);
2673 void __sanitizer_syscall_pre_impl_recvmmsg(long fd, long msg, long vlen,
2674                                            long flags, long timeout);
2675 void __sanitizer_syscall_post_impl_recvmmsg(long res, long fd, long msg,
2676                                             long vlen, long flags,
2677                                             long timeout);
2678 void __sanitizer_syscall_pre_impl_socket(long arg0, long arg1, long arg2);
2679 void __sanitizer_syscall_post_impl_socket(long res, long arg0, long arg1,
2680                                           long arg2);
2681 void __sanitizer_syscall_pre_impl_socketpair(long arg0, long arg1, long arg2,
2682                                              long arg3);
2683 void __sanitizer_syscall_post_impl_socketpair(long res, long arg0, long arg1,
2684                                               long arg2, long arg3);
2685 void __sanitizer_syscall_pre_impl_socketcall(long call, long args);
2686 void __sanitizer_syscall_post_impl_socketcall(long res, long call, long args);
2687 void __sanitizer_syscall_pre_impl_listen(long arg0, long arg1);
2688 void __sanitizer_syscall_post_impl_listen(long res, long arg0, long arg1);
2689 void __sanitizer_syscall_pre_impl_poll(long ufds, long nfds, long timeout);
2690 void __sanitizer_syscall_post_impl_poll(long res, long ufds, long nfds,
2691                                         long timeout);
2692 void __sanitizer_syscall_pre_impl_select(long n, long inp, long outp, long exp,
2693                                          long tvp);
2694 void __sanitizer_syscall_post_impl_select(long res, long n, long inp, long outp,
2695                                           long exp, long tvp);
2696 void __sanitizer_syscall_pre_impl_old_select(long arg);
2697 void __sanitizer_syscall_post_impl_old_select(long res, long arg);
2698 void __sanitizer_syscall_pre_impl_epoll_create(long size);
2699 void __sanitizer_syscall_post_impl_epoll_create(long res, long size);
2700 void __sanitizer_syscall_pre_impl_epoll_create1(long flags);
2701 void __sanitizer_syscall_post_impl_epoll_create1(long res, long flags);
2702 void __sanitizer_syscall_pre_impl_epoll_ctl(long epfd, long op, long fd,
2703                                             long event);
2704 void __sanitizer_syscall_post_impl_epoll_ctl(long res, long epfd, long op,
2705                                              long fd, long event);
2706 void __sanitizer_syscall_pre_impl_epoll_wait(long epfd, long events,
2707                                              long maxevents, long timeout);
2708 void __sanitizer_syscall_post_impl_epoll_wait(long res, long epfd, long events,
2709                                               long maxevents, long timeout);
2710 void __sanitizer_syscall_pre_impl_epoll_pwait(long epfd, long events,
2711                                               long maxevents, long timeout,
2712                                               long sigmask, long sigsetsize);
2713 void __sanitizer_syscall_post_impl_epoll_pwait(long res, long epfd, long events,
2714                                                long maxevents, long timeout,
2715                                                long sigmask, long sigsetsize);
2716 void __sanitizer_syscall_pre_impl_epoll_pwait2(long epfd, long events,
2717                                                long maxevents, long timeout,
2718                                                long sigmask, long sigsetsize);
2719 void __sanitizer_syscall_post_impl_epoll_pwait2(long res, long epfd,
2720                                                 long events, long maxevents,
2721                                                 long timeout, long sigmask,
2722                                                 long sigsetsize);
2723 void __sanitizer_syscall_pre_impl_gethostname(long name, long len);
2724 void __sanitizer_syscall_post_impl_gethostname(long res, long name, long len);
2725 void __sanitizer_syscall_pre_impl_sethostname(long name, long len);
2726 void __sanitizer_syscall_post_impl_sethostname(long res, long name, long len);
2727 void __sanitizer_syscall_pre_impl_setdomainname(long name, long len);
2728 void __sanitizer_syscall_post_impl_setdomainname(long res, long name, long len);
2729 void __sanitizer_syscall_pre_impl_newuname(long name);
2730 void __sanitizer_syscall_post_impl_newuname(long res, long name);
2731 void __sanitizer_syscall_pre_impl_uname(long arg0);
2732 void __sanitizer_syscall_post_impl_uname(long res, long arg0);
2733 void __sanitizer_syscall_pre_impl_olduname(long arg0);
2734 void __sanitizer_syscall_post_impl_olduname(long res, long arg0);
2735 void __sanitizer_syscall_pre_impl_getrlimit(long resource, long rlim);
2736 void __sanitizer_syscall_post_impl_getrlimit(long res, long resource,
2737                                              long rlim);
2738 void __sanitizer_syscall_pre_impl_old_getrlimit(long resource, long rlim);
2739 void __sanitizer_syscall_post_impl_old_getrlimit(long res, long resource,
2740                                                  long rlim);
2741 void __sanitizer_syscall_pre_impl_setrlimit(long resource, long rlim);
2742 void __sanitizer_syscall_post_impl_setrlimit(long res, long resource,
2743                                              long rlim);
2744 void __sanitizer_syscall_pre_impl_prlimit64(long pid, long resource,
2745                                             long new_rlim, long old_rlim);
2746 void __sanitizer_syscall_post_impl_prlimit64(long res, long pid, long resource,
2747                                              long new_rlim, long old_rlim);
2748 void __sanitizer_syscall_pre_impl_getrusage(long who, long ru);
2749 void __sanitizer_syscall_post_impl_getrusage(long res, long who, long ru);
2750 void __sanitizer_syscall_pre_impl_umask(long mask);
2751 void __sanitizer_syscall_post_impl_umask(long res, long mask);
2752 void __sanitizer_syscall_pre_impl_msgget(long key, long msgflg);
2753 void __sanitizer_syscall_post_impl_msgget(long res, long key, long msgflg);
2754 void __sanitizer_syscall_pre_impl_msgsnd(long msqid, long msgp, long msgsz,
2755                                          long msgflg);
2756 void __sanitizer_syscall_post_impl_msgsnd(long res, long msqid, long msgp,
2757                                           long msgsz, long msgflg);
2758 void __sanitizer_syscall_pre_impl_msgrcv(long msqid, long msgp, long msgsz,
2759                                          long msgtyp, long msgflg);
2760 void __sanitizer_syscall_post_impl_msgrcv(long res, long msqid, long msgp,
2761                                           long msgsz, long msgtyp, long msgflg);
2762 void __sanitizer_syscall_pre_impl_msgctl(long msqid, long cmd, long buf);
2763 void __sanitizer_syscall_post_impl_msgctl(long res, long msqid, long cmd,
2764                                           long buf);
2765 void __sanitizer_syscall_pre_impl_semget(long key, long nsems, long semflg);
2766 void __sanitizer_syscall_post_impl_semget(long res, long key, long nsems,
2767                                           long semflg);
2768 void __sanitizer_syscall_pre_impl_semop(long semid, long sops, long nsops);
2769 void __sanitizer_syscall_post_impl_semop(long res, long semid, long sops,
2770                                          long nsops);
2771 void __sanitizer_syscall_pre_impl_semctl(long semid, long semnum, long cmd,
2772                                          long arg);
2773 void __sanitizer_syscall_post_impl_semctl(long res, long semid, long semnum,
2774                                           long cmd, long arg);
2775 void __sanitizer_syscall_pre_impl_semtimedop(long semid, long sops, long nsops,
2776                                              long timeout);
2777 void __sanitizer_syscall_post_impl_semtimedop(long res, long semid, long sops,
2778                                               long nsops, long timeout);
2779 void __sanitizer_syscall_pre_impl_shmat(long shmid, long shmaddr, long shmflg);
2780 void __sanitizer_syscall_post_impl_shmat(long res, long shmid, long shmaddr,
2781                                          long shmflg);
2782 void __sanitizer_syscall_pre_impl_shmget(long key, long size, long flag);
2783 void __sanitizer_syscall_post_impl_shmget(long res, long key, long size,
2784                                           long flag);
2785 void __sanitizer_syscall_pre_impl_shmdt(long shmaddr);
2786 void __sanitizer_syscall_post_impl_shmdt(long res, long shmaddr);
2787 void __sanitizer_syscall_pre_impl_shmctl(long shmid, long cmd, long buf);
2788 void __sanitizer_syscall_post_impl_shmctl(long res, long shmid, long cmd,
2789                                           long buf);
2790 void __sanitizer_syscall_pre_impl_ipc(long call, long first, long second,
2791                                       long third, long ptr, long fifth);
2792 void __sanitizer_syscall_post_impl_ipc(long res, long call, long first,
2793                                        long second, long third, long ptr,
2794                                        long fifth);
2795 void __sanitizer_syscall_pre_impl_mq_open(long name, long oflag, long mode,
2796                                           long attr);
2797 void __sanitizer_syscall_post_impl_mq_open(long res, long name, long oflag,
2798                                            long mode, long attr);
2799 void __sanitizer_syscall_pre_impl_mq_unlink(long name);
2800 void __sanitizer_syscall_post_impl_mq_unlink(long res, long name);
2801 void __sanitizer_syscall_pre_impl_mq_timedsend(long mqdes, long msg_ptr,
2802                                                long msg_len, long msg_prio,
2803                                                long abs_timeout);
2804 void __sanitizer_syscall_post_impl_mq_timedsend(long res, long mqdes,
2805                                                 long msg_ptr, long msg_len,
2806                                                 long msg_prio,
2807                                                 long abs_timeout);
2808 void __sanitizer_syscall_pre_impl_mq_timedreceive(long mqdes, long msg_ptr,
2809                                                   long msg_len, long msg_prio,
2810                                                   long abs_timeout);
2811 void __sanitizer_syscall_post_impl_mq_timedreceive(long res, long mqdes,
2812                                                    long msg_ptr, long msg_len,
2813                                                    long msg_prio,
2814                                                    long abs_timeout);
2815 void __sanitizer_syscall_pre_impl_mq_notify(long mqdes, long notification);
2816 void __sanitizer_syscall_post_impl_mq_notify(long res, long mqdes,
2817                                              long notification);
2818 void __sanitizer_syscall_pre_impl_mq_getsetattr(long mqdes, long mqstat,
2819                                                 long omqstat);
2820 void __sanitizer_syscall_post_impl_mq_getsetattr(long res, long mqdes,
2821                                                  long mqstat, long omqstat);
2822 void __sanitizer_syscall_pre_impl_pciconfig_iobase(long which, long bus,
2823                                                    long devfn);
2824 void __sanitizer_syscall_post_impl_pciconfig_iobase(long res, long which,
2825                                                     long bus, long devfn);
2826 void __sanitizer_syscall_pre_impl_pciconfig_read(long bus, long dfn, long off,
2827                                                  long len, long buf);
2828 void __sanitizer_syscall_post_impl_pciconfig_read(long res, long bus, long dfn,
2829                                                   long off, long len, long buf);
2830 void __sanitizer_syscall_pre_impl_pciconfig_write(long bus, long dfn, long off,
2831                                                   long len, long buf);
2832 void __sanitizer_syscall_post_impl_pciconfig_write(long res, long bus, long dfn,
2833                                                    long off, long len,
2834                                                    long buf);
2835 void __sanitizer_syscall_pre_impl_swapon(long specialfile, long swap_flags);
2836 void __sanitizer_syscall_post_impl_swapon(long res, long specialfile,
2837                                           long swap_flags);
2838 void __sanitizer_syscall_pre_impl_swapoff(long specialfile);
2839 void __sanitizer_syscall_post_impl_swapoff(long res, long specialfile);
2840 void __sanitizer_syscall_pre_impl_sysctl(long args);
2841 void __sanitizer_syscall_post_impl_sysctl(long res, long args);
2842 void __sanitizer_syscall_pre_impl_sysinfo(long info);
2843 void __sanitizer_syscall_post_impl_sysinfo(long res, long info);
2844 void __sanitizer_syscall_pre_impl_sysfs(long option, long arg1, long arg2);
2845 void __sanitizer_syscall_post_impl_sysfs(long res, long option, long arg1,
2846                                          long arg2);
2847 void __sanitizer_syscall_pre_impl_syslog(long type, long buf, long len);
2848 void __sanitizer_syscall_post_impl_syslog(long res, long type, long buf,
2849                                           long len);
2850 void __sanitizer_syscall_pre_impl_uselib(long library);
2851 void __sanitizer_syscall_post_impl_uselib(long res, long library);
2852 void __sanitizer_syscall_pre_impl_ni_syscall();
2853 void __sanitizer_syscall_post_impl_ni_syscall(long res);
2854 void __sanitizer_syscall_pre_impl_ptrace(long request, long pid, long addr,
2855                                          long data);
2856 void __sanitizer_syscall_post_impl_ptrace(long res, long request, long pid,
2857                                           long addr, long data);
2858 void __sanitizer_syscall_pre_impl_add_key(long _type, long _description,
2859                                           long _payload, long plen,
2860                                           long destringid);
2861 void __sanitizer_syscall_post_impl_add_key(long res, long _type,
2862                                            long _description, long _payload,
2863                                            long plen, long destringid);
2864 void __sanitizer_syscall_pre_impl_request_key(long _type, long _description,
2865                                               long _callout_info,
2866                                               long destringid);
2867 void __sanitizer_syscall_post_impl_request_key(long res, long _type,
2868                                                long _description,
2869                                                long _callout_info,
2870                                                long destringid);
2871 void __sanitizer_syscall_pre_impl_keyctl(long cmd, long arg2, long arg3,
2872                                          long arg4, long arg5);
2873 void __sanitizer_syscall_post_impl_keyctl(long res, long cmd, long arg2,
2874                                           long arg3, long arg4, long arg5);
2875 void __sanitizer_syscall_pre_impl_ioprio_set(long which, long who, long ioprio);
2876 void __sanitizer_syscall_post_impl_ioprio_set(long res, long which, long who,
2877                                               long ioprio);
2878 void __sanitizer_syscall_pre_impl_ioprio_get(long which, long who);
2879 void __sanitizer_syscall_post_impl_ioprio_get(long res, long which, long who);
2880 void __sanitizer_syscall_pre_impl_set_mempolicy(long mode, long nmask,
2881                                                 long maxnode);
2882 void __sanitizer_syscall_post_impl_set_mempolicy(long res, long mode,
2883                                                  long nmask, long maxnode);
2884 void __sanitizer_syscall_pre_impl_migrate_pages(long pid, long maxnode,
2885                                                 long from, long to);
2886 void __sanitizer_syscall_post_impl_migrate_pages(long res, long pid,
2887                                                  long maxnode, long from,
2888                                                  long to);
2889 void __sanitizer_syscall_pre_impl_move_pages(long pid, long nr_pages,
2890                                              long pages, long nodes,
2891                                              long status, long flags);
2892 void __sanitizer_syscall_post_impl_move_pages(long res, long pid, long nr_pages,
2893                                               long pages, long nodes,
2894                                               long status, long flags);
2895 void __sanitizer_syscall_pre_impl_mbind(long start, long len, long mode,
2896                                         long nmask, long maxnode, long flags);
2897 void __sanitizer_syscall_post_impl_mbind(long res, long start, long len,
2898                                          long mode, long nmask, long maxnode,
2899                                          long flags);
2900 void __sanitizer_syscall_pre_impl_get_mempolicy(long policy, long nmask,
2901                                                 long maxnode, long addr,
2902                                                 long flags);
2903 void __sanitizer_syscall_post_impl_get_mempolicy(long res, long policy,
2904                                                  long nmask, long maxnode,
2905                                                  long addr, long flags);
2906 void __sanitizer_syscall_pre_impl_inotify_init();
2907 void __sanitizer_syscall_post_impl_inotify_init(long res);
2908 void __sanitizer_syscall_pre_impl_inotify_init1(long flags);
2909 void __sanitizer_syscall_post_impl_inotify_init1(long res, long flags);
2910 void __sanitizer_syscall_pre_impl_inotify_add_watch(long fd, long path,
2911                                                     long mask);
2912 void __sanitizer_syscall_post_impl_inotify_add_watch(long res, long fd,
2913                                                      long path, long mask);
2914 void __sanitizer_syscall_pre_impl_inotify_rm_watch(long fd, long wd);
2915 void __sanitizer_syscall_post_impl_inotify_rm_watch(long res, long fd, long wd);
2916 void __sanitizer_syscall_pre_impl_spu_run(long fd, long unpc, long ustatus);
2917 void __sanitizer_syscall_post_impl_spu_run(long res, long fd, long unpc,
2918                                            long ustatus);
2919 void __sanitizer_syscall_pre_impl_spu_create(long name, long flags, long mode,
2920                                              long fd);
2921 void __sanitizer_syscall_post_impl_spu_create(long res, long name, long flags,
2922                                               long mode, long fd);
2923 void __sanitizer_syscall_pre_impl_mknodat(long dfd, long filename, long mode,
2924                                           long dev);
2925 void __sanitizer_syscall_post_impl_mknodat(long res, long dfd, long filename,
2926                                            long mode, long dev);
2927 void __sanitizer_syscall_pre_impl_mkdirat(long dfd, long pathname, long mode);
2928 void __sanitizer_syscall_post_impl_mkdirat(long res, long dfd, long pathname,
2929                                            long mode);
2930 void __sanitizer_syscall_pre_impl_unlinkat(long dfd, long pathname, long flag);
2931 void __sanitizer_syscall_post_impl_unlinkat(long res, long dfd, long pathname,
2932                                             long flag);
2933 void __sanitizer_syscall_pre_impl_symlinkat(long oldname, long newdfd,
2934                                             long newname);
2935 void __sanitizer_syscall_post_impl_symlinkat(long res, long oldname,
2936                                              long newdfd, long newname);
2937 void __sanitizer_syscall_pre_impl_linkat(long olddfd, long oldname, long newdfd,
2938                                          long newname, long flags);
2939 void __sanitizer_syscall_post_impl_linkat(long res, long olddfd, long oldname,
2940                                           long newdfd, long newname,
2941                                           long flags);
2942 void __sanitizer_syscall_pre_impl_renameat(long olddfd, long oldname,
2943                                            long newdfd, long newname);
2944 void __sanitizer_syscall_post_impl_renameat(long res, long olddfd, long oldname,
2945                                             long newdfd, long newname);
2946 void __sanitizer_syscall_pre_impl_futimesat(long dfd, long filename,
2947                                             long utimes);
2948 void __sanitizer_syscall_post_impl_futimesat(long res, long dfd, long filename,
2949                                              long utimes);
2950 void __sanitizer_syscall_pre_impl_faccessat(long dfd, long filename, long mode);
2951 void __sanitizer_syscall_post_impl_faccessat(long res, long dfd, long filename,
2952                                              long mode);
2953 void __sanitizer_syscall_pre_impl_fchmodat(long dfd, long filename, long mode);
2954 void __sanitizer_syscall_post_impl_fchmodat(long res, long dfd, long filename,
2955                                             long mode);
2956 void __sanitizer_syscall_pre_impl_fchownat(long dfd, long filename, long user,
2957                                            long group, long flag);
2958 void __sanitizer_syscall_post_impl_fchownat(long res, long dfd, long filename,
2959                                             long user, long group, long flag);
2960 void __sanitizer_syscall_pre_impl_openat(long dfd, long filename, long flags,
2961                                          long mode);
2962 void __sanitizer_syscall_post_impl_openat(long res, long dfd, long filename,
2963                                           long flags, long mode);
2964 void __sanitizer_syscall_pre_impl_newfstatat(long dfd, long filename,
2965                                              long statbuf, long flag);
2966 void __sanitizer_syscall_post_impl_newfstatat(long res, long dfd, long filename,
2967                                               long statbuf, long flag);
2968 void __sanitizer_syscall_pre_impl_fstatat64(long dfd, long filename,
2969                                             long statbuf, long flag);
2970 void __sanitizer_syscall_post_impl_fstatat64(long res, long dfd, long filename,
2971                                              long statbuf, long flag);
2972 void __sanitizer_syscall_pre_impl_readlinkat(long dfd, long path, long buf,
2973                                              long bufsiz);
2974 void __sanitizer_syscall_post_impl_readlinkat(long res, long dfd, long path,
2975                                               long buf, long bufsiz);
2976 void __sanitizer_syscall_pre_impl_utimensat(long dfd, long filename,
2977                                             long utimes, long flags);
2978 void __sanitizer_syscall_post_impl_utimensat(long res, long dfd, long filename,
2979                                              long utimes, long flags);
2980 void __sanitizer_syscall_pre_impl_unshare(long unshare_flags);
2981 void __sanitizer_syscall_post_impl_unshare(long res, long unshare_flags);
2982 void __sanitizer_syscall_pre_impl_splice(long fd_in, long off_in, long fd_out,
2983                                          long off_out, long len, long flags);
2984 void __sanitizer_syscall_post_impl_splice(long res, long fd_in, long off_in,
2985                                           long fd_out, long off_out, long len,
2986                                           long flags);
2987 void __sanitizer_syscall_pre_impl_vmsplice(long fd, long iov, long nr_segs,
2988                                            long flags);
2989 void __sanitizer_syscall_post_impl_vmsplice(long res, long fd, long iov,
2990                                             long nr_segs, long flags);
2991 void __sanitizer_syscall_pre_impl_tee(long fdin, long fdout, long len,
2992                                       long flags);
2993 void __sanitizer_syscall_post_impl_tee(long res, long fdin, long fdout,
2994                                        long len, long flags);
2995 void __sanitizer_syscall_pre_impl_get_robust_list(long pid, long head_ptr,
2996                                                   long len_ptr);
2997 void __sanitizer_syscall_post_impl_get_robust_list(long res, long pid,
2998                                                    long head_ptr, long len_ptr);
2999 void __sanitizer_syscall_pre_impl_set_robust_list(long head, long len);
3000 void __sanitizer_syscall_post_impl_set_robust_list(long res, long head,
3001                                                    long len);
3002 void __sanitizer_syscall_pre_impl_getcpu(long cpu, long node, long cache);
3003 void __sanitizer_syscall_post_impl_getcpu(long res, long cpu, long node,
3004                                           long cache);
3005 void __sanitizer_syscall_pre_impl_signalfd(long ufd, long user_mask,
3006                                            long sizemask);
3007 void __sanitizer_syscall_post_impl_signalfd(long res, long ufd, long user_mask,
3008                                             long sizemask);
3009 void __sanitizer_syscall_pre_impl_signalfd4(long ufd, long user_mask,
3010                                             long sizemask, long flags);
3011 void __sanitizer_syscall_post_impl_signalfd4(long res, long ufd, long user_mask,
3012                                              long sizemask, long flags);
3013 void __sanitizer_syscall_pre_impl_timerfd_create(long clockid, long flags);
3014 void __sanitizer_syscall_post_impl_timerfd_create(long res, long clockid,
3015                                                   long flags);
3016 void __sanitizer_syscall_pre_impl_timerfd_settime(long ufd, long flags,
3017                                                   long utmr, long otmr);
3018 void __sanitizer_syscall_post_impl_timerfd_settime(long res, long ufd,
3019                                                    long flags, long utmr,
3020                                                    long otmr);
3021 void __sanitizer_syscall_pre_impl_timerfd_gettime(long ufd, long otmr);
3022 void __sanitizer_syscall_post_impl_timerfd_gettime(long res, long ufd,
3023                                                    long otmr);
3024 void __sanitizer_syscall_pre_impl_eventfd(long count);
3025 void __sanitizer_syscall_post_impl_eventfd(long res, long count);
3026 void __sanitizer_syscall_pre_impl_eventfd2(long count, long flags);
3027 void __sanitizer_syscall_post_impl_eventfd2(long res, long count, long flags);
3028 void __sanitizer_syscall_pre_impl_old_readdir(long arg0, long arg1, long arg2);
3029 void __sanitizer_syscall_post_impl_old_readdir(long res, long arg0, long arg1,
3030                                                long arg2);
3031 void __sanitizer_syscall_pre_impl_pselect6(long arg0, long arg1, long arg2,
3032                                            long arg3, long arg4, long arg5);
3033 void __sanitizer_syscall_post_impl_pselect6(long res, long arg0, long arg1,
3034                                             long arg2, long arg3, long arg4,
3035                                             long arg5);
3036 void __sanitizer_syscall_pre_impl_ppoll(long arg0, long arg1, long arg2,
3037                                         long arg3, long arg4);
3038 void __sanitizer_syscall_post_impl_ppoll(long res, long arg0, long arg1,
3039                                          long arg2, long arg3, long arg4);
3040 void __sanitizer_syscall_pre_impl_fanotify_init(long flags, long event_f_flags);
3041 void __sanitizer_syscall_post_impl_fanotify_init(long res, long flags,
3042                                                  long event_f_flags);
3043 void __sanitizer_syscall_pre_impl_fanotify_mark(long fanotify_fd, long flags,
3044                                                 long mask, long fd,
3045                                                 long pathname);
3046 void __sanitizer_syscall_post_impl_fanotify_mark(long res, long fanotify_fd,
3047                                                  long flags, long mask, long fd,
3048                                                  long pathname);
3049 void __sanitizer_syscall_pre_impl_syncfs(long fd);
3050 void __sanitizer_syscall_post_impl_syncfs(long res, long fd);
3051 void __sanitizer_syscall_pre_impl_perf_event_open(long attr_uptr, long pid,
3052                                                   long cpu, long group_fd,
3053                                                   long flags);
3054 void __sanitizer_syscall_post_impl_perf_event_open(long res, long attr_uptr,
3055                                                    long pid, long cpu,
3056                                                    long group_fd, long flags);
3057 void __sanitizer_syscall_pre_impl_mmap_pgoff(long addr, long len, long prot,
3058                                              long flags, long fd, long pgoff);
3059 void __sanitizer_syscall_post_impl_mmap_pgoff(long res, long addr, long len,
3060                                               long prot, long flags, long fd,
3061                                               long pgoff);
3062 void __sanitizer_syscall_pre_impl_old_mmap(long arg);
3063 void __sanitizer_syscall_post_impl_old_mmap(long res, long arg);
3064 void __sanitizer_syscall_pre_impl_name_to_handle_at(long dfd, long name,
3065                                                     long handle, long mnt_id,
3066                                                     long flag);
3067 void __sanitizer_syscall_post_impl_name_to_handle_at(long res, long dfd,
3068                                                      long name, long handle,
3069                                                      long mnt_id, long flag);
3070 void __sanitizer_syscall_pre_impl_open_by_handle_at(long mountdirfd,
3071                                                     long handle, long flags);
3072 void __sanitizer_syscall_post_impl_open_by_handle_at(long res, long mountdirfd,
3073                                                      long handle, long flags);
3074 void __sanitizer_syscall_pre_impl_setns(long fd, long nstype);
3075 void __sanitizer_syscall_post_impl_setns(long res, long fd, long nstype);
3076 void __sanitizer_syscall_pre_impl_process_vm_readv(long pid, long lvec,
3077                                                    long liovcnt, long rvec,
3078                                                    long riovcnt, long flags);
3079 void __sanitizer_syscall_post_impl_process_vm_readv(long res, long pid,
3080                                                     long lvec, long liovcnt,
3081                                                     long rvec, long riovcnt,
3082                                                     long flags);
3083 void __sanitizer_syscall_pre_impl_process_vm_writev(long pid, long lvec,
3084                                                     long liovcnt, long rvec,
3085                                                     long riovcnt, long flags);
3086 void __sanitizer_syscall_post_impl_process_vm_writev(long res, long pid,
3087                                                      long lvec, long liovcnt,
3088                                                      long rvec, long riovcnt,
3089                                                      long flags);
3090 void __sanitizer_syscall_pre_impl_fork();
3091 void __sanitizer_syscall_post_impl_fork(long res);
3092 void __sanitizer_syscall_pre_impl_vfork();
3093 void __sanitizer_syscall_post_impl_vfork(long res);
3094 void __sanitizer_syscall_pre_impl_sigaction(long signum, long act, long oldact);
3095 void __sanitizer_syscall_post_impl_sigaction(long res, long signum, long act,
3096                                              long oldact);
3097 void __sanitizer_syscall_pre_impl_rt_sigaction(long signum, long act,
3098                                                long oldact, long sz);
3099 void __sanitizer_syscall_post_impl_rt_sigaction(long res, long signum, long act,
3100                                                 long oldact, long sz);
3101 void __sanitizer_syscall_pre_impl_sigaltstack(long ss, long oss);
3102 void __sanitizer_syscall_post_impl_sigaltstack(long res, long ss, long oss);
3103 void __sanitizer_syscall_pre_impl_futex(long uaddr, long futex_op, long val,
3104                                         long timeout, long uaddr2, long val3);
3105 void __sanitizer_syscall_post_impl_futex(long res, long uaddr, long futex_op,
3106                                          long val, long timeout, long uaddr2,
3107                                          long val3);
3108 #ifdef __cplusplus
3109 } // extern "C"
3110 #endif
3111 
3112 #endif // SANITIZER_LINUX_SYSCALL_HOOKS_H
3113