linux_syscall_hooks.h 213 KB

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