linux_syscall_hooks.h 200 KB

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