sanitizer_syscalls_netbsd.inc 124 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944
  1. //===-- sanitizer_syscalls_netbsd.inc ---------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // Common syscalls handlers for tools like AddressSanitizer,
  10. // ThreadSanitizer, MemorySanitizer, etc.
  11. //
  12. // This file should be included into the tool's interceptor file,
  13. // which has to define it's own macros:
  14. // COMMON_SYSCALL_PRE_READ_RANGE
  15. // Called in prehook for regions that will be read by the kernel and
  16. // must be initialized.
  17. // COMMON_SYSCALL_PRE_WRITE_RANGE
  18. // Called in prehook for regions that will be written to by the kernel
  19. // and must be addressable. The actual write range may be smaller than
  20. // reported in the prehook. See POST_WRITE_RANGE.
  21. // COMMON_SYSCALL_POST_READ_RANGE
  22. // Called in posthook for regions that were read by the kernel. Does
  23. // not make much sense.
  24. // COMMON_SYSCALL_POST_WRITE_RANGE
  25. // Called in posthook for regions that were written to by the kernel
  26. // and are now initialized.
  27. // COMMON_SYSCALL_ACQUIRE(addr)
  28. // Acquire memory visibility from addr.
  29. // COMMON_SYSCALL_RELEASE(addr)
  30. // Release memory visibility to addr.
  31. // COMMON_SYSCALL_FD_CLOSE(fd)
  32. // Called before closing file descriptor fd.
  33. // COMMON_SYSCALL_FD_ACQUIRE(fd)
  34. // Acquire memory visibility from fd.
  35. // COMMON_SYSCALL_FD_RELEASE(fd)
  36. // Release memory visibility to fd.
  37. // COMMON_SYSCALL_PRE_FORK()
  38. // Called before fork syscall.
  39. // COMMON_SYSCALL_POST_FORK(long long res)
  40. // Called after fork syscall.
  41. //
  42. // DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
  43. //
  44. // Generated with: generate_netbsd_syscalls.awk
  45. // Generated date: 2020-09-10
  46. // Generated from: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp
  47. //
  48. //===----------------------------------------------------------------------===//
  49. #include "sanitizer_platform.h"
  50. #if SANITIZER_NETBSD
  51. #include "sanitizer_libc.h"
  52. #define PRE_SYSCALL(name) \
  53. SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_pre_impl_##name
  54. #define PRE_READ(p, s) COMMON_SYSCALL_PRE_READ_RANGE(p, s)
  55. #define PRE_WRITE(p, s) COMMON_SYSCALL_PRE_WRITE_RANGE(p, s)
  56. #define POST_SYSCALL(name) \
  57. SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_post_impl_##name
  58. #define POST_READ(p, s) COMMON_SYSCALL_POST_READ_RANGE(p, s)
  59. #define POST_WRITE(p, s) COMMON_SYSCALL_POST_WRITE_RANGE(p, s)
  60. #ifndef COMMON_SYSCALL_ACQUIRE
  61. #define COMMON_SYSCALL_ACQUIRE(addr) ((void)(addr))
  62. #endif
  63. #ifndef COMMON_SYSCALL_RELEASE
  64. #define COMMON_SYSCALL_RELEASE(addr) ((void)(addr))
  65. #endif
  66. #ifndef COMMON_SYSCALL_FD_CLOSE
  67. #define COMMON_SYSCALL_FD_CLOSE(fd) ((void)(fd))
  68. #endif
  69. #ifndef COMMON_SYSCALL_FD_ACQUIRE
  70. #define COMMON_SYSCALL_FD_ACQUIRE(fd) ((void)(fd))
  71. #endif
  72. #ifndef COMMON_SYSCALL_FD_RELEASE
  73. #define COMMON_SYSCALL_FD_RELEASE(fd) ((void)(fd))
  74. #endif
  75. #ifndef COMMON_SYSCALL_PRE_FORK
  76. #define COMMON_SYSCALL_PRE_FORK() \
  77. {}
  78. #endif
  79. #ifndef COMMON_SYSCALL_POST_FORK
  80. #define COMMON_SYSCALL_POST_FORK(res) \
  81. {}
  82. #endif
  83. // FIXME: do some kind of PRE_READ for all syscall arguments (int(s) and such).
  84. extern "C" {
  85. #define SYS_MAXSYSARGS 8
  86. PRE_SYSCALL(syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
  87. /* Nothing to do */
  88. }
  89. POST_SYSCALL(syscall)
  90. (long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
  91. /* Nothing to do */
  92. }
  93. PRE_SYSCALL(exit)(long long rval_) { /* Nothing to do */ }
  94. POST_SYSCALL(exit)(long long res, long long rval_) { /* Nothing to do */ }
  95. PRE_SYSCALL(fork)(void) { COMMON_SYSCALL_PRE_FORK(); }
  96. POST_SYSCALL(fork)(long long res) { COMMON_SYSCALL_POST_FORK(res); }
  97. PRE_SYSCALL(read)(long long fd_, void *buf_, long long nbyte_) {
  98. if (buf_) {
  99. PRE_WRITE(buf_, nbyte_);
  100. }
  101. }
  102. POST_SYSCALL(read)(long long res, long long fd_, void *buf_, long long nbyte_) {
  103. if (res > 0) {
  104. POST_WRITE(buf_, res);
  105. }
  106. }
  107. PRE_SYSCALL(write)(long long fd_, void *buf_, long long nbyte_) {
  108. if (buf_) {
  109. PRE_READ(buf_, nbyte_);
  110. }
  111. }
  112. POST_SYSCALL(write)
  113. (long long res, long long fd_, void *buf_, long long nbyte_) {
  114. if (res > 0) {
  115. POST_READ(buf_, res);
  116. }
  117. }
  118. PRE_SYSCALL(open)(void *path_, long long flags_, long long mode_) {
  119. const char *path = (const char *)path_;
  120. if (path) {
  121. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  122. }
  123. }
  124. POST_SYSCALL(open)
  125. (long long res, void *path_, long long flags_, long long mode_) {
  126. if (res > 0) {
  127. const char *path = (const char *)path_;
  128. if (path) {
  129. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  130. }
  131. }
  132. }
  133. PRE_SYSCALL(close)(long long fd_) { COMMON_SYSCALL_FD_CLOSE((int)fd_); }
  134. POST_SYSCALL(close)(long long res, long long fd_) { /* Nothing to do */ }
  135. PRE_SYSCALL(compat_50_wait4)
  136. (long long pid_, void *status_, long long options_, void *rusage_) {
  137. /* TODO */
  138. }
  139. POST_SYSCALL(compat_50_wait4)
  140. (long long res, long long pid_, void *status_, long long options_,
  141. void *rusage_) {
  142. /* TODO */
  143. }
  144. PRE_SYSCALL(compat_43_ocreat)(void *path_, long long mode_) { /* TODO */ }
  145. POST_SYSCALL(compat_43_ocreat)(long long res, void *path_, long long mode_) {
  146. /* TODO */
  147. }
  148. PRE_SYSCALL(link)(void *path_, void *link_) {
  149. const char *path = (const char *)path_;
  150. const char *link = (const char *)link_;
  151. if (path) {
  152. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  153. }
  154. if (link) {
  155. PRE_READ(path, __sanitizer::internal_strlen(link) + 1);
  156. }
  157. }
  158. POST_SYSCALL(link)(long long res, void *path_, void *link_) {
  159. if (res == 0) {
  160. const char *path = (const char *)path_;
  161. const char *link = (const char *)link_;
  162. if (path) {
  163. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  164. }
  165. if (link) {
  166. POST_READ(path, __sanitizer::internal_strlen(link) + 1);
  167. }
  168. }
  169. }
  170. PRE_SYSCALL(unlink)(void *path_) {
  171. const char *path = (const char *)path_;
  172. if (path) {
  173. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  174. }
  175. }
  176. POST_SYSCALL(unlink)(long long res, void *path_) {
  177. if (res == 0) {
  178. const char *path = (const char *)path_;
  179. if (path) {
  180. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  181. }
  182. }
  183. }
  184. /* syscall 11 has been skipped */
  185. PRE_SYSCALL(chdir)(void *path_) {
  186. const char *path = (const char *)path_;
  187. if (path) {
  188. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  189. }
  190. }
  191. POST_SYSCALL(chdir)(long long res, void *path_) {
  192. if (res == 0) {
  193. const char *path = (const char *)path_;
  194. if (path) {
  195. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  196. }
  197. }
  198. }
  199. PRE_SYSCALL(fchdir)(long long fd_) { /* Nothing to do */ }
  200. POST_SYSCALL(fchdir)(long long res, long long fd_) { /* Nothing to do */ }
  201. PRE_SYSCALL(compat_50_mknod)(void *path_, long long mode_, long long dev_) {
  202. /* TODO */
  203. }
  204. POST_SYSCALL(compat_50_mknod)
  205. (long long res, void *path_, long long mode_, long long dev_) {
  206. /* TODO */
  207. }
  208. PRE_SYSCALL(chmod)(void *path_, long long mode_) {
  209. const char *path = (const char *)path_;
  210. if (path) {
  211. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  212. }
  213. }
  214. POST_SYSCALL(chmod)(long long res, void *path_, long long mode_) {
  215. if (res == 0) {
  216. const char *path = (const char *)path_;
  217. if (path) {
  218. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  219. }
  220. }
  221. }
  222. PRE_SYSCALL(chown)(void *path_, long long uid_, long long gid_) {
  223. const char *path = (const char *)path_;
  224. if (path) {
  225. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  226. }
  227. }
  228. POST_SYSCALL(chown)
  229. (long long res, void *path_, long long uid_, long long gid_) {
  230. if (res == 0) {
  231. const char *path = (const char *)path_;
  232. if (path) {
  233. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  234. }
  235. }
  236. }
  237. PRE_SYSCALL(break)(void *nsize_) { /* Nothing to do */ }
  238. POST_SYSCALL(break)(long long res, void *nsize_) { /* Nothing to do */ }
  239. PRE_SYSCALL(compat_20_getfsstat)
  240. (void *buf_, long long bufsize_, long long flags_) {
  241. /* TODO */
  242. }
  243. POST_SYSCALL(compat_20_getfsstat)
  244. (long long res, void *buf_, long long bufsize_, long long flags_) {
  245. /* TODO */
  246. }
  247. PRE_SYSCALL(compat_43_olseek)
  248. (long long fd_, long long offset_, long long whence_) {
  249. /* TODO */
  250. }
  251. POST_SYSCALL(compat_43_olseek)
  252. (long long res, long long fd_, long long offset_, long long whence_) {
  253. /* TODO */
  254. }
  255. PRE_SYSCALL(getpid)(void) { /* Nothing to do */ }
  256. POST_SYSCALL(getpid)(long long res) { /* Nothing to do */ }
  257. PRE_SYSCALL(compat_40_mount)
  258. (void *type_, void *path_, long long flags_, void *data_) {
  259. /* TODO */
  260. }
  261. POST_SYSCALL(compat_40_mount)
  262. (long long res, void *type_, void *path_, long long flags_, void *data_) {
  263. /* TODO */
  264. }
  265. PRE_SYSCALL(unmount)(void *path_, long long flags_) {
  266. const char *path = (const char *)path_;
  267. if (path) {
  268. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  269. }
  270. }
  271. POST_SYSCALL(unmount)(long long res, void *path_, long long flags_) {
  272. if (res == 0) {
  273. const char *path = (const char *)path_;
  274. if (path) {
  275. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  276. }
  277. }
  278. }
  279. PRE_SYSCALL(setuid)(long long uid_) { /* Nothing to do */ }
  280. POST_SYSCALL(setuid)(long long res, long long uid_) { /* Nothing to do */ }
  281. PRE_SYSCALL(getuid)(void) { /* Nothing to do */ }
  282. POST_SYSCALL(getuid)(long long res) { /* Nothing to do */ }
  283. PRE_SYSCALL(geteuid)(void) { /* Nothing to do */ }
  284. POST_SYSCALL(geteuid)(long long res) { /* Nothing to do */ }
  285. PRE_SYSCALL(ptrace)
  286. (long long req_, long long pid_, void *addr_, long long data_) {
  287. if (req_ == ptrace_pt_io) {
  288. struct __sanitizer_ptrace_io_desc *addr =
  289. (struct __sanitizer_ptrace_io_desc *)addr_;
  290. PRE_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
  291. if (addr->piod_op == ptrace_piod_write_d ||
  292. addr->piod_op == ptrace_piod_write_i) {
  293. PRE_READ(addr->piod_addr, addr->piod_len);
  294. }
  295. if (addr->piod_op == ptrace_piod_read_d ||
  296. addr->piod_op == ptrace_piod_read_i ||
  297. addr->piod_op == ptrace_piod_read_auxv) {
  298. PRE_WRITE(addr->piod_addr, addr->piod_len);
  299. }
  300. } else if (req_ == ptrace_pt_lwpinfo) {
  301. struct __sanitizer_ptrace_lwpinfo *addr =
  302. (struct __sanitizer_ptrace_lwpinfo *)addr_;
  303. PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
  304. PRE_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
  305. } else if (req_ == ptrace_pt_set_event_mask) {
  306. PRE_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
  307. } else if (req_ == ptrace_pt_get_event_mask) {
  308. PRE_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
  309. } else if (req_ == ptrace_pt_set_siginfo) {
  310. PRE_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
  311. } else if (req_ == ptrace_pt_get_siginfo) {
  312. PRE_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
  313. } else if (req_ == ptrace_pt_lwpstatus) {
  314. struct __sanitizer_ptrace_lwpstatus *addr =
  315. (struct __sanitizer_ptrace_lwpstatus *)addr_;
  316. PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
  317. PRE_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
  318. } else if (req_ == ptrace_pt_lwpnext) {
  319. struct __sanitizer_ptrace_lwpstatus *addr =
  320. (struct __sanitizer_ptrace_lwpstatus *)addr_;
  321. PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
  322. PRE_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
  323. } else if (req_ == ptrace_pt_setregs) {
  324. PRE_READ(addr_, struct_ptrace_reg_struct_sz);
  325. } else if (req_ == ptrace_pt_getregs) {
  326. PRE_WRITE(addr_, struct_ptrace_reg_struct_sz);
  327. } else if (req_ == ptrace_pt_setfpregs) {
  328. PRE_READ(addr_, struct_ptrace_fpreg_struct_sz);
  329. } else if (req_ == ptrace_pt_getfpregs) {
  330. PRE_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
  331. } else if (req_ == ptrace_pt_setdbregs) {
  332. PRE_READ(addr_, struct_ptrace_dbreg_struct_sz);
  333. } else if (req_ == ptrace_pt_getdbregs) {
  334. PRE_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
  335. }
  336. }
  337. POST_SYSCALL(ptrace)
  338. (long long res, long long req_, long long pid_, void *addr_, long long data_) {
  339. if (res == 0) {
  340. if (req_ == ptrace_pt_io) {
  341. struct __sanitizer_ptrace_io_desc *addr =
  342. (struct __sanitizer_ptrace_io_desc *)addr_;
  343. POST_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
  344. if (addr->piod_op == ptrace_piod_write_d ||
  345. addr->piod_op == ptrace_piod_write_i) {
  346. POST_READ(addr->piod_addr, addr->piod_len);
  347. }
  348. if (addr->piod_op == ptrace_piod_read_d ||
  349. addr->piod_op == ptrace_piod_read_i ||
  350. addr->piod_op == ptrace_piod_read_auxv) {
  351. POST_WRITE(addr->piod_addr, addr->piod_len);
  352. }
  353. } else if (req_ == ptrace_pt_lwpinfo) {
  354. struct __sanitizer_ptrace_lwpinfo *addr =
  355. (struct __sanitizer_ptrace_lwpinfo *)addr_;
  356. POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
  357. POST_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
  358. } else if (req_ == ptrace_pt_set_event_mask) {
  359. POST_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
  360. } else if (req_ == ptrace_pt_get_event_mask) {
  361. POST_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
  362. } else if (req_ == ptrace_pt_set_siginfo) {
  363. POST_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
  364. } else if (req_ == ptrace_pt_get_siginfo) {
  365. POST_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
  366. } else if (req_ == ptrace_pt_lwpstatus) {
  367. struct __sanitizer_ptrace_lwpstatus *addr =
  368. (struct __sanitizer_ptrace_lwpstatus *)addr_;
  369. POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
  370. POST_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
  371. } else if (req_ == ptrace_pt_lwpnext) {
  372. struct __sanitizer_ptrace_lwpstatus *addr =
  373. (struct __sanitizer_ptrace_lwpstatus *)addr_;
  374. POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
  375. POST_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
  376. } else if (req_ == ptrace_pt_setregs) {
  377. POST_READ(addr_, struct_ptrace_reg_struct_sz);
  378. } else if (req_ == ptrace_pt_getregs) {
  379. POST_WRITE(addr_, struct_ptrace_reg_struct_sz);
  380. } else if (req_ == ptrace_pt_setfpregs) {
  381. POST_READ(addr_, struct_ptrace_fpreg_struct_sz);
  382. } else if (req_ == ptrace_pt_getfpregs) {
  383. POST_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
  384. } else if (req_ == ptrace_pt_setdbregs) {
  385. POST_READ(addr_, struct_ptrace_dbreg_struct_sz);
  386. } else if (req_ == ptrace_pt_getdbregs) {
  387. POST_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
  388. }
  389. }
  390. }
  391. PRE_SYSCALL(recvmsg)(long long s_, void *msg_, long long flags_) {
  392. PRE_WRITE(msg_, sizeof(__sanitizer_msghdr));
  393. }
  394. POST_SYSCALL(recvmsg)
  395. (long long res, long long s_, void *msg_, long long flags_) {
  396. if (res > 0) {
  397. POST_WRITE(msg_, sizeof(__sanitizer_msghdr));
  398. }
  399. }
  400. PRE_SYSCALL(sendmsg)(long long s_, void *msg_, long long flags_) {
  401. PRE_READ(msg_, sizeof(__sanitizer_msghdr));
  402. }
  403. POST_SYSCALL(sendmsg)
  404. (long long res, long long s_, void *msg_, long long flags_) {
  405. if (res > 0) {
  406. POST_READ(msg_, sizeof(__sanitizer_msghdr));
  407. }
  408. }
  409. PRE_SYSCALL(recvfrom)
  410. (long long s_, void *buf_, long long len_, long long flags_, void *from_,
  411. void *fromlenaddr_) {
  412. PRE_WRITE(buf_, len_);
  413. PRE_WRITE(from_, struct_sockaddr_sz);
  414. PRE_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
  415. }
  416. POST_SYSCALL(recvfrom)
  417. (long long res, long long s_, void *buf_, long long len_, long long flags_,
  418. void *from_, void *fromlenaddr_) {
  419. if (res >= 0) {
  420. POST_WRITE(buf_, res);
  421. POST_WRITE(from_, struct_sockaddr_sz);
  422. POST_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
  423. }
  424. }
  425. PRE_SYSCALL(accept)(long long s_, void *name_, void *anamelen_) {
  426. PRE_WRITE(name_, struct_sockaddr_sz);
  427. PRE_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
  428. }
  429. POST_SYSCALL(accept)
  430. (long long res, long long s_, void *name_, void *anamelen_) {
  431. if (res == 0) {
  432. POST_WRITE(name_, struct_sockaddr_sz);
  433. POST_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
  434. }
  435. }
  436. PRE_SYSCALL(getpeername)(long long fdes_, void *asa_, void *alen_) {
  437. PRE_WRITE(asa_, struct_sockaddr_sz);
  438. PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
  439. }
  440. POST_SYSCALL(getpeername)
  441. (long long res, long long fdes_, void *asa_, void *alen_) {
  442. if (res == 0) {
  443. POST_WRITE(asa_, struct_sockaddr_sz);
  444. POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
  445. }
  446. }
  447. PRE_SYSCALL(getsockname)(long long fdes_, void *asa_, void *alen_) {
  448. PRE_WRITE(asa_, struct_sockaddr_sz);
  449. PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
  450. }
  451. POST_SYSCALL(getsockname)
  452. (long long res, long long fdes_, void *asa_, void *alen_) {
  453. if (res == 0) {
  454. POST_WRITE(asa_, struct_sockaddr_sz);
  455. POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
  456. }
  457. }
  458. PRE_SYSCALL(access)(void *path_, long long flags_) {
  459. const char *path = (const char *)path_;
  460. if (path) {
  461. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  462. }
  463. }
  464. POST_SYSCALL(access)(long long res, void *path_, long long flags_) {
  465. if (res == 0) {
  466. const char *path = (const char *)path_;
  467. if (path) {
  468. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  469. }
  470. }
  471. }
  472. PRE_SYSCALL(chflags)(void *path_, long long flags_) {
  473. const char *path = (const char *)path_;
  474. if (path) {
  475. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  476. }
  477. }
  478. POST_SYSCALL(chflags)(long long res, void *path_, long long flags_) {
  479. if (res == 0) {
  480. const char *path = (const char *)path_;
  481. if (path) {
  482. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  483. }
  484. }
  485. }
  486. PRE_SYSCALL(fchflags)(long long fd_, long long flags_) { /* Nothing to do */ }
  487. POST_SYSCALL(fchflags)(long long res, long long fd_, long long flags_) {
  488. /* Nothing to do */
  489. }
  490. PRE_SYSCALL(sync)(void) { /* Nothing to do */ }
  491. POST_SYSCALL(sync)(long long res) { /* Nothing to do */ }
  492. PRE_SYSCALL(kill)(long long pid_, long long signum_) { /* Nothing to do */ }
  493. POST_SYSCALL(kill)(long long res, long long pid_, long long signum_) {
  494. /* Nothing to do */
  495. }
  496. PRE_SYSCALL(compat_43_stat43)(void *path_, void *ub_) { /* TODO */ }
  497. POST_SYSCALL(compat_43_stat43)(long long res, void *path_, void *ub_) {
  498. /* TODO */
  499. }
  500. PRE_SYSCALL(getppid)(void) { /* Nothing to do */ }
  501. POST_SYSCALL(getppid)(long long res) { /* Nothing to do */ }
  502. PRE_SYSCALL(compat_43_lstat43)(void *path_, void *ub_) { /* TODO */ }
  503. POST_SYSCALL(compat_43_lstat43)(long long res, void *path_, void *ub_) {
  504. /* TODO */
  505. }
  506. PRE_SYSCALL(dup)(long long fd_) { /* Nothing to do */ }
  507. POST_SYSCALL(dup)(long long res, long long fd_) { /* Nothing to do */ }
  508. PRE_SYSCALL(pipe)(void) {
  509. /* pipe returns two descriptors through two returned values */
  510. }
  511. POST_SYSCALL(pipe)(long long res) {
  512. /* pipe returns two descriptors through two returned values */
  513. }
  514. PRE_SYSCALL(getegid)(void) { /* Nothing to do */ }
  515. POST_SYSCALL(getegid)(long long res) { /* Nothing to do */ }
  516. PRE_SYSCALL(profil)
  517. (void *samples_, long long size_, long long offset_, long long scale_) {
  518. if (samples_) {
  519. PRE_WRITE(samples_, size_);
  520. }
  521. }
  522. POST_SYSCALL(profil)
  523. (long long res, void *samples_, long long size_, long long offset_,
  524. long long scale_) {
  525. if (res == 0) {
  526. if (samples_) {
  527. POST_WRITE(samples_, size_);
  528. }
  529. }
  530. }
  531. PRE_SYSCALL(ktrace)
  532. (void *fname_, long long ops_, long long facs_, long long pid_) {
  533. const char *fname = (const char *)fname_;
  534. if (fname) {
  535. PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
  536. }
  537. }
  538. POST_SYSCALL(ktrace)
  539. (long long res, void *fname_, long long ops_, long long facs_, long long pid_) {
  540. const char *fname = (const char *)fname_;
  541. if (res == 0) {
  542. if (fname) {
  543. POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
  544. }
  545. }
  546. }
  547. PRE_SYSCALL(compat_13_sigaction13)(long long signum_, void *nsa_, void *osa_) {
  548. /* TODO */
  549. }
  550. POST_SYSCALL(compat_13_sigaction13)
  551. (long long res, long long signum_, void *nsa_, void *osa_) {
  552. /* TODO */
  553. }
  554. PRE_SYSCALL(getgid)(void) { /* Nothing to do */ }
  555. POST_SYSCALL(getgid)(long long res) { /* Nothing to do */ }
  556. PRE_SYSCALL(compat_13_sigprocmask13)(long long how_, long long mask_) {
  557. /* TODO */
  558. }
  559. POST_SYSCALL(compat_13_sigprocmask13)
  560. (long long res, long long how_, long long mask_) {
  561. /* TODO */
  562. }
  563. PRE_SYSCALL(__getlogin)(void *namebuf_, long long namelen_) {
  564. if (namebuf_) {
  565. PRE_WRITE(namebuf_, namelen_);
  566. }
  567. }
  568. POST_SYSCALL(__getlogin)(long long res, void *namebuf_, long long namelen_) {
  569. if (res == 0) {
  570. if (namebuf_) {
  571. POST_WRITE(namebuf_, namelen_);
  572. }
  573. }
  574. }
  575. PRE_SYSCALL(__setlogin)(void *namebuf_) {
  576. const char *namebuf = (const char *)namebuf_;
  577. if (namebuf) {
  578. PRE_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
  579. }
  580. }
  581. POST_SYSCALL(__setlogin)(long long res, void *namebuf_) {
  582. if (res == 0) {
  583. const char *namebuf = (const char *)namebuf_;
  584. if (namebuf) {
  585. POST_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
  586. }
  587. }
  588. }
  589. PRE_SYSCALL(acct)(void *path_) {
  590. const char *path = (const char *)path_;
  591. if (path) {
  592. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  593. }
  594. }
  595. POST_SYSCALL(acct)(long long res, void *path_) {
  596. if (res == 0) {
  597. const char *path = (const char *)path_;
  598. if (path) {
  599. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  600. }
  601. }
  602. }
  603. PRE_SYSCALL(compat_13_sigpending13)(void) { /* TODO */ }
  604. POST_SYSCALL(compat_13_sigpending13)(long long res) { /* TODO */ }
  605. PRE_SYSCALL(compat_13_sigaltstack13)(void *nss_, void *oss_) { /* TODO */ }
  606. POST_SYSCALL(compat_13_sigaltstack13)(long long res, void *nss_, void *oss_) {
  607. /* TODO */
  608. }
  609. PRE_SYSCALL(ioctl)(long long fd_, long long com_, void *data_) {
  610. /* Nothing to do */
  611. }
  612. POST_SYSCALL(ioctl)(long long res, long long fd_, long long com_, void *data_) {
  613. /* Nothing to do */
  614. }
  615. PRE_SYSCALL(compat_12_oreboot)(long long opt_) { /* TODO */ }
  616. POST_SYSCALL(compat_12_oreboot)(long long res, long long opt_) { /* TODO */ }
  617. PRE_SYSCALL(revoke)(void *path_) {
  618. const char *path = (const char *)path_;
  619. if (path) {
  620. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  621. }
  622. }
  623. POST_SYSCALL(revoke)(long long res, void *path_) {
  624. if (res == 0) {
  625. const char *path = (const char *)path_;
  626. if (path) {
  627. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  628. }
  629. }
  630. }
  631. PRE_SYSCALL(symlink)(void *path_, void *link_) {
  632. const char *path = (const char *)path_;
  633. const char *link = (const char *)link_;
  634. if (path) {
  635. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  636. }
  637. if (link) {
  638. PRE_READ(link, __sanitizer::internal_strlen(link) + 1);
  639. }
  640. }
  641. POST_SYSCALL(symlink)(long long res, void *path_, void *link_) {
  642. if (res == 0) {
  643. const char *path = (const char *)path_;
  644. const char *link = (const char *)link_;
  645. if (path) {
  646. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  647. }
  648. if (link) {
  649. POST_READ(link, __sanitizer::internal_strlen(link) + 1);
  650. }
  651. }
  652. }
  653. PRE_SYSCALL(readlink)(void *path_, void *buf_, long long count_) {
  654. const char *path = (const char *)path_;
  655. if (path) {
  656. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  657. }
  658. if (buf_) {
  659. PRE_WRITE(buf_, count_);
  660. }
  661. }
  662. POST_SYSCALL(readlink)
  663. (long long res, void *path_, void *buf_, long long count_) {
  664. if (res > 0) {
  665. const char *path = (const char *)path_;
  666. if (path) {
  667. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  668. }
  669. if (buf_) {
  670. PRE_WRITE(buf_, res);
  671. }
  672. }
  673. }
  674. PRE_SYSCALL(execve)(void *path_, void *argp_, void *envp_) {
  675. const char *path = (const char *)path_;
  676. char **argp = (char **)argp_;
  677. char **envp = (char **)envp_;
  678. if (path) {
  679. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  680. }
  681. if (argp && argp[0]) {
  682. char *a = argp[0];
  683. while (a++) {
  684. PRE_READ(a, __sanitizer::internal_strlen(a) + 1);
  685. }
  686. }
  687. if (envp && envp[0]) {
  688. char *e = envp[0];
  689. while (e++) {
  690. PRE_READ(e, __sanitizer::internal_strlen(e) + 1);
  691. }
  692. }
  693. }
  694. POST_SYSCALL(execve)(long long res, void *path_, void *argp_, void *envp_) {
  695. /* If we are here, something went wrong */
  696. const char *path = (const char *)path_;
  697. char **argp = (char **)argp_;
  698. char **envp = (char **)envp_;
  699. if (path) {
  700. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  701. }
  702. if (argp && argp[0]) {
  703. char *a = argp[0];
  704. while (a++) {
  705. POST_READ(a, __sanitizer::internal_strlen(a) + 1);
  706. }
  707. }
  708. if (envp && envp[0]) {
  709. char *e = envp[0];
  710. while (e++) {
  711. POST_READ(e, __sanitizer::internal_strlen(e) + 1);
  712. }
  713. }
  714. }
  715. PRE_SYSCALL(umask)(long long newmask_) { /* Nothing to do */ }
  716. POST_SYSCALL(umask)(long long res, long long newmask_) { /* Nothing to do */ }
  717. PRE_SYSCALL(chroot)(void *path_) {
  718. const char *path = (const char *)path_;
  719. if (path) {
  720. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  721. }
  722. }
  723. POST_SYSCALL(chroot)(long long res, void *path_) {
  724. if (res == 0) {
  725. const char *path = (const char *)path_;
  726. if (path) {
  727. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  728. }
  729. }
  730. }
  731. PRE_SYSCALL(compat_43_fstat43)(long long fd_, void *sb_) { /* TODO */ }
  732. POST_SYSCALL(compat_43_fstat43)(long long res, long long fd_, void *sb_) {
  733. /* TODO */
  734. }
  735. PRE_SYSCALL(compat_43_ogetkerninfo)
  736. (long long op_, void *where_, void *size_, long long arg_) {
  737. /* TODO */
  738. }
  739. POST_SYSCALL(compat_43_ogetkerninfo)
  740. (long long res, long long op_, void *where_, void *size_, long long arg_) {
  741. /* TODO */
  742. }
  743. PRE_SYSCALL(compat_43_ogetpagesize)(void) { /* TODO */ }
  744. POST_SYSCALL(compat_43_ogetpagesize)(long long res) { /* TODO */ }
  745. PRE_SYSCALL(compat_12_msync)(void *addr_, long long len_) { /* TODO */ }
  746. POST_SYSCALL(compat_12_msync)(long long res, void *addr_, long long len_) {
  747. /* TODO */
  748. }
  749. PRE_SYSCALL(vfork)(void) { /* Nothing to do */ }
  750. POST_SYSCALL(vfork)(long long res) { /* Nothing to do */ }
  751. /* syscall 67 has been skipped */
  752. /* syscall 68 has been skipped */
  753. /* syscall 69 has been skipped */
  754. /* syscall 70 has been skipped */
  755. PRE_SYSCALL(compat_43_ommap)
  756. (void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
  757. long long pos_) {
  758. /* TODO */
  759. }
  760. POST_SYSCALL(compat_43_ommap)
  761. (long long res, void *addr_, long long len_, long long prot_, long long flags_,
  762. long long fd_, long long pos_) {
  763. /* TODO */
  764. }
  765. PRE_SYSCALL(vadvise)(long long anom_) { /* Nothing to do */ }
  766. POST_SYSCALL(vadvise)(long long res, long long anom_) { /* Nothing to do */ }
  767. PRE_SYSCALL(munmap)(void *addr_, long long len_) { /* Nothing to do */ }
  768. POST_SYSCALL(munmap)(long long res, void *addr_, long long len_) {
  769. /* Nothing to do */
  770. }
  771. PRE_SYSCALL(mprotect)(void *addr_, long long len_, long long prot_) {
  772. /* Nothing to do */
  773. }
  774. POST_SYSCALL(mprotect)
  775. (long long res, void *addr_, long long len_, long long prot_) {
  776. /* Nothing to do */
  777. }
  778. PRE_SYSCALL(madvise)(void *addr_, long long len_, long long behav_) {
  779. /* Nothing to do */
  780. }
  781. POST_SYSCALL(madvise)
  782. (long long res, void *addr_, long long len_, long long behav_) {
  783. /* Nothing to do */
  784. }
  785. /* syscall 76 has been skipped */
  786. /* syscall 77 has been skipped */
  787. PRE_SYSCALL(mincore)(void *addr_, long long len_, void *vec_) {
  788. /* Nothing to do */
  789. }
  790. POST_SYSCALL(mincore)(long long res, void *addr_, long long len_, void *vec_) {
  791. /* Nothing to do */
  792. }
  793. PRE_SYSCALL(getgroups)(long long gidsetsize_, void *gidset_) {
  794. unsigned int *gidset = (unsigned int *)gidset_;
  795. if (gidset) {
  796. PRE_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
  797. }
  798. }
  799. POST_SYSCALL(getgroups)(long long res, long long gidsetsize_, void *gidset_) {
  800. if (res == 0) {
  801. unsigned int *gidset = (unsigned int *)gidset_;
  802. if (gidset) {
  803. POST_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
  804. }
  805. }
  806. }
  807. PRE_SYSCALL(setgroups)(long long gidsetsize_, void *gidset_) {
  808. unsigned int *gidset = (unsigned int *)gidset_;
  809. if (gidset) {
  810. PRE_READ(gidset, sizeof(*gidset) * gidsetsize_);
  811. }
  812. }
  813. POST_SYSCALL(setgroups)(long long res, long long gidsetsize_, void *gidset_) {
  814. if (res == 0) {
  815. unsigned int *gidset = (unsigned int *)gidset_;
  816. if (gidset) {
  817. POST_READ(gidset, sizeof(*gidset) * gidsetsize_);
  818. }
  819. }
  820. }
  821. PRE_SYSCALL(getpgrp)(void) { /* Nothing to do */ }
  822. POST_SYSCALL(getpgrp)(long long res) { /* Nothing to do */ }
  823. PRE_SYSCALL(setpgid)(long long pid_, long long pgid_) { /* Nothing to do */ }
  824. POST_SYSCALL(setpgid)(long long res, long long pid_, long long pgid_) {
  825. /* Nothing to do */
  826. }
  827. PRE_SYSCALL(compat_50_setitimer)(long long which_, void *itv_, void *oitv_) {
  828. /* TODO */
  829. }
  830. POST_SYSCALL(compat_50_setitimer)
  831. (long long res, long long which_, void *itv_, void *oitv_) {
  832. /* TODO */
  833. }
  834. PRE_SYSCALL(compat_43_owait)(void) { /* TODO */ }
  835. POST_SYSCALL(compat_43_owait)(long long res) { /* TODO */ }
  836. PRE_SYSCALL(compat_12_oswapon)(void *name_) { /* TODO */ }
  837. POST_SYSCALL(compat_12_oswapon)(long long res, void *name_) { /* TODO */ }
  838. PRE_SYSCALL(compat_50_getitimer)(long long which_, void *itv_) { /* TODO */ }
  839. POST_SYSCALL(compat_50_getitimer)(long long res, long long which_, void *itv_) {
  840. /* TODO */
  841. }
  842. PRE_SYSCALL(compat_43_ogethostname)(void *hostname_, long long len_) {
  843. /* TODO */
  844. }
  845. POST_SYSCALL(compat_43_ogethostname)
  846. (long long res, void *hostname_, long long len_) {
  847. /* TODO */
  848. }
  849. PRE_SYSCALL(compat_43_osethostname)(void *hostname_, long long len_) {
  850. /* TODO */
  851. }
  852. POST_SYSCALL(compat_43_osethostname)
  853. (long long res, void *hostname_, long long len_) {
  854. /* TODO */
  855. }
  856. PRE_SYSCALL(compat_43_ogetdtablesize)(void) { /* TODO */ }
  857. POST_SYSCALL(compat_43_ogetdtablesize)(long long res) { /* TODO */ }
  858. PRE_SYSCALL(dup2)(long long from_, long long to_) { /* Nothing to do */ }
  859. POST_SYSCALL(dup2)(long long res, long long from_, long long to_) {
  860. /* Nothing to do */
  861. }
  862. PRE_SYSCALL(getrandom)(void *buf_, long long buflen_, long long flags_) {
  863. /* TODO */
  864. }
  865. POST_SYSCALL(getrandom)
  866. (long long res, void *buf_, long long buflen_, long long flags_) {
  867. /* TODO */
  868. }
  869. PRE_SYSCALL(fcntl)(long long fd_, long long cmd_, void *arg_) {
  870. /* Nothing to do */
  871. }
  872. POST_SYSCALL(fcntl)(long long res, long long fd_, long long cmd_, void *arg_) {
  873. /* Nothing to do */
  874. }
  875. PRE_SYSCALL(compat_50_select)
  876. (long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
  877. /* TODO */
  878. }
  879. POST_SYSCALL(compat_50_select)
  880. (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
  881. /* TODO */
  882. }
  883. /* syscall 94 has been skipped */
  884. PRE_SYSCALL(fsync)(long long fd_) { /* Nothing to do */ }
  885. POST_SYSCALL(fsync)(long long res, long long fd_) { /* Nothing to do */ }
  886. PRE_SYSCALL(setpriority)(long long which_, long long who_, long long prio_) {
  887. /* Nothing to do */
  888. }
  889. POST_SYSCALL(setpriority)
  890. (long long res, long long which_, long long who_, long long prio_) {
  891. /* Nothing to do */
  892. }
  893. PRE_SYSCALL(compat_30_socket)
  894. (long long domain_, long long type_, long long protocol_) {
  895. /* TODO */
  896. }
  897. POST_SYSCALL(compat_30_socket)
  898. (long long res, long long domain_, long long type_, long long protocol_) {
  899. /* TODO */
  900. }
  901. PRE_SYSCALL(connect)(long long s_, void *name_, long long namelen_) {
  902. PRE_READ(name_, namelen_);
  903. }
  904. POST_SYSCALL(connect)
  905. (long long res, long long s_, void *name_, long long namelen_) {
  906. if (res == 0) {
  907. POST_READ(name_, namelen_);
  908. }
  909. }
  910. PRE_SYSCALL(compat_43_oaccept)(long long s_, void *name_, void *anamelen_) {
  911. /* TODO */
  912. }
  913. POST_SYSCALL(compat_43_oaccept)
  914. (long long res, long long s_, void *name_, void *anamelen_) {
  915. /* TODO */
  916. }
  917. PRE_SYSCALL(getpriority)(long long which_, long long who_) {
  918. /* Nothing to do */
  919. }
  920. POST_SYSCALL(getpriority)(long long res, long long which_, long long who_) {
  921. /* Nothing to do */
  922. }
  923. PRE_SYSCALL(compat_43_osend)
  924. (long long s_, void *buf_, long long len_, long long flags_) {
  925. /* TODO */
  926. }
  927. POST_SYSCALL(compat_43_osend)
  928. (long long res, long long s_, void *buf_, long long len_, long long flags_) {
  929. /* TODO */
  930. }
  931. PRE_SYSCALL(compat_43_orecv)
  932. (long long s_, void *buf_, long long len_, long long flags_) {
  933. /* TODO */
  934. }
  935. POST_SYSCALL(compat_43_orecv)
  936. (long long res, long long s_, void *buf_, long long len_, long long flags_) {
  937. /* TODO */
  938. }
  939. PRE_SYSCALL(compat_13_sigreturn13)(void *sigcntxp_) { /* TODO */ }
  940. POST_SYSCALL(compat_13_sigreturn13)(long long res, void *sigcntxp_) {
  941. /* TODO */
  942. }
  943. PRE_SYSCALL(bind)(long long s_, void *name_, long long namelen_) {
  944. PRE_READ(name_, namelen_);
  945. }
  946. POST_SYSCALL(bind)
  947. (long long res, long long s_, void *name_, long long namelen_) {
  948. if (res == 0) {
  949. PRE_READ(name_, namelen_);
  950. }
  951. }
  952. PRE_SYSCALL(setsockopt)
  953. (long long s_, long long level_, long long name_, void *val_,
  954. long long valsize_) {
  955. if (val_) {
  956. PRE_READ(val_, valsize_);
  957. }
  958. }
  959. POST_SYSCALL(setsockopt)
  960. (long long res, long long s_, long long level_, long long name_, void *val_,
  961. long long valsize_) {
  962. if (res == 0) {
  963. if (val_) {
  964. POST_READ(val_, valsize_);
  965. }
  966. }
  967. }
  968. PRE_SYSCALL(listen)(long long s_, long long backlog_) { /* Nothing to do */ }
  969. POST_SYSCALL(listen)(long long res, long long s_, long long backlog_) {
  970. /* Nothing to do */
  971. }
  972. /* syscall 107 has been skipped */
  973. PRE_SYSCALL(compat_43_osigvec)(long long signum_, void *nsv_, void *osv_) {
  974. /* TODO */
  975. }
  976. POST_SYSCALL(compat_43_osigvec)
  977. (long long res, long long signum_, void *nsv_, void *osv_) {
  978. /* TODO */
  979. }
  980. PRE_SYSCALL(compat_43_osigblock)(long long mask_) { /* TODO */ }
  981. POST_SYSCALL(compat_43_osigblock)(long long res, long long mask_) { /* TODO */ }
  982. PRE_SYSCALL(compat_43_osigsetmask)(long long mask_) { /* TODO */ }
  983. POST_SYSCALL(compat_43_osigsetmask)(long long res, long long mask_) {
  984. /* TODO */
  985. }
  986. PRE_SYSCALL(compat_13_sigsuspend13)(long long mask_) { /* TODO */ }
  987. POST_SYSCALL(compat_13_sigsuspend13)(long long res, long long mask_) {
  988. /* TODO */
  989. }
  990. PRE_SYSCALL(compat_43_osigstack)(void *nss_, void *oss_) { /* TODO */ }
  991. POST_SYSCALL(compat_43_osigstack)(long long res, void *nss_, void *oss_) {
  992. /* TODO */
  993. }
  994. PRE_SYSCALL(compat_43_orecvmsg)(long long s_, void *msg_, long long flags_) {
  995. /* TODO */
  996. }
  997. POST_SYSCALL(compat_43_orecvmsg)
  998. (long long res, long long s_, void *msg_, long long flags_) {
  999. /* TODO */
  1000. }
  1001. PRE_SYSCALL(compat_43_osendmsg)(long long s_, void *msg_, long long flags_) {
  1002. /* TODO */
  1003. }
  1004. POST_SYSCALL(compat_43_osendmsg)
  1005. (long long res, long long s_, void *msg_, long long flags_) {
  1006. /* TODO */
  1007. }
  1008. /* syscall 115 has been skipped */
  1009. PRE_SYSCALL(compat_50_gettimeofday)(void *tp_, void *tzp_) { /* TODO */ }
  1010. POST_SYSCALL(compat_50_gettimeofday)(long long res, void *tp_, void *tzp_) {
  1011. /* TODO */
  1012. }
  1013. PRE_SYSCALL(compat_50_getrusage)(long long who_, void *rusage_) { /* TODO */ }
  1014. POST_SYSCALL(compat_50_getrusage)
  1015. (long long res, long long who_, void *rusage_) {
  1016. /* TODO */
  1017. }
  1018. PRE_SYSCALL(getsockopt)
  1019. (long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
  1020. /* TODO */
  1021. }
  1022. POST_SYSCALL(getsockopt)
  1023. (long long res, long long s_, long long level_, long long name_, void *val_,
  1024. void *avalsize_) {
  1025. /* TODO */
  1026. }
  1027. /* syscall 119 has been skipped */
  1028. PRE_SYSCALL(readv)(long long fd_, void *iovp_, long long iovcnt_) {
  1029. struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
  1030. int i;
  1031. if (iovp) {
  1032. PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
  1033. for (i = 0; i < iovcnt_; i++) {
  1034. PRE_WRITE(iovp[i].iov_base, iovp[i].iov_len);
  1035. }
  1036. }
  1037. }
  1038. POST_SYSCALL(readv)
  1039. (long long res, long long fd_, void *iovp_, long long iovcnt_) {
  1040. struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
  1041. int i;
  1042. uptr m, n = res;
  1043. if (res > 0) {
  1044. if (iovp) {
  1045. POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
  1046. for (i = 0; i < iovcnt_ && n > 0; i++) {
  1047. m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
  1048. POST_WRITE(iovp[i].iov_base, m);
  1049. n -= m;
  1050. }
  1051. }
  1052. }
  1053. }
  1054. PRE_SYSCALL(writev)(long long fd_, void *iovp_, long long iovcnt_) {
  1055. struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
  1056. int i;
  1057. if (iovp) {
  1058. PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
  1059. for (i = 0; i < iovcnt_; i++) {
  1060. PRE_READ(iovp[i].iov_base, iovp[i].iov_len);
  1061. }
  1062. }
  1063. }
  1064. POST_SYSCALL(writev)
  1065. (long long res, long long fd_, void *iovp_, long long iovcnt_) {
  1066. struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
  1067. int i;
  1068. uptr m, n = res;
  1069. if (res > 0) {
  1070. if (iovp) {
  1071. POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
  1072. for (i = 0; i < iovcnt_ && n > 0; i++) {
  1073. m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
  1074. POST_READ(iovp[i].iov_base, m);
  1075. n -= m;
  1076. }
  1077. }
  1078. }
  1079. }
  1080. PRE_SYSCALL(compat_50_settimeofday)(void *tv_, void *tzp_) { /* TODO */ }
  1081. POST_SYSCALL(compat_50_settimeofday)(long long res, void *tv_, void *tzp_) {
  1082. /* TODO */
  1083. }
  1084. PRE_SYSCALL(fchown)(long long fd_, long long uid_, long long gid_) {
  1085. /* Nothing to do */
  1086. }
  1087. POST_SYSCALL(fchown)
  1088. (long long res, long long fd_, long long uid_, long long gid_) {
  1089. /* Nothing to do */
  1090. }
  1091. PRE_SYSCALL(fchmod)(long long fd_, long long mode_) { /* Nothing to do */ }
  1092. POST_SYSCALL(fchmod)(long long res, long long fd_, long long mode_) {
  1093. /* Nothing to do */
  1094. }
  1095. PRE_SYSCALL(compat_43_orecvfrom)
  1096. (long long s_, void *buf_, long long len_, long long flags_, void *from_,
  1097. void *fromlenaddr_) {
  1098. /* TODO */
  1099. }
  1100. POST_SYSCALL(compat_43_orecvfrom)
  1101. (long long res, long long s_, void *buf_, long long len_, long long flags_,
  1102. void *from_, void *fromlenaddr_) {
  1103. /* TODO */
  1104. }
  1105. PRE_SYSCALL(setreuid)(long long ruid_, long long euid_) { /* Nothing to do */ }
  1106. POST_SYSCALL(setreuid)(long long res, long long ruid_, long long euid_) {
  1107. /* Nothing to do */
  1108. }
  1109. PRE_SYSCALL(setregid)(long long rgid_, long long egid_) { /* Nothing to do */ }
  1110. POST_SYSCALL(setregid)(long long res, long long rgid_, long long egid_) {
  1111. /* Nothing to do */
  1112. }
  1113. PRE_SYSCALL(rename)(void *from_, void *to_) {
  1114. const char *from = (const char *)from_;
  1115. const char *to = (const char *)to_;
  1116. if (from) {
  1117. PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
  1118. }
  1119. if (to) {
  1120. PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
  1121. }
  1122. }
  1123. POST_SYSCALL(rename)(long long res, void *from_, void *to_) {
  1124. if (res == 0) {
  1125. const char *from = (const char *)from_;
  1126. const char *to = (const char *)to_;
  1127. if (from) {
  1128. POST_READ(from, __sanitizer::internal_strlen(from) + 1);
  1129. }
  1130. if (to) {
  1131. POST_READ(to, __sanitizer::internal_strlen(to) + 1);
  1132. }
  1133. }
  1134. }
  1135. PRE_SYSCALL(compat_43_otruncate)(void *path_, long long length_) { /* TODO */ }
  1136. POST_SYSCALL(compat_43_otruncate)
  1137. (long long res, void *path_, long long length_) {
  1138. /* TODO */
  1139. }
  1140. PRE_SYSCALL(compat_43_oftruncate)(long long fd_, long long length_) {
  1141. /* TODO */
  1142. }
  1143. POST_SYSCALL(compat_43_oftruncate)
  1144. (long long res, long long fd_, long long length_) {
  1145. /* TODO */
  1146. }
  1147. PRE_SYSCALL(flock)(long long fd_, long long how_) { /* Nothing to do */ }
  1148. POST_SYSCALL(flock)(long long res, long long fd_, long long how_) {
  1149. /* Nothing to do */
  1150. }
  1151. PRE_SYSCALL(mkfifo)(void *path_, long long mode_) {
  1152. const char *path = (const char *)path_;
  1153. if (path) {
  1154. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  1155. }
  1156. }
  1157. POST_SYSCALL(mkfifo)(long long res, void *path_, long long mode_) {
  1158. if (res == 0) {
  1159. const char *path = (const char *)path_;
  1160. if (path) {
  1161. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  1162. }
  1163. }
  1164. }
  1165. PRE_SYSCALL(sendto)
  1166. (long long s_, void *buf_, long long len_, long long flags_, void *to_,
  1167. long long tolen_) {
  1168. PRE_READ(buf_, len_);
  1169. PRE_READ(to_, tolen_);
  1170. }
  1171. POST_SYSCALL(sendto)
  1172. (long long res, long long s_, void *buf_, long long len_, long long flags_,
  1173. void *to_, long long tolen_) {
  1174. if (res >= 0) {
  1175. POST_READ(buf_, len_);
  1176. POST_READ(to_, tolen_);
  1177. }
  1178. }
  1179. PRE_SYSCALL(shutdown)(long long s_, long long how_) { /* Nothing to do */ }
  1180. POST_SYSCALL(shutdown)(long long res, long long s_, long long how_) {
  1181. /* Nothing to do */
  1182. }
  1183. PRE_SYSCALL(socketpair)
  1184. (long long domain_, long long type_, long long protocol_, void *rsv_) {
  1185. PRE_WRITE(rsv_, 2 * sizeof(int));
  1186. }
  1187. POST_SYSCALL(socketpair)
  1188. (long long res, long long domain_, long long type_, long long protocol_,
  1189. void *rsv_) {
  1190. if (res == 0) {
  1191. POST_WRITE(rsv_, 2 * sizeof(int));
  1192. }
  1193. }
  1194. PRE_SYSCALL(mkdir)(void *path_, long long mode_) {
  1195. const char *path = (const char *)path_;
  1196. if (path) {
  1197. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  1198. }
  1199. }
  1200. POST_SYSCALL(mkdir)(long long res, void *path_, long long mode_) {
  1201. if (res == 0) {
  1202. const char *path = (const char *)path_;
  1203. if (path) {
  1204. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  1205. }
  1206. }
  1207. }
  1208. PRE_SYSCALL(rmdir)(void *path_) {
  1209. const char *path = (const char *)path_;
  1210. if (path) {
  1211. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  1212. }
  1213. }
  1214. POST_SYSCALL(rmdir)(long long res, void *path_) {
  1215. if (res == 0) {
  1216. const char *path = (const char *)path_;
  1217. if (path) {
  1218. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  1219. }
  1220. }
  1221. }
  1222. PRE_SYSCALL(compat_50_utimes)(void *path_, void *tptr_) { /* TODO */ }
  1223. POST_SYSCALL(compat_50_utimes)(long long res, void *path_, void *tptr_) {
  1224. /* TODO */
  1225. }
  1226. /* syscall 139 has been skipped */
  1227. PRE_SYSCALL(compat_50_adjtime)(void *delta_, void *olddelta_) { /* TODO */ }
  1228. POST_SYSCALL(compat_50_adjtime)(long long res, void *delta_, void *olddelta_) {
  1229. /* TODO */
  1230. }
  1231. PRE_SYSCALL(compat_43_ogetpeername)(long long fdes_, void *asa_, void *alen_) {
  1232. /* TODO */
  1233. }
  1234. POST_SYSCALL(compat_43_ogetpeername)
  1235. (long long res, long long fdes_, void *asa_, void *alen_) {
  1236. /* TODO */
  1237. }
  1238. PRE_SYSCALL(compat_43_ogethostid)(void) { /* TODO */ }
  1239. POST_SYSCALL(compat_43_ogethostid)(long long res) { /* TODO */ }
  1240. PRE_SYSCALL(compat_43_osethostid)(long long hostid_) { /* TODO */ }
  1241. POST_SYSCALL(compat_43_osethostid)(long long res, long long hostid_) {
  1242. /* TODO */
  1243. }
  1244. PRE_SYSCALL(compat_43_ogetrlimit)(long long which_, void *rlp_) { /* TODO */ }
  1245. POST_SYSCALL(compat_43_ogetrlimit)
  1246. (long long res, long long which_, void *rlp_) {
  1247. /* TODO */
  1248. }
  1249. PRE_SYSCALL(compat_43_osetrlimit)(long long which_, void *rlp_) { /* TODO */ }
  1250. POST_SYSCALL(compat_43_osetrlimit)
  1251. (long long res, long long which_, void *rlp_) {
  1252. /* TODO */
  1253. }
  1254. PRE_SYSCALL(compat_43_okillpg)(long long pgid_, long long signum_) {
  1255. /* TODO */
  1256. }
  1257. POST_SYSCALL(compat_43_okillpg)
  1258. (long long res, long long pgid_, long long signum_) {
  1259. /* TODO */
  1260. }
  1261. PRE_SYSCALL(setsid)(void) { /* Nothing to do */ }
  1262. POST_SYSCALL(setsid)(long long res) { /* Nothing to do */ }
  1263. PRE_SYSCALL(compat_50_quotactl)
  1264. (void *path_, long long cmd_, long long uid_, void *arg_) {
  1265. /* TODO */
  1266. }
  1267. POST_SYSCALL(compat_50_quotactl)
  1268. (long long res, void *path_, long long cmd_, long long uid_, void *arg_) {
  1269. /* TODO */
  1270. }
  1271. PRE_SYSCALL(compat_43_oquota)(void) { /* TODO */ }
  1272. POST_SYSCALL(compat_43_oquota)(long long res) { /* TODO */ }
  1273. PRE_SYSCALL(compat_43_ogetsockname)(long long fdec_, void *asa_, void *alen_) {
  1274. /* TODO */
  1275. }
  1276. POST_SYSCALL(compat_43_ogetsockname)
  1277. (long long res, long long fdec_, void *asa_, void *alen_) {
  1278. /* TODO */
  1279. }
  1280. /* syscall 151 has been skipped */
  1281. /* syscall 152 has been skipped */
  1282. /* syscall 153 has been skipped */
  1283. /* syscall 154 has been skipped */
  1284. PRE_SYSCALL(nfssvc)(long long flag_, void *argp_) { /* Nothing to do */ }
  1285. POST_SYSCALL(nfssvc)(long long res, long long flag_, void *argp_) {
  1286. /* Nothing to do */
  1287. }
  1288. PRE_SYSCALL(compat_43_ogetdirentries)
  1289. (long long fd_, void *buf_, long long count_, void *basep_) {
  1290. /* TODO */
  1291. }
  1292. POST_SYSCALL(compat_43_ogetdirentries)
  1293. (long long res, long long fd_, void *buf_, long long count_, void *basep_) {
  1294. /* TODO */
  1295. }
  1296. PRE_SYSCALL(compat_20_statfs)(void *path_, void *buf_) { /* TODO */ }
  1297. POST_SYSCALL(compat_20_statfs)(long long res, void *path_, void *buf_) {
  1298. /* TODO */
  1299. }
  1300. PRE_SYSCALL(compat_20_fstatfs)(long long fd_, void *buf_) { /* TODO */ }
  1301. POST_SYSCALL(compat_20_fstatfs)(long long res, long long fd_, void *buf_) {
  1302. /* TODO */
  1303. }
  1304. /* syscall 159 has been skipped */
  1305. /* syscall 160 has been skipped */
  1306. PRE_SYSCALL(compat_30_getfh)(void *fname_, void *fhp_) { /* TODO */ }
  1307. POST_SYSCALL(compat_30_getfh)(long long res, void *fname_, void *fhp_) {
  1308. /* TODO */
  1309. }
  1310. PRE_SYSCALL(compat_09_ogetdomainname)(void *domainname_, long long len_) {
  1311. /* TODO */
  1312. }
  1313. POST_SYSCALL(compat_09_ogetdomainname)
  1314. (long long res, void *domainname_, long long len_) {
  1315. /* TODO */
  1316. }
  1317. PRE_SYSCALL(compat_09_osetdomainname)(void *domainname_, long long len_) {
  1318. /* TODO */
  1319. }
  1320. POST_SYSCALL(compat_09_osetdomainname)
  1321. (long long res, void *domainname_, long long len_) {
  1322. /* TODO */
  1323. }
  1324. PRE_SYSCALL(compat_09_ouname)(void *name_) { /* TODO */ }
  1325. POST_SYSCALL(compat_09_ouname)(long long res, void *name_) { /* TODO */ }
  1326. PRE_SYSCALL(sysarch)(long long op_, void *parms_) { /* TODO */ }
  1327. POST_SYSCALL(sysarch)(long long res, long long op_, void *parms_) { /* TODO */ }
  1328. PRE_SYSCALL(__futex)
  1329. (void *uaddr_, long long op_, long long val_, void *timeout_, void *uaddr2_,
  1330. long long val2_, long long val3_) {
  1331. /* TODO */
  1332. }
  1333. POST_SYSCALL(__futex)
  1334. (long long res, void *uaddr_, long long op_, long long val_, void *timeout_,
  1335. void *uaddr2_, long long val2_, long long val3_) {
  1336. /* TODO */
  1337. }
  1338. PRE_SYSCALL(__futex_set_robust_list)(void *head_, long long len_) { /* TODO */ }
  1339. POST_SYSCALL(__futex_set_robust_list)
  1340. (long long res, void *head_, long long len_) {
  1341. /* TODO */
  1342. }
  1343. PRE_SYSCALL(__futex_get_robust_list)
  1344. (long long lwpid_, void **headp_, void *lenp_) {
  1345. /* TODO */
  1346. }
  1347. POST_SYSCALL(__futex_get_robust_list)
  1348. (long long res, long long lwpid_, void **headp_, void *lenp_) {
  1349. /* TODO */
  1350. }
  1351. #if !defined(_LP64)
  1352. PRE_SYSCALL(compat_10_osemsys)
  1353. (long long which_, long long a2_, long long a3_, long long a4_, long long a5_) {
  1354. /* TODO */
  1355. }
  1356. POST_SYSCALL(compat_10_osemsys)
  1357. (long long res, long long which_, long long a2_, long long a3_, long long a4_,
  1358. long long a5_) {
  1359. /* TODO */
  1360. }
  1361. #else
  1362. /* syscall 169 has been skipped */
  1363. #endif
  1364. #if !defined(_LP64)
  1365. PRE_SYSCALL(compat_10_omsgsys)
  1366. (long long which_, long long a2_, long long a3_, long long a4_, long long a5_,
  1367. long long a6_) {
  1368. /* TODO */
  1369. }
  1370. POST_SYSCALL(compat_10_omsgsys)
  1371. (long long res, long long which_, long long a2_, long long a3_, long long a4_,
  1372. long long a5_, long long a6_) {
  1373. /* TODO */
  1374. }
  1375. #else
  1376. /* syscall 170 has been skipped */
  1377. #endif
  1378. #if !defined(_LP64)
  1379. PRE_SYSCALL(compat_10_oshmsys)
  1380. (long long which_, long long a2_, long long a3_, long long a4_) {
  1381. /* TODO */
  1382. }
  1383. POST_SYSCALL(compat_10_oshmsys)
  1384. (long long res, long long which_, long long a2_, long long a3_, long long a4_) {
  1385. /* TODO */
  1386. }
  1387. #else
  1388. /* syscall 171 has been skipped */
  1389. #endif
  1390. /* syscall 172 has been skipped */
  1391. PRE_SYSCALL(pread)
  1392. (long long fd_, void *buf_, long long nbyte_, long long PAD_,
  1393. long long offset_) {
  1394. if (buf_) {
  1395. PRE_WRITE(buf_, nbyte_);
  1396. }
  1397. }
  1398. POST_SYSCALL(pread)
  1399. (long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
  1400. long long offset_) {
  1401. if (res > 0) {
  1402. POST_WRITE(buf_, res);
  1403. }
  1404. }
  1405. PRE_SYSCALL(pwrite)
  1406. (long long fd_, void *buf_, long long nbyte_, long long PAD_,
  1407. long long offset_) {
  1408. if (buf_) {
  1409. PRE_READ(buf_, nbyte_);
  1410. }
  1411. }
  1412. POST_SYSCALL(pwrite)
  1413. (long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
  1414. long long offset_) {
  1415. if (res > 0) {
  1416. POST_READ(buf_, res);
  1417. }
  1418. }
  1419. PRE_SYSCALL(compat_30_ntp_gettime)(void *ntvp_) { /* TODO */ }
  1420. POST_SYSCALL(compat_30_ntp_gettime)(long long res, void *ntvp_) { /* TODO */ }
  1421. #if defined(NTP) || !defined(_KERNEL_OPT)
  1422. PRE_SYSCALL(ntp_adjtime)(void *tp_) { /* Nothing to do */ }
  1423. POST_SYSCALL(ntp_adjtime)(long long res, void *tp_) { /* Nothing to do */ }
  1424. #else
  1425. /* syscall 176 has been skipped */
  1426. #endif
  1427. /* syscall 177 has been skipped */
  1428. /* syscall 178 has been skipped */
  1429. /* syscall 179 has been skipped */
  1430. /* syscall 180 has been skipped */
  1431. PRE_SYSCALL(setgid)(long long gid_) { /* Nothing to do */ }
  1432. POST_SYSCALL(setgid)(long long res, long long gid_) { /* Nothing to do */ }
  1433. PRE_SYSCALL(setegid)(long long egid_) { /* Nothing to do */ }
  1434. POST_SYSCALL(setegid)(long long res, long long egid_) { /* Nothing to do */ }
  1435. PRE_SYSCALL(seteuid)(long long euid_) { /* Nothing to do */ }
  1436. POST_SYSCALL(seteuid)(long long res, long long euid_) { /* Nothing to do */ }
  1437. PRE_SYSCALL(lfs_bmapv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
  1438. /* TODO */
  1439. }
  1440. POST_SYSCALL(lfs_bmapv)
  1441. (long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
  1442. /* TODO */
  1443. }
  1444. PRE_SYSCALL(lfs_markv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
  1445. /* TODO */
  1446. }
  1447. POST_SYSCALL(lfs_markv)
  1448. (long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
  1449. /* TODO */
  1450. }
  1451. PRE_SYSCALL(lfs_segclean)(void *fsidp_, long long segment_) { /* TODO */ }
  1452. POST_SYSCALL(lfs_segclean)(long long res, void *fsidp_, long long segment_) {
  1453. /* TODO */
  1454. }
  1455. PRE_SYSCALL(compat_50_lfs_segwait)(void *fsidp_, void *tv_) { /* TODO */ }
  1456. POST_SYSCALL(compat_50_lfs_segwait)(long long res, void *fsidp_, void *tv_) {
  1457. /* TODO */
  1458. }
  1459. PRE_SYSCALL(compat_12_stat12)(void *path_, void *ub_) { /* TODO */ }
  1460. POST_SYSCALL(compat_12_stat12)(long long res, void *path_, void *ub_) {
  1461. /* TODO */
  1462. }
  1463. PRE_SYSCALL(compat_12_fstat12)(long long fd_, void *sb_) { /* TODO */ }
  1464. POST_SYSCALL(compat_12_fstat12)(long long res, long long fd_, void *sb_) {
  1465. /* TODO */
  1466. }
  1467. PRE_SYSCALL(compat_12_lstat12)(void *path_, void *ub_) { /* TODO */ }
  1468. POST_SYSCALL(compat_12_lstat12)(long long res, void *path_, void *ub_) {
  1469. /* TODO */
  1470. }
  1471. PRE_SYSCALL(pathconf)(void *path_, long long name_) {
  1472. const char *path = (const char *)path_;
  1473. if (path) {
  1474. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  1475. }
  1476. }
  1477. POST_SYSCALL(pathconf)(long long res, void *path_, long long name_) {
  1478. if (res != -1) {
  1479. const char *path = (const char *)path_;
  1480. if (path) {
  1481. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  1482. }
  1483. }
  1484. }
  1485. PRE_SYSCALL(fpathconf)(long long fd_, long long name_) { /* Nothing to do */ }
  1486. POST_SYSCALL(fpathconf)(long long res, long long fd_, long long name_) {
  1487. /* Nothing to do */
  1488. }
  1489. PRE_SYSCALL(getsockopt2)
  1490. (long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
  1491. /* TODO */
  1492. }
  1493. POST_SYSCALL(getsockopt2)
  1494. (long long res, long long s_, long long level_, long long name_, void *val_,
  1495. void *avalsize_) {
  1496. /* TODO */
  1497. }
  1498. PRE_SYSCALL(getrlimit)(long long which_, void *rlp_) {
  1499. PRE_WRITE(rlp_, struct_rlimit_sz);
  1500. }
  1501. POST_SYSCALL(getrlimit)(long long res, long long which_, void *rlp_) {
  1502. if (res == 0) {
  1503. POST_WRITE(rlp_, struct_rlimit_sz);
  1504. }
  1505. }
  1506. PRE_SYSCALL(setrlimit)(long long which_, void *rlp_) {
  1507. PRE_READ(rlp_, struct_rlimit_sz);
  1508. }
  1509. POST_SYSCALL(setrlimit)(long long res, long long which_, void *rlp_) {
  1510. if (res == 0) {
  1511. POST_READ(rlp_, struct_rlimit_sz);
  1512. }
  1513. }
  1514. PRE_SYSCALL(compat_12_getdirentries)
  1515. (long long fd_, void *buf_, long long count_, void *basep_) {
  1516. /* TODO */
  1517. }
  1518. POST_SYSCALL(compat_12_getdirentries)
  1519. (long long res, long long fd_, void *buf_, long long count_, void *basep_) {
  1520. /* TODO */
  1521. }
  1522. PRE_SYSCALL(mmap)
  1523. (void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
  1524. long long PAD_, long long pos_) {
  1525. /* Nothing to do */
  1526. }
  1527. POST_SYSCALL(mmap)
  1528. (long long res, void *addr_, long long len_, long long prot_, long long flags_,
  1529. long long fd_, long long PAD_, long long pos_) {
  1530. /* Nothing to do */
  1531. }
  1532. PRE_SYSCALL(__syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
  1533. /* Nothing to do */
  1534. }
  1535. POST_SYSCALL(__syscall)
  1536. (long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
  1537. /* Nothing to do */
  1538. }
  1539. PRE_SYSCALL(lseek)
  1540. (long long fd_, long long PAD_, long long offset_, long long whence_) {
  1541. /* Nothing to do */
  1542. }
  1543. POST_SYSCALL(lseek)
  1544. (long long res, long long fd_, long long PAD_, long long offset_,
  1545. long long whence_) {
  1546. /* Nothing to do */
  1547. }
  1548. PRE_SYSCALL(truncate)(void *path_, long long PAD_, long long length_) {
  1549. const char *path = (const char *)path_;
  1550. if (path) {
  1551. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  1552. }
  1553. }
  1554. POST_SYSCALL(truncate)
  1555. (long long res, void *path_, long long PAD_, long long length_) {
  1556. if (res == 0) {
  1557. const char *path = (const char *)path_;
  1558. if (path) {
  1559. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  1560. }
  1561. }
  1562. }
  1563. PRE_SYSCALL(ftruncate)(long long fd_, long long PAD_, long long length_) {
  1564. /* Nothing to do */
  1565. }
  1566. POST_SYSCALL(ftruncate)
  1567. (long long res, long long fd_, long long PAD_, long long length_) {
  1568. /* Nothing to do */
  1569. }
  1570. PRE_SYSCALL(__sysctl)
  1571. (void *name_, long long namelen_, void *oldv_, void *oldlenp_, void *newv_,
  1572. long long newlen_) {
  1573. const int *name = (const int *)name_;
  1574. if (name) {
  1575. PRE_READ(name, namelen_ * sizeof(*name));
  1576. }
  1577. if (newv_) {
  1578. PRE_READ(name, newlen_);
  1579. }
  1580. }
  1581. POST_SYSCALL(__sysctl)
  1582. (long long res, void *name_, long long namelen_, void *oldv_, void *oldlenp_,
  1583. void *newv_, long long newlen_) {
  1584. if (res == 0) {
  1585. const int *name = (const int *)name_;
  1586. if (name) {
  1587. POST_READ(name, namelen_ * sizeof(*name));
  1588. }
  1589. if (newv_) {
  1590. POST_READ(name, newlen_);
  1591. }
  1592. }
  1593. }
  1594. PRE_SYSCALL(mlock)(void *addr_, long long len_) { /* Nothing to do */ }
  1595. POST_SYSCALL(mlock)(long long res, void *addr_, long long len_) {
  1596. /* Nothing to do */
  1597. }
  1598. PRE_SYSCALL(munlock)(void *addr_, long long len_) { /* Nothing to do */ }
  1599. POST_SYSCALL(munlock)(long long res, void *addr_, long long len_) {
  1600. /* Nothing to do */
  1601. }
  1602. PRE_SYSCALL(undelete)(void *path_) {
  1603. const char *path = (const char *)path_;
  1604. if (path) {
  1605. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  1606. }
  1607. }
  1608. POST_SYSCALL(undelete)(long long res, void *path_) {
  1609. if (res == 0) {
  1610. const char *path = (const char *)path_;
  1611. if (path) {
  1612. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  1613. }
  1614. }
  1615. }
  1616. PRE_SYSCALL(compat_50_futimes)(long long fd_, void *tptr_) { /* TODO */ }
  1617. POST_SYSCALL(compat_50_futimes)(long long res, long long fd_, void *tptr_) {
  1618. /* TODO */
  1619. }
  1620. PRE_SYSCALL(getpgid)(long long pid_) { /* Nothing to do */ }
  1621. POST_SYSCALL(getpgid)(long long res, long long pid_) { /* Nothing to do */ }
  1622. PRE_SYSCALL(reboot)(long long opt_, void *bootstr_) {
  1623. const char *bootstr = (const char *)bootstr_;
  1624. if (bootstr) {
  1625. PRE_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
  1626. }
  1627. }
  1628. POST_SYSCALL(reboot)(long long res, long long opt_, void *bootstr_) {
  1629. /* This call should never return */
  1630. const char *bootstr = (const char *)bootstr_;
  1631. if (bootstr) {
  1632. POST_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
  1633. }
  1634. }
  1635. PRE_SYSCALL(poll)(void *fds_, long long nfds_, long long timeout_) {
  1636. /* Nothing to do */
  1637. }
  1638. POST_SYSCALL(poll)
  1639. (long long res, void *fds_, long long nfds_, long long timeout_) {
  1640. /* Nothing to do */
  1641. }
  1642. PRE_SYSCALL(afssys)
  1643. (long long id_, long long a1_, long long a2_, long long a3_, long long a4_,
  1644. long long a5_, long long a6_) {
  1645. /* TODO */
  1646. }
  1647. POST_SYSCALL(afssys)
  1648. (long long res, long long id_, long long a1_, long long a2_, long long a3_,
  1649. long long a4_, long long a5_, long long a6_) {
  1650. /* TODO */
  1651. }
  1652. /* syscall 211 has been skipped */
  1653. /* syscall 212 has been skipped */
  1654. /* syscall 213 has been skipped */
  1655. /* syscall 214 has been skipped */
  1656. /* syscall 215 has been skipped */
  1657. /* syscall 216 has been skipped */
  1658. /* syscall 217 has been skipped */
  1659. /* syscall 218 has been skipped */
  1660. /* syscall 219 has been skipped */
  1661. PRE_SYSCALL(compat_14___semctl)
  1662. (long long semid_, long long semnum_, long long cmd_, void *arg_) {
  1663. /* TODO */
  1664. }
  1665. POST_SYSCALL(compat_14___semctl)
  1666. (long long res, long long semid_, long long semnum_, long long cmd_,
  1667. void *arg_) {
  1668. /* TODO */
  1669. }
  1670. PRE_SYSCALL(semget)(long long key_, long long nsems_, long long semflg_) {
  1671. /* Nothing to do */
  1672. }
  1673. POST_SYSCALL(semget)
  1674. (long long res, long long key_, long long nsems_, long long semflg_) {
  1675. /* Nothing to do */
  1676. }
  1677. PRE_SYSCALL(semop)(long long semid_, void *sops_, long long nsops_) {
  1678. if (sops_) {
  1679. PRE_READ(sops_, nsops_ * struct_sembuf_sz);
  1680. }
  1681. }
  1682. POST_SYSCALL(semop)
  1683. (long long res, long long semid_, void *sops_, long long nsops_) {
  1684. if (res == 0) {
  1685. if (sops_) {
  1686. POST_READ(sops_, nsops_ * struct_sembuf_sz);
  1687. }
  1688. }
  1689. }
  1690. PRE_SYSCALL(semconfig)(long long flag_) { /* Nothing to do */ }
  1691. POST_SYSCALL(semconfig)(long long res, long long flag_) { /* Nothing to do */ }
  1692. PRE_SYSCALL(compat_14_msgctl)(long long msqid_, long long cmd_, void *buf_) {
  1693. /* TODO */
  1694. }
  1695. POST_SYSCALL(compat_14_msgctl)
  1696. (long long res, long long msqid_, long long cmd_, void *buf_) {
  1697. /* TODO */
  1698. }
  1699. PRE_SYSCALL(msgget)(long long key_, long long msgflg_) { /* Nothing to do */ }
  1700. POST_SYSCALL(msgget)(long long res, long long key_, long long msgflg_) {
  1701. /* Nothing to do */
  1702. }
  1703. PRE_SYSCALL(msgsnd)
  1704. (long long msqid_, void *msgp_, long long msgsz_, long long msgflg_) {
  1705. if (msgp_) {
  1706. PRE_READ(msgp_, msgsz_);
  1707. }
  1708. }
  1709. POST_SYSCALL(msgsnd)
  1710. (long long res, long long msqid_, void *msgp_, long long msgsz_,
  1711. long long msgflg_) {
  1712. if (res == 0) {
  1713. if (msgp_) {
  1714. POST_READ(msgp_, msgsz_);
  1715. }
  1716. }
  1717. }
  1718. PRE_SYSCALL(msgrcv)
  1719. (long long msqid_, void *msgp_, long long msgsz_, long long msgtyp_,
  1720. long long msgflg_) {
  1721. /* Nothing to do */
  1722. }
  1723. POST_SYSCALL(msgrcv)
  1724. (long long res, long long msqid_, void *msgp_, long long msgsz_,
  1725. long long msgtyp_, long long msgflg_) {
  1726. /* Nothing to do */
  1727. }
  1728. PRE_SYSCALL(shmat)(long long shmid_, void *shmaddr_, long long shmflg_) {
  1729. /* Nothing to do */
  1730. }
  1731. POST_SYSCALL(shmat)
  1732. (long long res, long long shmid_, void *shmaddr_, long long shmflg_) {
  1733. /* Nothing to do */
  1734. }
  1735. PRE_SYSCALL(compat_14_shmctl)(long long shmid_, long long cmd_, void *buf_) {
  1736. /* TODO */
  1737. }
  1738. POST_SYSCALL(compat_14_shmctl)
  1739. (long long res, long long shmid_, long long cmd_, void *buf_) {
  1740. /* TODO */
  1741. }
  1742. PRE_SYSCALL(shmdt)(void *shmaddr_) { /* Nothing to do */ }
  1743. POST_SYSCALL(shmdt)(long long res, void *shmaddr_) { /* Nothing to do */ }
  1744. PRE_SYSCALL(shmget)(long long key_, long long size_, long long shmflg_) {
  1745. /* Nothing to do */
  1746. }
  1747. POST_SYSCALL(shmget)
  1748. (long long res, long long key_, long long size_, long long shmflg_) {
  1749. /* Nothing to do */
  1750. }
  1751. PRE_SYSCALL(compat_50_clock_gettime)(long long clock_id_, void *tp_) {
  1752. /* TODO */
  1753. }
  1754. POST_SYSCALL(compat_50_clock_gettime)
  1755. (long long res, long long clock_id_, void *tp_) {
  1756. /* TODO */
  1757. }
  1758. PRE_SYSCALL(compat_50_clock_settime)(long long clock_id_, void *tp_) {
  1759. /* TODO */
  1760. }
  1761. POST_SYSCALL(compat_50_clock_settime)
  1762. (long long res, long long clock_id_, void *tp_) {
  1763. /* TODO */
  1764. }
  1765. PRE_SYSCALL(compat_50_clock_getres)(long long clock_id_, void *tp_) {
  1766. /* TODO */
  1767. }
  1768. POST_SYSCALL(compat_50_clock_getres)
  1769. (long long res, long long clock_id_, void *tp_) {
  1770. /* TODO */
  1771. }
  1772. PRE_SYSCALL(timer_create)(long long clock_id_, void *evp_, void *timerid_) {
  1773. /* Nothing to do */
  1774. }
  1775. POST_SYSCALL(timer_create)
  1776. (long long res, long long clock_id_, void *evp_, void *timerid_) {
  1777. /* Nothing to do */
  1778. }
  1779. PRE_SYSCALL(timer_delete)(long long timerid_) { /* Nothing to do */ }
  1780. POST_SYSCALL(timer_delete)(long long res, long long timerid_) {
  1781. /* Nothing to do */
  1782. }
  1783. PRE_SYSCALL(compat_50_timer_settime)
  1784. (long long timerid_, long long flags_, void *value_, void *ovalue_) {
  1785. /* TODO */
  1786. }
  1787. POST_SYSCALL(compat_50_timer_settime)
  1788. (long long res, long long timerid_, long long flags_, void *value_,
  1789. void *ovalue_) {
  1790. /* TODO */
  1791. }
  1792. PRE_SYSCALL(compat_50_timer_gettime)(long long timerid_, void *value_) {
  1793. /* TODO */
  1794. }
  1795. POST_SYSCALL(compat_50_timer_gettime)
  1796. (long long res, long long timerid_, void *value_) {
  1797. /* TODO */
  1798. }
  1799. PRE_SYSCALL(timer_getoverrun)(long long timerid_) { /* Nothing to do */ }
  1800. POST_SYSCALL(timer_getoverrun)(long long res, long long timerid_) {
  1801. /* Nothing to do */
  1802. }
  1803. PRE_SYSCALL(compat_50_nanosleep)(void *rqtp_, void *rmtp_) { /* TODO */ }
  1804. POST_SYSCALL(compat_50_nanosleep)(long long res, void *rqtp_, void *rmtp_) {
  1805. /* TODO */
  1806. }
  1807. PRE_SYSCALL(fdatasync)(long long fd_) { /* Nothing to do */ }
  1808. POST_SYSCALL(fdatasync)(long long res, long long fd_) { /* Nothing to do */ }
  1809. PRE_SYSCALL(mlockall)(long long flags_) { /* Nothing to do */ }
  1810. POST_SYSCALL(mlockall)(long long res, long long flags_) { /* Nothing to do */ }
  1811. PRE_SYSCALL(munlockall)(void) { /* Nothing to do */ }
  1812. POST_SYSCALL(munlockall)(long long res) { /* Nothing to do */ }
  1813. PRE_SYSCALL(compat_50___sigtimedwait)(void *set_, void *info_, void *timeout_) {
  1814. /* TODO */
  1815. }
  1816. POST_SYSCALL(compat_50___sigtimedwait)
  1817. (long long res, void *set_, void *info_, void *timeout_) {
  1818. /* TODO */
  1819. }
  1820. PRE_SYSCALL(sigqueueinfo)(long long pid_, void *info_) {
  1821. if (info_) {
  1822. PRE_READ(info_, siginfo_t_sz);
  1823. }
  1824. }
  1825. POST_SYSCALL(sigqueueinfo)(long long res, long long pid_, void *info_) {}
  1826. PRE_SYSCALL(modctl)(long long cmd_, void *arg_) { /* TODO */ }
  1827. POST_SYSCALL(modctl)(long long res, long long cmd_, void *arg_) { /* TODO */ }
  1828. PRE_SYSCALL(_ksem_init)(long long value_, void *idp_) { /* Nothing to do */ }
  1829. POST_SYSCALL(_ksem_init)(long long res, long long value_, void *idp_) {
  1830. /* Nothing to do */
  1831. }
  1832. PRE_SYSCALL(_ksem_open)
  1833. (void *name_, long long oflag_, long long mode_, long long value_, void *idp_) {
  1834. const char *name = (const char *)name_;
  1835. if (name) {
  1836. PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
  1837. }
  1838. }
  1839. POST_SYSCALL(_ksem_open)
  1840. (long long res, void *name_, long long oflag_, long long mode_,
  1841. long long value_, void *idp_) {
  1842. const char *name = (const char *)name_;
  1843. if (name) {
  1844. POST_READ(name, __sanitizer::internal_strlen(name) + 1);
  1845. }
  1846. }
  1847. PRE_SYSCALL(_ksem_unlink)(void *name_) {
  1848. const char *name = (const char *)name_;
  1849. if (name) {
  1850. PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
  1851. }
  1852. }
  1853. POST_SYSCALL(_ksem_unlink)(long long res, void *name_) {
  1854. const char *name = (const char *)name_;
  1855. if (name) {
  1856. POST_READ(name, __sanitizer::internal_strlen(name) + 1);
  1857. }
  1858. }
  1859. PRE_SYSCALL(_ksem_close)(long long id_) { /* Nothing to do */ }
  1860. POST_SYSCALL(_ksem_close)(long long res, long long id_) { /* Nothing to do */ }
  1861. PRE_SYSCALL(_ksem_post)(long long id_) { /* Nothing to do */ }
  1862. POST_SYSCALL(_ksem_post)(long long res, long long id_) { /* Nothing to do */ }
  1863. PRE_SYSCALL(_ksem_wait)(long long id_) { /* Nothing to do */ }
  1864. POST_SYSCALL(_ksem_wait)(long long res, long long id_) { /* Nothing to do */ }
  1865. PRE_SYSCALL(_ksem_trywait)(long long id_) { /* Nothing to do */ }
  1866. POST_SYSCALL(_ksem_trywait)(long long res, long long id_) {
  1867. /* Nothing to do */
  1868. }
  1869. PRE_SYSCALL(_ksem_getvalue)(long long id_, void *value_) { /* Nothing to do */ }
  1870. POST_SYSCALL(_ksem_getvalue)(long long res, long long id_, void *value_) {
  1871. /* Nothing to do */
  1872. }
  1873. PRE_SYSCALL(_ksem_destroy)(long long id_) { /* Nothing to do */ }
  1874. POST_SYSCALL(_ksem_destroy)(long long res, long long id_) {
  1875. /* Nothing to do */
  1876. }
  1877. PRE_SYSCALL(_ksem_timedwait)(long long id_, void *abstime_) {
  1878. if (abstime_) {
  1879. PRE_READ(abstime_, struct_timespec_sz);
  1880. }
  1881. }
  1882. POST_SYSCALL(_ksem_timedwait)(long long res, long long id_, void *abstime_) {}
  1883. PRE_SYSCALL(mq_open)
  1884. (void *name_, long long oflag_, long long mode_, void *attr_) {
  1885. const char *name = (const char *)name_;
  1886. if (name) {
  1887. PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
  1888. }
  1889. }
  1890. POST_SYSCALL(mq_open)
  1891. (long long res, void *name_, long long oflag_, long long mode_, void *attr_) {
  1892. const char *name = (const char *)name_;
  1893. if (name) {
  1894. POST_READ(name, __sanitizer::internal_strlen(name) + 1);
  1895. }
  1896. }
  1897. PRE_SYSCALL(mq_close)(long long mqdes_) { /* Nothing to do */ }
  1898. POST_SYSCALL(mq_close)(long long res, long long mqdes_) { /* Nothing to do */ }
  1899. PRE_SYSCALL(mq_unlink)(void *name_) {
  1900. const char *name = (const char *)name_;
  1901. if (name) {
  1902. PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
  1903. }
  1904. }
  1905. POST_SYSCALL(mq_unlink)(long long res, void *name_) {
  1906. const char *name = (const char *)name_;
  1907. if (name) {
  1908. POST_READ(name, __sanitizer::internal_strlen(name) + 1);
  1909. }
  1910. }
  1911. PRE_SYSCALL(mq_getattr)(long long mqdes_, void *mqstat_) { /* Nothing to do */ }
  1912. POST_SYSCALL(mq_getattr)(long long res, long long mqdes_, void *mqstat_) {
  1913. /* Nothing to do */
  1914. }
  1915. PRE_SYSCALL(mq_setattr)(long long mqdes_, void *mqstat_, void *omqstat_) {
  1916. if (mqstat_) {
  1917. PRE_READ(mqstat_, struct_mq_attr_sz);
  1918. }
  1919. }
  1920. POST_SYSCALL(mq_setattr)
  1921. (long long res, long long mqdes_, void *mqstat_, void *omqstat_) {}
  1922. PRE_SYSCALL(mq_notify)(long long mqdes_, void *notification_) {
  1923. if (notification_) {
  1924. PRE_READ(notification_, struct_sigevent_sz);
  1925. }
  1926. }
  1927. POST_SYSCALL(mq_notify)(long long res, long long mqdes_, void *notification_) {}
  1928. PRE_SYSCALL(mq_send)
  1929. (long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_) {
  1930. if (msg_ptr_) {
  1931. PRE_READ(msg_ptr_, msg_len_);
  1932. }
  1933. }
  1934. POST_SYSCALL(mq_send)
  1935. (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
  1936. long long msg_prio_) {}
  1937. PRE_SYSCALL(mq_receive)
  1938. (long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_) {
  1939. /* Nothing to do */
  1940. }
  1941. POST_SYSCALL(mq_receive)
  1942. (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
  1943. void *msg_prio_) {
  1944. /* Nothing to do */
  1945. }
  1946. PRE_SYSCALL(compat_50_mq_timedsend)
  1947. (long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
  1948. void *abs_timeout_) {
  1949. /* TODO */
  1950. }
  1951. POST_SYSCALL(compat_50_mq_timedsend)
  1952. (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
  1953. long long msg_prio_, void *abs_timeout_) {
  1954. /* TODO */
  1955. }
  1956. PRE_SYSCALL(compat_50_mq_timedreceive)
  1957. (long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
  1958. void *abs_timeout_) {
  1959. /* TODO */
  1960. }
  1961. POST_SYSCALL(compat_50_mq_timedreceive)
  1962. (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
  1963. void *msg_prio_, void *abs_timeout_) {
  1964. /* TODO */
  1965. }
  1966. /* syscall 267 has been skipped */
  1967. /* syscall 268 has been skipped */
  1968. /* syscall 269 has been skipped */
  1969. PRE_SYSCALL(__posix_rename)(void *from_, void *to_) {
  1970. const char *from = (const char *)from_;
  1971. const char *to = (const char *)to_;
  1972. if (from_) {
  1973. PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
  1974. }
  1975. if (to) {
  1976. PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
  1977. }
  1978. }
  1979. POST_SYSCALL(__posix_rename)(long long res, void *from_, void *to_) {
  1980. const char *from = (const char *)from_;
  1981. const char *to = (const char *)to_;
  1982. if (from) {
  1983. POST_READ(from, __sanitizer::internal_strlen(from) + 1);
  1984. }
  1985. if (to) {
  1986. POST_READ(to, __sanitizer::internal_strlen(to) + 1);
  1987. }
  1988. }
  1989. PRE_SYSCALL(swapctl)(long long cmd_, void *arg_, long long misc_) { /* TODO */ }
  1990. POST_SYSCALL(swapctl)
  1991. (long long res, long long cmd_, void *arg_, long long misc_) {
  1992. /* TODO */
  1993. }
  1994. PRE_SYSCALL(compat_30_getdents)(long long fd_, void *buf_, long long count_) {
  1995. /* TODO */
  1996. }
  1997. POST_SYSCALL(compat_30_getdents)
  1998. (long long res, long long fd_, void *buf_, long long count_) {
  1999. /* TODO */
  2000. }
  2001. PRE_SYSCALL(minherit)(void *addr_, long long len_, long long inherit_) {
  2002. /* Nothing to do */
  2003. }
  2004. POST_SYSCALL(minherit)
  2005. (long long res, void *addr_, long long len_, long long inherit_) {
  2006. /* Nothing to do */
  2007. }
  2008. PRE_SYSCALL(lchmod)(void *path_, long long mode_) {
  2009. const char *path = (const char *)path_;
  2010. if (path) {
  2011. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2012. }
  2013. }
  2014. POST_SYSCALL(lchmod)(long long res, void *path_, long long mode_) {
  2015. const char *path = (const char *)path_;
  2016. if (path) {
  2017. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2018. }
  2019. }
  2020. PRE_SYSCALL(lchown)(void *path_, long long uid_, long long gid_) {
  2021. const char *path = (const char *)path_;
  2022. if (path) {
  2023. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2024. }
  2025. }
  2026. POST_SYSCALL(lchown)
  2027. (long long res, void *path_, long long uid_, long long gid_) {
  2028. const char *path = (const char *)path_;
  2029. if (path) {
  2030. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2031. }
  2032. }
  2033. PRE_SYSCALL(compat_50_lutimes)(void *path_, void *tptr_) { /* TODO */ }
  2034. POST_SYSCALL(compat_50_lutimes)(long long res, void *path_, void *tptr_) {
  2035. /* TODO */
  2036. }
  2037. PRE_SYSCALL(__msync13)(void *addr_, long long len_, long long flags_) {
  2038. /* Nothing to do */
  2039. }
  2040. POST_SYSCALL(__msync13)
  2041. (long long res, void *addr_, long long len_, long long flags_) {
  2042. /* Nothing to do */
  2043. }
  2044. PRE_SYSCALL(compat_30___stat13)(void *path_, void *ub_) { /* TODO */ }
  2045. POST_SYSCALL(compat_30___stat13)(long long res, void *path_, void *ub_) {
  2046. /* TODO */
  2047. }
  2048. PRE_SYSCALL(compat_30___fstat13)(long long fd_, void *sb_) { /* TODO */ }
  2049. POST_SYSCALL(compat_30___fstat13)(long long res, long long fd_, void *sb_) {
  2050. /* TODO */
  2051. }
  2052. PRE_SYSCALL(compat_30___lstat13)(void *path_, void *ub_) { /* TODO */ }
  2053. POST_SYSCALL(compat_30___lstat13)(long long res, void *path_, void *ub_) {
  2054. /* TODO */
  2055. }
  2056. PRE_SYSCALL(__sigaltstack14)(void *nss_, void *oss_) {
  2057. if (nss_) {
  2058. PRE_READ(nss_, struct_sigaltstack_sz);
  2059. }
  2060. if (oss_) {
  2061. PRE_READ(oss_, struct_sigaltstack_sz);
  2062. }
  2063. }
  2064. POST_SYSCALL(__sigaltstack14)(long long res, void *nss_, void *oss_) {}
  2065. PRE_SYSCALL(__vfork14)(void) { /* Nothing to do */ }
  2066. POST_SYSCALL(__vfork14)(long long res) { /* Nothing to do */ }
  2067. PRE_SYSCALL(__posix_chown)(void *path_, long long uid_, long long gid_) {
  2068. const char *path = (const char *)path_;
  2069. if (path) {
  2070. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2071. }
  2072. }
  2073. POST_SYSCALL(__posix_chown)
  2074. (long long res, void *path_, long long uid_, long long gid_) {
  2075. const char *path = (const char *)path_;
  2076. if (path) {
  2077. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2078. }
  2079. }
  2080. PRE_SYSCALL(__posix_fchown)(long long fd_, long long uid_, long long gid_) {
  2081. /* Nothing to do */
  2082. }
  2083. POST_SYSCALL(__posix_fchown)
  2084. (long long res, long long fd_, long long uid_, long long gid_) {
  2085. /* Nothing to do */
  2086. }
  2087. PRE_SYSCALL(__posix_lchown)(void *path_, long long uid_, long long gid_) {
  2088. const char *path = (const char *)path_;
  2089. if (path) {
  2090. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2091. }
  2092. }
  2093. POST_SYSCALL(__posix_lchown)
  2094. (long long res, void *path_, long long uid_, long long gid_) {
  2095. const char *path = (const char *)path_;
  2096. if (path) {
  2097. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2098. }
  2099. }
  2100. PRE_SYSCALL(getsid)(long long pid_) { /* Nothing to do */ }
  2101. POST_SYSCALL(getsid)(long long res, long long pid_) { /* Nothing to do */ }
  2102. PRE_SYSCALL(__clone)(long long flags_, void *stack_) { /* Nothing to do */ }
  2103. POST_SYSCALL(__clone)(long long res, long long flags_, void *stack_) {
  2104. /* Nothing to do */
  2105. }
  2106. PRE_SYSCALL(fktrace)
  2107. (long long fd_, long long ops_, long long facs_, long long pid_) {
  2108. /* Nothing to do */
  2109. }
  2110. POST_SYSCALL(fktrace)
  2111. (long long res, long long fd_, long long ops_, long long facs_,
  2112. long long pid_) {
  2113. /* Nothing to do */
  2114. }
  2115. PRE_SYSCALL(preadv)
  2116. (long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
  2117. long long offset_) {
  2118. /* Nothing to do */
  2119. }
  2120. POST_SYSCALL(preadv)
  2121. (long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
  2122. long long offset_) {
  2123. /* Nothing to do */
  2124. }
  2125. PRE_SYSCALL(pwritev)
  2126. (long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
  2127. long long offset_) {
  2128. /* Nothing to do */
  2129. }
  2130. POST_SYSCALL(pwritev)
  2131. (long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
  2132. long long offset_) {
  2133. /* Nothing to do */
  2134. }
  2135. PRE_SYSCALL(compat_16___sigaction14)
  2136. (long long signum_, void *nsa_, void *osa_) {
  2137. /* TODO */
  2138. }
  2139. POST_SYSCALL(compat_16___sigaction14)
  2140. (long long res, long long signum_, void *nsa_, void *osa_) {
  2141. /* TODO */
  2142. }
  2143. PRE_SYSCALL(__sigpending14)(void *set_) { /* Nothing to do */ }
  2144. POST_SYSCALL(__sigpending14)(long long res, void *set_) { /* Nothing to do */ }
  2145. PRE_SYSCALL(__sigprocmask14)(long long how_, void *set_, void *oset_) {
  2146. /* Nothing to do */
  2147. }
  2148. POST_SYSCALL(__sigprocmask14)
  2149. (long long res, long long how_, void *set_, void *oset_) {
  2150. /* Nothing to do */
  2151. }
  2152. PRE_SYSCALL(__sigsuspend14)(void *set_) {
  2153. if (set_) {
  2154. PRE_READ(set_, sizeof(__sanitizer_sigset_t));
  2155. }
  2156. }
  2157. POST_SYSCALL(__sigsuspend14)(long long res, void *set_) {
  2158. if (set_) {
  2159. PRE_READ(set_, sizeof(__sanitizer_sigset_t));
  2160. }
  2161. }
  2162. PRE_SYSCALL(compat_16___sigreturn14)(void *sigcntxp_) { /* TODO */ }
  2163. POST_SYSCALL(compat_16___sigreturn14)(long long res, void *sigcntxp_) {
  2164. /* TODO */
  2165. }
  2166. PRE_SYSCALL(__getcwd)(void *bufp_, long long length_) { /* Nothing to do */ }
  2167. POST_SYSCALL(__getcwd)(long long res, void *bufp_, long long length_) {
  2168. /* Nothing to do */
  2169. }
  2170. PRE_SYSCALL(fchroot)(long long fd_) { /* Nothing to do */ }
  2171. POST_SYSCALL(fchroot)(long long res, long long fd_) { /* Nothing to do */ }
  2172. PRE_SYSCALL(compat_30_fhopen)(void *fhp_, long long flags_) { /* TODO */ }
  2173. POST_SYSCALL(compat_30_fhopen)(long long res, void *fhp_, long long flags_) {
  2174. /* TODO */
  2175. }
  2176. PRE_SYSCALL(compat_30_fhstat)(void *fhp_, void *sb_) { /* TODO */ }
  2177. POST_SYSCALL(compat_30_fhstat)(long long res, void *fhp_, void *sb_) {
  2178. /* TODO */
  2179. }
  2180. PRE_SYSCALL(compat_20_fhstatfs)(void *fhp_, void *buf_) { /* TODO */ }
  2181. POST_SYSCALL(compat_20_fhstatfs)(long long res, void *fhp_, void *buf_) {
  2182. /* TODO */
  2183. }
  2184. PRE_SYSCALL(compat_50_____semctl13)
  2185. (long long semid_, long long semnum_, long long cmd_, void *arg_) {
  2186. /* TODO */
  2187. }
  2188. POST_SYSCALL(compat_50_____semctl13)
  2189. (long long res, long long semid_, long long semnum_, long long cmd_,
  2190. void *arg_) {
  2191. /* TODO */
  2192. }
  2193. PRE_SYSCALL(compat_50___msgctl13)
  2194. (long long msqid_, long long cmd_, void *buf_) {
  2195. /* TODO */
  2196. }
  2197. POST_SYSCALL(compat_50___msgctl13)
  2198. (long long res, long long msqid_, long long cmd_, void *buf_) {
  2199. /* TODO */
  2200. }
  2201. PRE_SYSCALL(compat_50___shmctl13)
  2202. (long long shmid_, long long cmd_, void *buf_) {
  2203. /* TODO */
  2204. }
  2205. POST_SYSCALL(compat_50___shmctl13)
  2206. (long long res, long long shmid_, long long cmd_, void *buf_) {
  2207. /* TODO */
  2208. }
  2209. PRE_SYSCALL(lchflags)(void *path_, long long flags_) {
  2210. const char *path = (const char *)path_;
  2211. if (path) {
  2212. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2213. }
  2214. }
  2215. POST_SYSCALL(lchflags)(long long res, void *path_, long long flags_) {
  2216. const char *path = (const char *)path_;
  2217. if (path) {
  2218. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2219. }
  2220. }
  2221. PRE_SYSCALL(issetugid)(void) { /* Nothing to do */ }
  2222. POST_SYSCALL(issetugid)(long long res) { /* Nothing to do */ }
  2223. PRE_SYSCALL(utrace)(void *label_, void *addr_, long long len_) {
  2224. const char *label = (const char *)label_;
  2225. if (label) {
  2226. PRE_READ(label, __sanitizer::internal_strlen(label) + 1);
  2227. }
  2228. if (addr_) {
  2229. PRE_READ(addr_, len_);
  2230. }
  2231. }
  2232. POST_SYSCALL(utrace)(long long res, void *label_, void *addr_, long long len_) {
  2233. const char *label = (const char *)label_;
  2234. if (label) {
  2235. POST_READ(label, __sanitizer::internal_strlen(label) + 1);
  2236. }
  2237. if (addr_) {
  2238. POST_READ(addr_, len_);
  2239. }
  2240. }
  2241. PRE_SYSCALL(getcontext)(void *ucp_) { /* Nothing to do */ }
  2242. POST_SYSCALL(getcontext)(long long res, void *ucp_) { /* Nothing to do */ }
  2243. PRE_SYSCALL(setcontext)(void *ucp_) {
  2244. if (ucp_) {
  2245. PRE_READ(ucp_, ucontext_t_sz(ucp_));
  2246. }
  2247. }
  2248. POST_SYSCALL(setcontext)(long long res, void *ucp_) {}
  2249. PRE_SYSCALL(_lwp_create)(void *ucp_, long long flags_, void *new_lwp_) {
  2250. if (ucp_) {
  2251. PRE_READ(ucp_, ucontext_t_sz(ucp_));
  2252. }
  2253. }
  2254. POST_SYSCALL(_lwp_create)
  2255. (long long res, void *ucp_, long long flags_, void *new_lwp_) {}
  2256. PRE_SYSCALL(_lwp_exit)(void) { /* Nothing to do */ }
  2257. POST_SYSCALL(_lwp_exit)(long long res) { /* Nothing to do */ }
  2258. PRE_SYSCALL(_lwp_self)(void) { /* Nothing to do */ }
  2259. POST_SYSCALL(_lwp_self)(long long res) { /* Nothing to do */ }
  2260. PRE_SYSCALL(_lwp_wait)(long long wait_for_, void *departed_) {
  2261. /* Nothing to do */
  2262. }
  2263. POST_SYSCALL(_lwp_wait)(long long res, long long wait_for_, void *departed_) {
  2264. /* Nothing to do */
  2265. }
  2266. PRE_SYSCALL(_lwp_suspend)(long long target_) { /* Nothing to do */ }
  2267. POST_SYSCALL(_lwp_suspend)(long long res, long long target_) {
  2268. /* Nothing to do */
  2269. }
  2270. PRE_SYSCALL(_lwp_continue)(long long target_) { /* Nothing to do */ }
  2271. POST_SYSCALL(_lwp_continue)(long long res, long long target_) {
  2272. /* Nothing to do */
  2273. }
  2274. PRE_SYSCALL(_lwp_wakeup)(long long target_) { /* Nothing to do */ }
  2275. POST_SYSCALL(_lwp_wakeup)(long long res, long long target_) {
  2276. /* Nothing to do */
  2277. }
  2278. PRE_SYSCALL(_lwp_getprivate)(void) { /* Nothing to do */ }
  2279. POST_SYSCALL(_lwp_getprivate)(long long res) { /* Nothing to do */ }
  2280. PRE_SYSCALL(_lwp_setprivate)(void *ptr_) { /* Nothing to do */ }
  2281. POST_SYSCALL(_lwp_setprivate)(long long res, void *ptr_) { /* Nothing to do */ }
  2282. PRE_SYSCALL(_lwp_kill)(long long target_, long long signo_) {
  2283. /* Nothing to do */
  2284. }
  2285. POST_SYSCALL(_lwp_kill)(long long res, long long target_, long long signo_) {
  2286. /* Nothing to do */
  2287. }
  2288. PRE_SYSCALL(_lwp_detach)(long long target_) { /* Nothing to do */ }
  2289. POST_SYSCALL(_lwp_detach)(long long res, long long target_) {
  2290. /* Nothing to do */
  2291. }
  2292. PRE_SYSCALL(compat_50__lwp_park)
  2293. (void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
  2294. /* TODO */
  2295. }
  2296. POST_SYSCALL(compat_50__lwp_park)
  2297. (long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
  2298. /* TODO */
  2299. }
  2300. PRE_SYSCALL(_lwp_unpark)(long long target_, void *hint_) { /* Nothing to do */ }
  2301. POST_SYSCALL(_lwp_unpark)(long long res, long long target_, void *hint_) {
  2302. /* Nothing to do */
  2303. }
  2304. PRE_SYSCALL(_lwp_unpark_all)(void *targets_, long long ntargets_, void *hint_) {
  2305. if (targets_) {
  2306. PRE_READ(targets_, ntargets_ * sizeof(__sanitizer_lwpid_t));
  2307. }
  2308. }
  2309. POST_SYSCALL(_lwp_unpark_all)
  2310. (long long res, void *targets_, long long ntargets_, void *hint_) {}
  2311. PRE_SYSCALL(_lwp_setname)(long long target_, void *name_) {
  2312. const char *name = (const char *)name_;
  2313. if (name) {
  2314. PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
  2315. }
  2316. }
  2317. POST_SYSCALL(_lwp_setname)(long long res, long long target_, void *name_) {
  2318. const char *name = (const char *)name_;
  2319. if (name) {
  2320. POST_READ(name, __sanitizer::internal_strlen(name) + 1);
  2321. }
  2322. }
  2323. PRE_SYSCALL(_lwp_getname)(long long target_, void *name_, long long len_) {
  2324. /* Nothing to do */
  2325. }
  2326. POST_SYSCALL(_lwp_getname)
  2327. (long long res, long long target_, void *name_, long long len_) {
  2328. /* Nothing to do */
  2329. }
  2330. PRE_SYSCALL(_lwp_ctl)(long long features_, void **address_) {
  2331. /* Nothing to do */
  2332. }
  2333. POST_SYSCALL(_lwp_ctl)(long long res, long long features_, void **address_) {
  2334. /* Nothing to do */
  2335. }
  2336. /* syscall 326 has been skipped */
  2337. /* syscall 327 has been skipped */
  2338. /* syscall 328 has been skipped */
  2339. /* syscall 329 has been skipped */
  2340. PRE_SYSCALL(compat_60_sa_register)
  2341. (void *newv_, void **oldv_, long long flags_, long long stackinfo_offset_) {
  2342. /* TODO */
  2343. }
  2344. POST_SYSCALL(compat_60_sa_register)
  2345. (long long res, void *newv_, void **oldv_, long long flags_,
  2346. long long stackinfo_offset_) {
  2347. /* TODO */
  2348. }
  2349. PRE_SYSCALL(compat_60_sa_stacks)(long long num_, void *stacks_) { /* TODO */ }
  2350. POST_SYSCALL(compat_60_sa_stacks)
  2351. (long long res, long long num_, void *stacks_) {
  2352. /* TODO */
  2353. }
  2354. PRE_SYSCALL(compat_60_sa_enable)(void) { /* TODO */ }
  2355. POST_SYSCALL(compat_60_sa_enable)(long long res) { /* TODO */ }
  2356. PRE_SYSCALL(compat_60_sa_setconcurrency)(long long concurrency_) { /* TODO */ }
  2357. POST_SYSCALL(compat_60_sa_setconcurrency)
  2358. (long long res, long long concurrency_) {
  2359. /* TODO */
  2360. }
  2361. PRE_SYSCALL(compat_60_sa_yield)(void) { /* TODO */ }
  2362. POST_SYSCALL(compat_60_sa_yield)(long long res) { /* TODO */ }
  2363. PRE_SYSCALL(compat_60_sa_preempt)(long long sa_id_) { /* TODO */ }
  2364. POST_SYSCALL(compat_60_sa_preempt)(long long res, long long sa_id_) {
  2365. /* TODO */
  2366. }
  2367. /* syscall 336 has been skipped */
  2368. /* syscall 337 has been skipped */
  2369. /* syscall 338 has been skipped */
  2370. /* syscall 339 has been skipped */
  2371. PRE_SYSCALL(__sigaction_sigtramp)
  2372. (long long signum_, void *nsa_, void *osa_, void *tramp_, long long vers_) {
  2373. if (nsa_) {
  2374. PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
  2375. }
  2376. }
  2377. POST_SYSCALL(__sigaction_sigtramp)
  2378. (long long res, long long signum_, void *nsa_, void *osa_, void *tramp_,
  2379. long long vers_) {
  2380. if (nsa_) {
  2381. PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
  2382. }
  2383. }
  2384. /* syscall 341 has been skipped */
  2385. /* syscall 342 has been skipped */
  2386. PRE_SYSCALL(rasctl)(void *addr_, long long len_, long long op_) {
  2387. /* Nothing to do */
  2388. }
  2389. POST_SYSCALL(rasctl)
  2390. (long long res, void *addr_, long long len_, long long op_) {
  2391. /* Nothing to do */
  2392. }
  2393. PRE_SYSCALL(kqueue)(void) { /* Nothing to do */ }
  2394. POST_SYSCALL(kqueue)(long long res) { /* Nothing to do */ }
  2395. PRE_SYSCALL(compat_50_kevent)
  2396. (long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
  2397. long long nevents_, void *timeout_) {
  2398. /* TODO */
  2399. }
  2400. POST_SYSCALL(compat_50_kevent)
  2401. (long long res, long long fd_, void *changelist_, long long nchanges_,
  2402. void *eventlist_, long long nevents_, void *timeout_) {
  2403. /* TODO */
  2404. }
  2405. PRE_SYSCALL(_sched_setparam)
  2406. (long long pid_, long long lid_, long long policy_, void *params_) {
  2407. if (params_) {
  2408. PRE_READ(params_, struct_sched_param_sz);
  2409. }
  2410. }
  2411. POST_SYSCALL(_sched_setparam)
  2412. (long long res, long long pid_, long long lid_, long long policy_,
  2413. void *params_) {
  2414. if (params_) {
  2415. PRE_READ(params_, struct_sched_param_sz);
  2416. }
  2417. }
  2418. PRE_SYSCALL(_sched_getparam)
  2419. (long long pid_, long long lid_, void *policy_, void *params_) {
  2420. /* Nothing to do */
  2421. }
  2422. POST_SYSCALL(_sched_getparam)
  2423. (long long res, long long pid_, long long lid_, void *policy_, void *params_) {
  2424. /* Nothing to do */
  2425. }
  2426. PRE_SYSCALL(_sched_setaffinity)
  2427. (long long pid_, long long lid_, long long size_, void *cpuset_) {
  2428. if (cpuset_) {
  2429. PRE_READ(cpuset_, size_);
  2430. }
  2431. }
  2432. POST_SYSCALL(_sched_setaffinity)
  2433. (long long res, long long pid_, long long lid_, long long size_,
  2434. void *cpuset_) {
  2435. if (cpuset_) {
  2436. PRE_READ(cpuset_, size_);
  2437. }
  2438. }
  2439. PRE_SYSCALL(_sched_getaffinity)
  2440. (long long pid_, long long lid_, long long size_, void *cpuset_) {
  2441. /* Nothing to do */
  2442. }
  2443. POST_SYSCALL(_sched_getaffinity)
  2444. (long long res, long long pid_, long long lid_, long long size_,
  2445. void *cpuset_) {
  2446. /* Nothing to do */
  2447. }
  2448. PRE_SYSCALL(sched_yield)(void) { /* Nothing to do */ }
  2449. POST_SYSCALL(sched_yield)(long long res) { /* Nothing to do */ }
  2450. PRE_SYSCALL(_sched_protect)(long long priority_) { /* Nothing to do */ }
  2451. POST_SYSCALL(_sched_protect)(long long res, long long priority_) {
  2452. /* Nothing to do */
  2453. }
  2454. /* syscall 352 has been skipped */
  2455. /* syscall 353 has been skipped */
  2456. PRE_SYSCALL(fsync_range)
  2457. (long long fd_, long long flags_, long long start_, long long length_) {
  2458. /* Nothing to do */
  2459. }
  2460. POST_SYSCALL(fsync_range)
  2461. (long long res, long long fd_, long long flags_, long long start_,
  2462. long long length_) {
  2463. /* Nothing to do */
  2464. }
  2465. PRE_SYSCALL(uuidgen)(void *store_, long long count_) { /* Nothing to do */ }
  2466. POST_SYSCALL(uuidgen)(long long res, void *store_, long long count_) {
  2467. /* Nothing to do */
  2468. }
  2469. PRE_SYSCALL(compat_90_getvfsstat)
  2470. (void *buf_, long long bufsize_, long long flags_) {
  2471. /* Nothing to do */
  2472. }
  2473. POST_SYSCALL(compat_90_getvfsstat)
  2474. (long long res, void *buf_, long long bufsize_, long long flags_) {
  2475. /* Nothing to do */
  2476. }
  2477. PRE_SYSCALL(compat_90_statvfs1)(void *path_, void *buf_, long long flags_) {
  2478. const char *path = (const char *)path_;
  2479. if (path) {
  2480. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2481. }
  2482. }
  2483. POST_SYSCALL(compat_90_statvfs1)
  2484. (long long res, void *path_, void *buf_, long long flags_) {
  2485. const char *path = (const char *)path_;
  2486. if (path) {
  2487. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2488. }
  2489. }
  2490. PRE_SYSCALL(compat_90_fstatvfs1)(long long fd_, void *buf_, long long flags_) {
  2491. /* Nothing to do */
  2492. }
  2493. POST_SYSCALL(compat_90_fstatvfs1)
  2494. (long long res, long long fd_, void *buf_, long long flags_) {
  2495. /* Nothing to do */
  2496. }
  2497. PRE_SYSCALL(compat_30_fhstatvfs1)(void *fhp_, void *buf_, long long flags_) {
  2498. /* TODO */
  2499. }
  2500. POST_SYSCALL(compat_30_fhstatvfs1)
  2501. (long long res, void *fhp_, void *buf_, long long flags_) {
  2502. /* TODO */
  2503. }
  2504. PRE_SYSCALL(extattrctl)
  2505. (void *path_, long long cmd_, void *filename_, long long attrnamespace_,
  2506. void *attrname_) {
  2507. const char *path = (const char *)path_;
  2508. if (path) {
  2509. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2510. }
  2511. }
  2512. POST_SYSCALL(extattrctl)
  2513. (long long res, void *path_, long long cmd_, void *filename_,
  2514. long long attrnamespace_, void *attrname_) {
  2515. const char *path = (const char *)path_;
  2516. if (path) {
  2517. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2518. }
  2519. }
  2520. PRE_SYSCALL(extattr_set_file)
  2521. (void *path_, long long attrnamespace_, void *attrname_, void *data_,
  2522. long long nbytes_) {
  2523. const char *path = (const char *)path_;
  2524. if (path) {
  2525. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2526. }
  2527. }
  2528. POST_SYSCALL(extattr_set_file)
  2529. (long long res, void *path_, long long attrnamespace_, void *attrname_,
  2530. void *data_, long long nbytes_) {
  2531. const char *path = (const char *)path_;
  2532. if (path) {
  2533. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2534. }
  2535. }
  2536. PRE_SYSCALL(extattr_get_file)
  2537. (void *path_, long long attrnamespace_, void *attrname_, void *data_,
  2538. long long nbytes_) {
  2539. const char *path = (const char *)path_;
  2540. if (path) {
  2541. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2542. }
  2543. }
  2544. POST_SYSCALL(extattr_get_file)
  2545. (long long res, void *path_, long long attrnamespace_, void *attrname_,
  2546. void *data_, long long nbytes_) {
  2547. const char *path = (const char *)path_;
  2548. if (path) {
  2549. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2550. }
  2551. }
  2552. PRE_SYSCALL(extattr_delete_file)
  2553. (void *path_, long long attrnamespace_, void *attrname_) {
  2554. const char *path = (const char *)path_;
  2555. if (path) {
  2556. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2557. }
  2558. }
  2559. POST_SYSCALL(extattr_delete_file)
  2560. (long long res, void *path_, long long attrnamespace_, void *attrname_) {
  2561. const char *path = (const char *)path_;
  2562. if (path) {
  2563. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2564. }
  2565. }
  2566. PRE_SYSCALL(extattr_set_fd)
  2567. (long long fd_, long long attrnamespace_, void *attrname_, void *data_,
  2568. long long nbytes_) {
  2569. /* TODO */
  2570. }
  2571. POST_SYSCALL(extattr_set_fd)
  2572. (long long res, long long fd_, long long attrnamespace_, void *attrname_,
  2573. void *data_, long long nbytes_) {
  2574. /* TODO */
  2575. }
  2576. PRE_SYSCALL(extattr_get_fd)
  2577. (long long fd_, long long attrnamespace_, void *attrname_, void *data_,
  2578. long long nbytes_) {
  2579. /* TODO */
  2580. }
  2581. POST_SYSCALL(extattr_get_fd)
  2582. (long long res, long long fd_, long long attrnamespace_, void *attrname_,
  2583. void *data_, long long nbytes_) {
  2584. /* TODO */
  2585. }
  2586. PRE_SYSCALL(extattr_delete_fd)
  2587. (long long fd_, long long attrnamespace_, void *attrname_) {
  2588. /* TODO */
  2589. }
  2590. POST_SYSCALL(extattr_delete_fd)
  2591. (long long res, long long fd_, long long attrnamespace_, void *attrname_) {
  2592. /* TODO */
  2593. }
  2594. PRE_SYSCALL(extattr_set_link)
  2595. (void *path_, long long attrnamespace_, void *attrname_, void *data_,
  2596. long long nbytes_) {
  2597. const char *path = (const char *)path_;
  2598. if (path) {
  2599. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2600. }
  2601. }
  2602. POST_SYSCALL(extattr_set_link)
  2603. (long long res, void *path_, long long attrnamespace_, void *attrname_,
  2604. void *data_, long long nbytes_) {
  2605. const char *path = (const char *)path_;
  2606. if (path) {
  2607. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2608. }
  2609. }
  2610. PRE_SYSCALL(extattr_get_link)
  2611. (void *path_, long long attrnamespace_, void *attrname_, void *data_,
  2612. long long nbytes_) {
  2613. const char *path = (const char *)path_;
  2614. if (path) {
  2615. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2616. }
  2617. }
  2618. POST_SYSCALL(extattr_get_link)
  2619. (long long res, void *path_, long long attrnamespace_, void *attrname_,
  2620. void *data_, long long nbytes_) {
  2621. const char *path = (const char *)path_;
  2622. if (path) {
  2623. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2624. }
  2625. }
  2626. PRE_SYSCALL(extattr_delete_link)
  2627. (void *path_, long long attrnamespace_, void *attrname_) {
  2628. const char *path = (const char *)path_;
  2629. if (path) {
  2630. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2631. }
  2632. }
  2633. POST_SYSCALL(extattr_delete_link)
  2634. (long long res, void *path_, long long attrnamespace_, void *attrname_) {
  2635. const char *path = (const char *)path_;
  2636. if (path) {
  2637. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2638. }
  2639. }
  2640. PRE_SYSCALL(extattr_list_fd)
  2641. (long long fd_, long long attrnamespace_, void *data_, long long nbytes_) {
  2642. /* TODO */
  2643. }
  2644. POST_SYSCALL(extattr_list_fd)
  2645. (long long res, long long fd_, long long attrnamespace_, void *data_,
  2646. long long nbytes_) {
  2647. /* TODO */
  2648. }
  2649. PRE_SYSCALL(extattr_list_file)
  2650. (void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
  2651. const char *path = (const char *)path_;
  2652. if (path) {
  2653. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2654. }
  2655. }
  2656. POST_SYSCALL(extattr_list_file)
  2657. (long long res, void *path_, long long attrnamespace_, void *data_,
  2658. long long nbytes_) {
  2659. const char *path = (const char *)path_;
  2660. if (path) {
  2661. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2662. }
  2663. }
  2664. PRE_SYSCALL(extattr_list_link)
  2665. (void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
  2666. const char *path = (const char *)path_;
  2667. if (path) {
  2668. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2669. }
  2670. }
  2671. POST_SYSCALL(extattr_list_link)
  2672. (long long res, void *path_, long long attrnamespace_, void *data_,
  2673. long long nbytes_) {
  2674. const char *path = (const char *)path_;
  2675. if (path) {
  2676. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2677. }
  2678. }
  2679. PRE_SYSCALL(compat_50_pselect)
  2680. (long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
  2681. /* TODO */
  2682. }
  2683. POST_SYSCALL(compat_50_pselect)
  2684. (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
  2685. void *mask_) {
  2686. /* TODO */
  2687. }
  2688. PRE_SYSCALL(compat_50_pollts)
  2689. (void *fds_, long long nfds_, void *ts_, void *mask_) {
  2690. /* TODO */
  2691. }
  2692. POST_SYSCALL(compat_50_pollts)
  2693. (long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {
  2694. /* TODO */
  2695. }
  2696. PRE_SYSCALL(setxattr)
  2697. (void *path_, void *name_, void *value_, long long size_, long long flags_) {
  2698. const char *path = (const char *)path_;
  2699. if (path) {
  2700. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2701. }
  2702. }
  2703. POST_SYSCALL(setxattr)
  2704. (long long res, void *path_, void *name_, void *value_, long long size_,
  2705. long long flags_) {
  2706. const char *path = (const char *)path_;
  2707. if (path) {
  2708. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2709. }
  2710. }
  2711. PRE_SYSCALL(lsetxattr)
  2712. (void *path_, void *name_, void *value_, long long size_, long long flags_) {
  2713. const char *path = (const char *)path_;
  2714. if (path) {
  2715. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2716. }
  2717. }
  2718. POST_SYSCALL(lsetxattr)
  2719. (long long res, void *path_, void *name_, void *value_, long long size_,
  2720. long long flags_) {
  2721. const char *path = (const char *)path_;
  2722. if (path) {
  2723. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2724. }
  2725. }
  2726. PRE_SYSCALL(fsetxattr)
  2727. (long long fd_, void *name_, void *value_, long long size_, long long flags_) {
  2728. /* Nothing to do */
  2729. }
  2730. POST_SYSCALL(fsetxattr)
  2731. (long long res, long long fd_, void *name_, void *value_, long long size_,
  2732. long long flags_) {
  2733. /* Nothing to do */
  2734. }
  2735. PRE_SYSCALL(getxattr)(void *path_, void *name_, void *value_, long long size_) {
  2736. const char *path = (const char *)path_;
  2737. if (path) {
  2738. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2739. }
  2740. }
  2741. POST_SYSCALL(getxattr)
  2742. (long long res, void *path_, void *name_, void *value_, long long size_) {
  2743. const char *path = (const char *)path_;
  2744. if (path) {
  2745. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2746. }
  2747. }
  2748. PRE_SYSCALL(lgetxattr)
  2749. (void *path_, void *name_, void *value_, long long size_) {
  2750. const char *path = (const char *)path_;
  2751. if (path) {
  2752. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2753. }
  2754. }
  2755. POST_SYSCALL(lgetxattr)
  2756. (long long res, void *path_, void *name_, void *value_, long long size_) {
  2757. const char *path = (const char *)path_;
  2758. if (path) {
  2759. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2760. }
  2761. }
  2762. PRE_SYSCALL(fgetxattr)
  2763. (long long fd_, void *name_, void *value_, long long size_) {
  2764. /* Nothing to do */
  2765. }
  2766. POST_SYSCALL(fgetxattr)
  2767. (long long res, long long fd_, void *name_, void *value_, long long size_) {
  2768. /* Nothing to do */
  2769. }
  2770. PRE_SYSCALL(listxattr)(void *path_, void *list_, long long size_) {
  2771. const char *path = (const char *)path_;
  2772. if (path) {
  2773. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2774. }
  2775. }
  2776. POST_SYSCALL(listxattr)
  2777. (long long res, void *path_, void *list_, long long size_) {
  2778. const char *path = (const char *)path_;
  2779. if (path) {
  2780. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2781. }
  2782. }
  2783. PRE_SYSCALL(llistxattr)(void *path_, void *list_, long long size_) {
  2784. const char *path = (const char *)path_;
  2785. if (path) {
  2786. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2787. }
  2788. }
  2789. POST_SYSCALL(llistxattr)
  2790. (long long res, void *path_, void *list_, long long size_) {
  2791. const char *path = (const char *)path_;
  2792. if (path) {
  2793. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2794. }
  2795. }
  2796. PRE_SYSCALL(flistxattr)(long long fd_, void *list_, long long size_) {
  2797. /* TODO */
  2798. }
  2799. POST_SYSCALL(flistxattr)
  2800. (long long res, long long fd_, void *list_, long long size_) {
  2801. /* TODO */
  2802. }
  2803. PRE_SYSCALL(removexattr)(void *path_, void *name_) {
  2804. const char *path = (const char *)path_;
  2805. if (path) {
  2806. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2807. }
  2808. }
  2809. POST_SYSCALL(removexattr)(long long res, void *path_, void *name_) {
  2810. const char *path = (const char *)path_;
  2811. if (path) {
  2812. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2813. }
  2814. }
  2815. PRE_SYSCALL(lremovexattr)(void *path_, void *name_) {
  2816. const char *path = (const char *)path_;
  2817. if (path) {
  2818. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2819. }
  2820. }
  2821. POST_SYSCALL(lremovexattr)(long long res, void *path_, void *name_) {
  2822. const char *path = (const char *)path_;
  2823. if (path) {
  2824. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2825. }
  2826. }
  2827. PRE_SYSCALL(fremovexattr)(long long fd_, void *name_) { /* TODO */ }
  2828. POST_SYSCALL(fremovexattr)(long long res, long long fd_, void *name_) {
  2829. /* TODO */
  2830. }
  2831. PRE_SYSCALL(compat_50___stat30)(void *path_, void *ub_) { /* TODO */ }
  2832. POST_SYSCALL(compat_50___stat30)(long long res, void *path_, void *ub_) {
  2833. /* TODO */
  2834. }
  2835. PRE_SYSCALL(compat_50___fstat30)(long long fd_, void *sb_) { /* TODO */ }
  2836. POST_SYSCALL(compat_50___fstat30)(long long res, long long fd_, void *sb_) {
  2837. /* TODO */
  2838. }
  2839. PRE_SYSCALL(compat_50___lstat30)(void *path_, void *ub_) { /* TODO */ }
  2840. POST_SYSCALL(compat_50___lstat30)(long long res, void *path_, void *ub_) {
  2841. /* TODO */
  2842. }
  2843. PRE_SYSCALL(__getdents30)(long long fd_, void *buf_, long long count_) {
  2844. /* Nothing to do */
  2845. }
  2846. POST_SYSCALL(__getdents30)
  2847. (long long res, long long fd_, void *buf_, long long count_) {
  2848. /* Nothing to do */
  2849. }
  2850. PRE_SYSCALL(posix_fadvise)(long long) { /* Nothing to do */ }
  2851. POST_SYSCALL(posix_fadvise)(long long res, long long) { /* Nothing to do */ }
  2852. PRE_SYSCALL(compat_30___fhstat30)(void *fhp_, void *sb_) { /* TODO */ }
  2853. POST_SYSCALL(compat_30___fhstat30)(long long res, void *fhp_, void *sb_) {
  2854. /* TODO */
  2855. }
  2856. PRE_SYSCALL(compat_50___ntp_gettime30)(void *ntvp_) { /* TODO */ }
  2857. POST_SYSCALL(compat_50___ntp_gettime30)(long long res, void *ntvp_) {
  2858. /* TODO */
  2859. }
  2860. PRE_SYSCALL(__socket30)
  2861. (long long domain_, long long type_, long long protocol_) {
  2862. /* Nothing to do */
  2863. }
  2864. POST_SYSCALL(__socket30)
  2865. (long long res, long long domain_, long long type_, long long protocol_) {
  2866. /* Nothing to do */
  2867. }
  2868. PRE_SYSCALL(__getfh30)(void *fname_, void *fhp_, void *fh_size_) {
  2869. const char *fname = (const char *)fname_;
  2870. if (fname) {
  2871. PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
  2872. }
  2873. }
  2874. POST_SYSCALL(__getfh30)
  2875. (long long res, void *fname_, void *fhp_, void *fh_size_) {
  2876. const char *fname = (const char *)fname_;
  2877. if (res == 0) {
  2878. if (fname) {
  2879. POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
  2880. }
  2881. }
  2882. }
  2883. PRE_SYSCALL(__fhopen40)(void *fhp_, long long fh_size_, long long flags_) {
  2884. if (fhp_) {
  2885. PRE_READ(fhp_, fh_size_);
  2886. }
  2887. }
  2888. POST_SYSCALL(__fhopen40)
  2889. (long long res, void *fhp_, long long fh_size_, long long flags_) {}
  2890. PRE_SYSCALL(compat_90_fhstatvfs1)
  2891. (void *fhp_, long long fh_size_, void *buf_, long long flags_) {
  2892. if (fhp_) {
  2893. PRE_READ(fhp_, fh_size_);
  2894. }
  2895. }
  2896. POST_SYSCALL(compat_90_fhstatvfs1)
  2897. (long long res, void *fhp_, long long fh_size_, void *buf_, long long flags_) {}
  2898. PRE_SYSCALL(compat_50___fhstat40)(void *fhp_, long long fh_size_, void *sb_) {
  2899. if (fhp_) {
  2900. PRE_READ(fhp_, fh_size_);
  2901. }
  2902. }
  2903. POST_SYSCALL(compat_50___fhstat40)
  2904. (long long res, void *fhp_, long long fh_size_, void *sb_) {}
  2905. PRE_SYSCALL(aio_cancel)(long long fildes_, void *aiocbp_) {
  2906. if (aiocbp_) {
  2907. PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
  2908. }
  2909. }
  2910. POST_SYSCALL(aio_cancel)(long long res, long long fildes_, void *aiocbp_) {}
  2911. PRE_SYSCALL(aio_error)(void *aiocbp_) {
  2912. if (aiocbp_) {
  2913. PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
  2914. }
  2915. }
  2916. POST_SYSCALL(aio_error)(long long res, void *aiocbp_) {}
  2917. PRE_SYSCALL(aio_fsync)(long long op_, void *aiocbp_) {
  2918. if (aiocbp_) {
  2919. PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
  2920. }
  2921. }
  2922. POST_SYSCALL(aio_fsync)(long long res, long long op_, void *aiocbp_) {}
  2923. PRE_SYSCALL(aio_read)(void *aiocbp_) {
  2924. if (aiocbp_) {
  2925. PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
  2926. }
  2927. }
  2928. POST_SYSCALL(aio_read)(long long res, void *aiocbp_) {}
  2929. PRE_SYSCALL(aio_return)(void *aiocbp_) {
  2930. if (aiocbp_) {
  2931. PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
  2932. }
  2933. }
  2934. POST_SYSCALL(aio_return)(long long res, void *aiocbp_) {}
  2935. PRE_SYSCALL(compat_50_aio_suspend)
  2936. (void *list_, long long nent_, void *timeout_) {
  2937. /* TODO */
  2938. }
  2939. POST_SYSCALL(compat_50_aio_suspend)
  2940. (long long res, void *list_, long long nent_, void *timeout_) {
  2941. /* TODO */
  2942. }
  2943. PRE_SYSCALL(aio_write)(void *aiocbp_) {
  2944. if (aiocbp_) {
  2945. PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
  2946. }
  2947. }
  2948. POST_SYSCALL(aio_write)(long long res, void *aiocbp_) {}
  2949. PRE_SYSCALL(lio_listio)
  2950. (long long mode_, void *list_, long long nent_, void *sig_) {
  2951. /* Nothing to do */
  2952. }
  2953. POST_SYSCALL(lio_listio)
  2954. (long long res, long long mode_, void *list_, long long nent_, void *sig_) {
  2955. /* Nothing to do */
  2956. }
  2957. /* syscall 407 has been skipped */
  2958. /* syscall 408 has been skipped */
  2959. /* syscall 409 has been skipped */
  2960. PRE_SYSCALL(__mount50)
  2961. (void *type_, void *path_, long long flags_, void *data_, long long data_len_) {
  2962. const char *type = (const char *)type_;
  2963. const char *path = (const char *)path_;
  2964. if (type) {
  2965. PRE_READ(type, __sanitizer::internal_strlen(type) + 1);
  2966. }
  2967. if (path) {
  2968. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  2969. }
  2970. if (data_) {
  2971. PRE_READ(data_, data_len_);
  2972. }
  2973. }
  2974. POST_SYSCALL(__mount50)
  2975. (long long res, void *type_, void *path_, long long flags_, void *data_,
  2976. long long data_len_) {
  2977. const char *type = (const char *)type_;
  2978. const char *path = (const char *)path_;
  2979. if (type) {
  2980. POST_READ(type, __sanitizer::internal_strlen(type) + 1);
  2981. }
  2982. if (path) {
  2983. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  2984. }
  2985. if (data_) {
  2986. POST_READ(data_, data_len_);
  2987. }
  2988. }
  2989. PRE_SYSCALL(mremap)
  2990. (void *old_address_, long long old_size_, void *new_address_,
  2991. long long new_size_, long long flags_) {
  2992. /* Nothing to do */
  2993. }
  2994. POST_SYSCALL(mremap)
  2995. (long long res, void *old_address_, long long old_size_, void *new_address_,
  2996. long long new_size_, long long flags_) {
  2997. /* Nothing to do */
  2998. }
  2999. PRE_SYSCALL(pset_create)(void *psid_) { /* Nothing to do */ }
  3000. POST_SYSCALL(pset_create)(long long res, void *psid_) { /* Nothing to do */ }
  3001. PRE_SYSCALL(pset_destroy)(long long psid_) { /* Nothing to do */ }
  3002. POST_SYSCALL(pset_destroy)(long long res, long long psid_) {
  3003. /* Nothing to do */
  3004. }
  3005. PRE_SYSCALL(pset_assign)(long long psid_, long long cpuid_, void *opsid_) {
  3006. /* Nothing to do */
  3007. }
  3008. POST_SYSCALL(pset_assign)
  3009. (long long res, long long psid_, long long cpuid_, void *opsid_) {
  3010. /* Nothing to do */
  3011. }
  3012. PRE_SYSCALL(_pset_bind)
  3013. (long long idtype_, long long first_id_, long long second_id_, long long psid_,
  3014. void *opsid_) {
  3015. /* Nothing to do */
  3016. }
  3017. POST_SYSCALL(_pset_bind)
  3018. (long long res, long long idtype_, long long first_id_, long long second_id_,
  3019. long long psid_, void *opsid_) {
  3020. /* Nothing to do */
  3021. }
  3022. PRE_SYSCALL(__posix_fadvise50)
  3023. (long long fd_, long long PAD_, long long offset_, long long len_,
  3024. long long advice_) {
  3025. /* Nothing to do */
  3026. }
  3027. POST_SYSCALL(__posix_fadvise50)
  3028. (long long res, long long fd_, long long PAD_, long long offset_,
  3029. long long len_, long long advice_) {
  3030. /* Nothing to do */
  3031. }
  3032. PRE_SYSCALL(__select50)
  3033. (long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
  3034. /* Nothing to do */
  3035. }
  3036. POST_SYSCALL(__select50)
  3037. (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
  3038. /* Nothing to do */
  3039. }
  3040. PRE_SYSCALL(__gettimeofday50)(void *tp_, void *tzp_) { /* Nothing to do */ }
  3041. POST_SYSCALL(__gettimeofday50)(long long res, void *tp_, void *tzp_) {
  3042. /* Nothing to do */
  3043. }
  3044. PRE_SYSCALL(__settimeofday50)(void *tv_, void *tzp_) {
  3045. if (tv_) {
  3046. PRE_READ(tv_, timeval_sz);
  3047. }
  3048. if (tzp_) {
  3049. PRE_READ(tzp_, struct_timezone_sz);
  3050. }
  3051. }
  3052. POST_SYSCALL(__settimeofday50)(long long res, void *tv_, void *tzp_) {}
  3053. PRE_SYSCALL(__utimes50)(void *path_, void *tptr_) {
  3054. struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
  3055. const char *path = (const char *)path_;
  3056. if (path) {
  3057. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3058. }
  3059. if (tptr) {
  3060. PRE_READ(tptr[0], struct_timespec_sz);
  3061. PRE_READ(tptr[1], struct_timespec_sz);
  3062. }
  3063. }
  3064. POST_SYSCALL(__utimes50)(long long res, void *path_, void *tptr_) {}
  3065. PRE_SYSCALL(__adjtime50)(void *delta_, void *olddelta_) {
  3066. if (delta_) {
  3067. PRE_READ(delta_, timeval_sz);
  3068. }
  3069. }
  3070. POST_SYSCALL(__adjtime50)(long long res, void *delta_, void *olddelta_) {}
  3071. PRE_SYSCALL(__lfs_segwait50)(void *fsidp_, void *tv_) { /* TODO */ }
  3072. POST_SYSCALL(__lfs_segwait50)(long long res, void *fsidp_, void *tv_) {
  3073. /* TODO */
  3074. }
  3075. PRE_SYSCALL(__futimes50)(long long fd_, void *tptr_) {
  3076. struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
  3077. if (tptr) {
  3078. PRE_READ(tptr[0], struct_timespec_sz);
  3079. PRE_READ(tptr[1], struct_timespec_sz);
  3080. }
  3081. }
  3082. POST_SYSCALL(__futimes50)(long long res, long long fd_, void *tptr_) {}
  3083. PRE_SYSCALL(__lutimes50)(void *path_, void *tptr_) {
  3084. struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
  3085. const char *path = (const char *)path_;
  3086. if (path) {
  3087. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3088. }
  3089. if (tptr) {
  3090. PRE_READ(tptr[0], struct_timespec_sz);
  3091. PRE_READ(tptr[1], struct_timespec_sz);
  3092. }
  3093. }
  3094. POST_SYSCALL(__lutimes50)(long long res, void *path_, void *tptr_) {
  3095. struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
  3096. const char *path = (const char *)path_;
  3097. if (path) {
  3098. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3099. }
  3100. if (tptr) {
  3101. POST_READ(tptr[0], struct_timespec_sz);
  3102. POST_READ(tptr[1], struct_timespec_sz);
  3103. }
  3104. }
  3105. PRE_SYSCALL(__setitimer50)(long long which_, void *itv_, void *oitv_) {
  3106. struct __sanitizer_itimerval *itv = (struct __sanitizer_itimerval *)itv_;
  3107. if (itv) {
  3108. PRE_READ(&itv->it_interval.tv_sec, sizeof(__sanitizer_time_t));
  3109. PRE_READ(&itv->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
  3110. PRE_READ(&itv->it_value.tv_sec, sizeof(__sanitizer_time_t));
  3111. PRE_READ(&itv->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
  3112. }
  3113. }
  3114. POST_SYSCALL(__setitimer50)
  3115. (long long res, long long which_, void *itv_, void *oitv_) {}
  3116. PRE_SYSCALL(__getitimer50)(long long which_, void *itv_) { /* Nothing to do */ }
  3117. POST_SYSCALL(__getitimer50)(long long res, long long which_, void *itv_) {
  3118. /* Nothing to do */
  3119. }
  3120. PRE_SYSCALL(__clock_gettime50)(long long clock_id_, void *tp_) {
  3121. /* Nothing to do */
  3122. }
  3123. POST_SYSCALL(__clock_gettime50)(long long res, long long clock_id_, void *tp_) {
  3124. /* Nothing to do */
  3125. }
  3126. PRE_SYSCALL(__clock_settime50)(long long clock_id_, void *tp_) {
  3127. if (tp_) {
  3128. PRE_READ(tp_, struct_timespec_sz);
  3129. }
  3130. }
  3131. POST_SYSCALL(__clock_settime50)
  3132. (long long res, long long clock_id_, void *tp_) {}
  3133. PRE_SYSCALL(__clock_getres50)(long long clock_id_, void *tp_) {
  3134. /* Nothing to do */
  3135. }
  3136. POST_SYSCALL(__clock_getres50)(long long res, long long clock_id_, void *tp_) {
  3137. /* Nothing to do */
  3138. }
  3139. PRE_SYSCALL(__nanosleep50)(void *rqtp_, void *rmtp_) {
  3140. if (rqtp_) {
  3141. PRE_READ(rqtp_, struct_timespec_sz);
  3142. }
  3143. }
  3144. POST_SYSCALL(__nanosleep50)(long long res, void *rqtp_, void *rmtp_) {}
  3145. PRE_SYSCALL(____sigtimedwait50)(void *set_, void *info_, void *timeout_) {
  3146. if (set_) {
  3147. PRE_READ(set_, sizeof(__sanitizer_sigset_t));
  3148. }
  3149. if (timeout_) {
  3150. PRE_READ(timeout_, struct_timespec_sz);
  3151. }
  3152. }
  3153. POST_SYSCALL(____sigtimedwait50)
  3154. (long long res, void *set_, void *info_, void *timeout_) {}
  3155. PRE_SYSCALL(__mq_timedsend50)
  3156. (long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
  3157. void *abs_timeout_) {
  3158. if (msg_ptr_) {
  3159. PRE_READ(msg_ptr_, msg_len_);
  3160. }
  3161. if (abs_timeout_) {
  3162. PRE_READ(abs_timeout_, struct_timespec_sz);
  3163. }
  3164. }
  3165. POST_SYSCALL(__mq_timedsend50)
  3166. (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
  3167. long long msg_prio_, void *abs_timeout_) {}
  3168. PRE_SYSCALL(__mq_timedreceive50)
  3169. (long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
  3170. void *abs_timeout_) {
  3171. if (msg_ptr_) {
  3172. PRE_READ(msg_ptr_, msg_len_);
  3173. }
  3174. if (abs_timeout_) {
  3175. PRE_READ(abs_timeout_, struct_timespec_sz);
  3176. }
  3177. }
  3178. POST_SYSCALL(__mq_timedreceive50)
  3179. (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
  3180. void *msg_prio_, void *abs_timeout_) {}
  3181. PRE_SYSCALL(compat_60__lwp_park)
  3182. (void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
  3183. /* TODO */
  3184. }
  3185. POST_SYSCALL(compat_60__lwp_park)
  3186. (long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
  3187. /* TODO */
  3188. }
  3189. PRE_SYSCALL(__kevent50)
  3190. (long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
  3191. long long nevents_, void *timeout_) {
  3192. if (changelist_) {
  3193. PRE_READ(changelist_, nchanges_ * struct_kevent_sz);
  3194. }
  3195. if (timeout_) {
  3196. PRE_READ(timeout_, struct_timespec_sz);
  3197. }
  3198. }
  3199. POST_SYSCALL(__kevent50)
  3200. (long long res, long long fd_, void *changelist_, long long nchanges_,
  3201. void *eventlist_, long long nevents_, void *timeout_) {}
  3202. PRE_SYSCALL(__pselect50)
  3203. (long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
  3204. if (ts_) {
  3205. PRE_READ(ts_, struct_timespec_sz);
  3206. }
  3207. if (mask_) {
  3208. PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));
  3209. }
  3210. }
  3211. POST_SYSCALL(__pselect50)
  3212. (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
  3213. void *mask_) {}
  3214. PRE_SYSCALL(__pollts50)(void *fds_, long long nfds_, void *ts_, void *mask_) {
  3215. if (ts_) {
  3216. PRE_READ(ts_, struct_timespec_sz);
  3217. }
  3218. if (mask_) {
  3219. PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));
  3220. }
  3221. }
  3222. POST_SYSCALL(__pollts50)
  3223. (long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {}
  3224. PRE_SYSCALL(__aio_suspend50)(void *list_, long long nent_, void *timeout_) {
  3225. int i;
  3226. const struct aiocb *const *list = (const struct aiocb *const *)list_;
  3227. if (list) {
  3228. for (i = 0; i < nent_; i++) {
  3229. if (list[i]) {
  3230. PRE_READ(list[i], sizeof(struct __sanitizer_aiocb));
  3231. }
  3232. }
  3233. }
  3234. if (timeout_) {
  3235. PRE_READ(timeout_, struct_timespec_sz);
  3236. }
  3237. }
  3238. POST_SYSCALL(__aio_suspend50)
  3239. (long long res, void *list_, long long nent_, void *timeout_) {}
  3240. PRE_SYSCALL(__stat50)(void *path_, void *ub_) {
  3241. const char *path = (const char *)path_;
  3242. if (path) {
  3243. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3244. }
  3245. }
  3246. POST_SYSCALL(__stat50)(long long res, void *path_, void *ub_) {
  3247. const char *path = (const char *)path_;
  3248. if (res == 0) {
  3249. if (path) {
  3250. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3251. }
  3252. }
  3253. }
  3254. PRE_SYSCALL(__fstat50)(long long fd_, void *sb_) { /* Nothing to do */ }
  3255. POST_SYSCALL(__fstat50)(long long res, long long fd_, void *sb_) {
  3256. /* Nothing to do */
  3257. }
  3258. PRE_SYSCALL(__lstat50)(void *path_, void *ub_) {
  3259. const char *path = (const char *)path_;
  3260. if (path) {
  3261. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3262. }
  3263. }
  3264. POST_SYSCALL(__lstat50)(long long res, void *path_, void *ub_) {
  3265. const char *path = (const char *)path_;
  3266. if (res == 0) {
  3267. if (path) {
  3268. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3269. }
  3270. }
  3271. }
  3272. PRE_SYSCALL(____semctl50)
  3273. (long long semid_, long long semnum_, long long cmd_, void *arg_) {
  3274. /* Nothing to do */
  3275. }
  3276. POST_SYSCALL(____semctl50)
  3277. (long long res, long long semid_, long long semnum_, long long cmd_,
  3278. void *arg_) {
  3279. /* Nothing to do */
  3280. }
  3281. PRE_SYSCALL(__shmctl50)(long long shmid_, long long cmd_, void *buf_) {
  3282. /* Nothing to do */
  3283. }
  3284. POST_SYSCALL(__shmctl50)
  3285. (long long res, long long shmid_, long long cmd_, void *buf_) {
  3286. /* Nothing to do */
  3287. }
  3288. PRE_SYSCALL(__msgctl50)(long long msqid_, long long cmd_, void *buf_) {
  3289. /* Nothing to do */
  3290. }
  3291. POST_SYSCALL(__msgctl50)
  3292. (long long res, long long msqid_, long long cmd_, void *buf_) {
  3293. /* Nothing to do */
  3294. }
  3295. PRE_SYSCALL(__getrusage50)(long long who_, void *rusage_) {
  3296. /* Nothing to do */
  3297. }
  3298. POST_SYSCALL(__getrusage50)(long long res, long long who_, void *rusage_) {
  3299. /* Nothing to do */
  3300. }
  3301. PRE_SYSCALL(__timer_settime50)
  3302. (long long timerid_, long long flags_, void *value_, void *ovalue_) {
  3303. struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
  3304. if (value) {
  3305. PRE_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
  3306. PRE_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
  3307. PRE_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));
  3308. PRE_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
  3309. }
  3310. }
  3311. POST_SYSCALL(__timer_settime50)
  3312. (long long res, long long timerid_, long long flags_, void *value_,
  3313. void *ovalue_) {
  3314. struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
  3315. if (res == 0) {
  3316. if (value) {
  3317. POST_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
  3318. POST_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
  3319. POST_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));
  3320. POST_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
  3321. }
  3322. }
  3323. }
  3324. PRE_SYSCALL(__timer_gettime50)(long long timerid_, void *value_) {
  3325. /* Nothing to do */
  3326. }
  3327. POST_SYSCALL(__timer_gettime50)
  3328. (long long res, long long timerid_, void *value_) {
  3329. /* Nothing to do */
  3330. }
  3331. #if defined(NTP) || !defined(_KERNEL_OPT)
  3332. PRE_SYSCALL(__ntp_gettime50)(void *ntvp_) { /* Nothing to do */ }
  3333. POST_SYSCALL(__ntp_gettime50)(long long res, void *ntvp_) {
  3334. /* Nothing to do */
  3335. }
  3336. #else
  3337. /* syscall 448 has been skipped */
  3338. #endif
  3339. PRE_SYSCALL(__wait450)
  3340. (long long pid_, void *status_, long long options_, void *rusage_) {
  3341. /* Nothing to do */
  3342. }
  3343. POST_SYSCALL(__wait450)
  3344. (long long res, long long pid_, void *status_, long long options_,
  3345. void *rusage_) {
  3346. /* Nothing to do */
  3347. }
  3348. PRE_SYSCALL(__mknod50)(void *path_, long long mode_, long long dev_) {
  3349. const char *path = (const char *)path_;
  3350. if (path) {
  3351. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3352. }
  3353. }
  3354. POST_SYSCALL(__mknod50)
  3355. (long long res, void *path_, long long mode_, long long dev_) {
  3356. const char *path = (const char *)path_;
  3357. if (res == 0) {
  3358. if (path) {
  3359. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3360. }
  3361. }
  3362. }
  3363. PRE_SYSCALL(__fhstat50)(void *fhp_, long long fh_size_, void *sb_) {
  3364. if (fhp_) {
  3365. PRE_READ(fhp_, fh_size_);
  3366. }
  3367. }
  3368. POST_SYSCALL(__fhstat50)
  3369. (long long res, void *fhp_, long long fh_size_, void *sb_) {
  3370. if (res == 0) {
  3371. if (fhp_) {
  3372. POST_READ(fhp_, fh_size_);
  3373. }
  3374. }
  3375. }
  3376. /* syscall 452 has been skipped */
  3377. PRE_SYSCALL(pipe2)(void *fildes_, long long flags_) { /* Nothing to do */ }
  3378. POST_SYSCALL(pipe2)(long long res, void *fildes_, long long flags_) {
  3379. /* Nothing to do */
  3380. }
  3381. PRE_SYSCALL(dup3)(long long from_, long long to_, long long flags_) {
  3382. /* Nothing to do */
  3383. }
  3384. POST_SYSCALL(dup3)
  3385. (long long res, long long from_, long long to_, long long flags_) {
  3386. /* Nothing to do */
  3387. }
  3388. PRE_SYSCALL(kqueue1)(long long flags_) { /* Nothing to do */ }
  3389. POST_SYSCALL(kqueue1)(long long res, long long flags_) { /* Nothing to do */ }
  3390. PRE_SYSCALL(paccept)
  3391. (long long s_, void *name_, void *anamelen_, void *mask_, long long flags_) {
  3392. if (mask_) {
  3393. PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
  3394. }
  3395. }
  3396. POST_SYSCALL(paccept)
  3397. (long long res, long long s_, void *name_, void *anamelen_, void *mask_,
  3398. long long flags_) {
  3399. if (res >= 0) {
  3400. if (mask_) {
  3401. PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
  3402. }
  3403. }
  3404. }
  3405. PRE_SYSCALL(linkat)
  3406. (long long fd1_, void *name1_, long long fd2_, void *name2_, long long flags_) {
  3407. const char *name1 = (const char *)name1_;
  3408. const char *name2 = (const char *)name2_;
  3409. if (name1) {
  3410. PRE_READ(name1, __sanitizer::internal_strlen(name1) + 1);
  3411. }
  3412. if (name2) {
  3413. PRE_READ(name2, __sanitizer::internal_strlen(name2) + 1);
  3414. }
  3415. }
  3416. POST_SYSCALL(linkat)
  3417. (long long res, long long fd1_, void *name1_, long long fd2_, void *name2_,
  3418. long long flags_) {
  3419. const char *name1 = (const char *)name1_;
  3420. const char *name2 = (const char *)name2_;
  3421. if (res == 0) {
  3422. if (name1) {
  3423. POST_READ(name1, __sanitizer::internal_strlen(name1) + 1);
  3424. }
  3425. if (name2) {
  3426. POST_READ(name2, __sanitizer::internal_strlen(name2) + 1);
  3427. }
  3428. }
  3429. }
  3430. PRE_SYSCALL(renameat)
  3431. (long long fromfd_, void *from_, long long tofd_, void *to_) {
  3432. const char *from = (const char *)from_;
  3433. const char *to = (const char *)to_;
  3434. if (from) {
  3435. PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
  3436. }
  3437. if (to) {
  3438. PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
  3439. }
  3440. }
  3441. POST_SYSCALL(renameat)
  3442. (long long res, long long fromfd_, void *from_, long long tofd_, void *to_) {
  3443. const char *from = (const char *)from_;
  3444. const char *to = (const char *)to_;
  3445. if (res == 0) {
  3446. if (from) {
  3447. POST_READ(from, __sanitizer::internal_strlen(from) + 1);
  3448. }
  3449. if (to) {
  3450. POST_READ(to, __sanitizer::internal_strlen(to) + 1);
  3451. }
  3452. }
  3453. }
  3454. PRE_SYSCALL(mkfifoat)(long long fd_, void *path_, long long mode_) {
  3455. const char *path = (const char *)path_;
  3456. if (path) {
  3457. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3458. }
  3459. }
  3460. POST_SYSCALL(mkfifoat)
  3461. (long long res, long long fd_, void *path_, long long mode_) {
  3462. const char *path = (const char *)path_;
  3463. if (res == 0) {
  3464. if (path) {
  3465. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3466. }
  3467. }
  3468. }
  3469. PRE_SYSCALL(mknodat)
  3470. (long long fd_, void *path_, long long mode_, long long PAD_, long long dev_) {
  3471. const char *path = (const char *)path_;
  3472. if (path) {
  3473. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3474. }
  3475. }
  3476. POST_SYSCALL(mknodat)
  3477. (long long res, long long fd_, void *path_, long long mode_, long long PAD_,
  3478. long long dev_) {
  3479. const char *path = (const char *)path_;
  3480. if (res == 0) {
  3481. if (path) {
  3482. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3483. }
  3484. }
  3485. }
  3486. PRE_SYSCALL(mkdirat)(long long fd_, void *path_, long long mode_) {
  3487. const char *path = (const char *)path_;
  3488. if (path) {
  3489. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3490. }
  3491. }
  3492. POST_SYSCALL(mkdirat)
  3493. (long long res, long long fd_, void *path_, long long mode_) {
  3494. const char *path = (const char *)path_;
  3495. if (res == 0) {
  3496. if (path) {
  3497. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3498. }
  3499. }
  3500. }
  3501. PRE_SYSCALL(faccessat)
  3502. (long long fd_, void *path_, long long amode_, long long flag_) {
  3503. const char *path = (const char *)path_;
  3504. if (path) {
  3505. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3506. }
  3507. }
  3508. POST_SYSCALL(faccessat)
  3509. (long long res, long long fd_, void *path_, long long amode_, long long flag_) {
  3510. const char *path = (const char *)path_;
  3511. if (res == 0) {
  3512. if (path) {
  3513. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3514. }
  3515. }
  3516. }
  3517. PRE_SYSCALL(fchmodat)
  3518. (long long fd_, void *path_, long long mode_, long long flag_) {
  3519. const char *path = (const char *)path_;
  3520. if (path) {
  3521. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3522. }
  3523. }
  3524. POST_SYSCALL(fchmodat)
  3525. (long long res, long long fd_, void *path_, long long mode_, long long flag_) {
  3526. const char *path = (const char *)path_;
  3527. if (res == 0) {
  3528. if (path) {
  3529. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3530. }
  3531. }
  3532. }
  3533. PRE_SYSCALL(fchownat)
  3534. (long long fd_, void *path_, long long owner_, long long group_,
  3535. long long flag_) {
  3536. const char *path = (const char *)path_;
  3537. if (path) {
  3538. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3539. }
  3540. }
  3541. POST_SYSCALL(fchownat)
  3542. (long long res, long long fd_, void *path_, long long owner_, long long group_,
  3543. long long flag_) {
  3544. const char *path = (const char *)path_;
  3545. if (res == 0) {
  3546. if (path) {
  3547. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3548. }
  3549. }
  3550. }
  3551. PRE_SYSCALL(fexecve)(long long fd_, void *argp_, void *envp_) { /* TODO */ }
  3552. POST_SYSCALL(fexecve)(long long res, long long fd_, void *argp_, void *envp_) {
  3553. /* TODO */
  3554. }
  3555. PRE_SYSCALL(fstatat)(long long fd_, void *path_, void *buf_, long long flag_) {
  3556. const char *path = (const char *)path_;
  3557. if (path) {
  3558. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3559. }
  3560. }
  3561. POST_SYSCALL(fstatat)
  3562. (long long res, long long fd_, void *path_, void *buf_, long long flag_) {
  3563. const char *path = (const char *)path_;
  3564. if (path) {
  3565. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3566. }
  3567. }
  3568. PRE_SYSCALL(utimensat)
  3569. (long long fd_, void *path_, void *tptr_, long long flag_) {
  3570. const char *path = (const char *)path_;
  3571. if (path) {
  3572. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3573. }
  3574. if (tptr_) {
  3575. PRE_READ(tptr_, struct_timespec_sz);
  3576. }
  3577. }
  3578. POST_SYSCALL(utimensat)
  3579. (long long res, long long fd_, void *path_, void *tptr_, long long flag_) {
  3580. const char *path = (const char *)path_;
  3581. if (res > 0) {
  3582. if (path) {
  3583. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3584. }
  3585. if (tptr_) {
  3586. POST_READ(tptr_, struct_timespec_sz);
  3587. }
  3588. }
  3589. }
  3590. PRE_SYSCALL(openat)
  3591. (long long fd_, void *path_, long long oflags_, long long mode_) {
  3592. const char *path = (const char *)path_;
  3593. if (path) {
  3594. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3595. }
  3596. }
  3597. POST_SYSCALL(openat)
  3598. (long long res, long long fd_, void *path_, long long oflags_,
  3599. long long mode_) {
  3600. const char *path = (const char *)path_;
  3601. if (res > 0) {
  3602. if (path) {
  3603. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3604. }
  3605. }
  3606. }
  3607. PRE_SYSCALL(readlinkat)
  3608. (long long fd_, void *path_, void *buf_, long long bufsize_) {
  3609. const char *path = (const char *)path_;
  3610. if (path) {
  3611. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3612. }
  3613. }
  3614. POST_SYSCALL(readlinkat)
  3615. (long long res, long long fd_, void *path_, void *buf_, long long bufsize_) {
  3616. const char *path = (const char *)path_;
  3617. if (res > 0) {
  3618. if (path) {
  3619. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3620. }
  3621. }
  3622. }
  3623. PRE_SYSCALL(symlinkat)(void *path1_, long long fd_, void *path2_) {
  3624. const char *path1 = (const char *)path1_;
  3625. const char *path2 = (const char *)path2_;
  3626. if (path1) {
  3627. PRE_READ(path1, __sanitizer::internal_strlen(path1) + 1);
  3628. }
  3629. if (path2) {
  3630. PRE_READ(path2, __sanitizer::internal_strlen(path2) + 1);
  3631. }
  3632. }
  3633. POST_SYSCALL(symlinkat)
  3634. (long long res, void *path1_, long long fd_, void *path2_) {
  3635. const char *path1 = (const char *)path1_;
  3636. const char *path2 = (const char *)path2_;
  3637. if (res == 0) {
  3638. if (path1) {
  3639. POST_READ(path1, __sanitizer::internal_strlen(path1) + 1);
  3640. }
  3641. if (path2) {
  3642. POST_READ(path2, __sanitizer::internal_strlen(path2) + 1);
  3643. }
  3644. }
  3645. }
  3646. PRE_SYSCALL(unlinkat)(long long fd_, void *path_, long long flag_) {
  3647. const char *path = (const char *)path_;
  3648. if (path) {
  3649. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3650. }
  3651. }
  3652. POST_SYSCALL(unlinkat)
  3653. (long long res, long long fd_, void *path_, long long flag_) {
  3654. const char *path = (const char *)path_;
  3655. if (res == 0) {
  3656. if (path) {
  3657. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3658. }
  3659. }
  3660. }
  3661. PRE_SYSCALL(futimens)(long long fd_, void *tptr_) {
  3662. struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
  3663. if (tptr) {
  3664. PRE_READ(tptr[0], struct_timespec_sz);
  3665. PRE_READ(tptr[1], struct_timespec_sz);
  3666. }
  3667. }
  3668. POST_SYSCALL(futimens)(long long res, long long fd_, void *tptr_) {
  3669. struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
  3670. if (res == 0) {
  3671. if (tptr) {
  3672. POST_READ(tptr[0], struct_timespec_sz);
  3673. POST_READ(tptr[1], struct_timespec_sz);
  3674. }
  3675. }
  3676. }
  3677. PRE_SYSCALL(__quotactl)(void *path_, void *args_) {
  3678. const char *path = (const char *)path_;
  3679. if (path) {
  3680. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3681. }
  3682. }
  3683. POST_SYSCALL(__quotactl)(long long res, void *path_, void *args_) {
  3684. const char *path = (const char *)path_;
  3685. if (res == 0) {
  3686. if (path) {
  3687. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3688. }
  3689. }
  3690. }
  3691. PRE_SYSCALL(posix_spawn)
  3692. (void *pid_, void *path_, void *file_actions_, void *attrp_, void *argv_,
  3693. void *envp_) {
  3694. const char *path = (const char *)path_;
  3695. if (path) {
  3696. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3697. }
  3698. }
  3699. POST_SYSCALL(posix_spawn)
  3700. (long long res, void *pid_, void *path_, void *file_actions_, void *attrp_,
  3701. void *argv_, void *envp_) {
  3702. const char *path = (const char *)path_;
  3703. if (pid_) {
  3704. if (path) {
  3705. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3706. }
  3707. }
  3708. }
  3709. PRE_SYSCALL(recvmmsg)
  3710. (long long s_, void *mmsg_, long long vlen_, long long flags_, void *timeout_) {
  3711. if (timeout_) {
  3712. PRE_READ(timeout_, struct_timespec_sz);
  3713. }
  3714. }
  3715. POST_SYSCALL(recvmmsg)
  3716. (long long res, long long s_, void *mmsg_, long long vlen_, long long flags_,
  3717. void *timeout_) {
  3718. if (res >= 0) {
  3719. if (timeout_) {
  3720. POST_READ(timeout_, struct_timespec_sz);
  3721. }
  3722. }
  3723. }
  3724. PRE_SYSCALL(sendmmsg)
  3725. (long long s_, void *mmsg_, long long vlen_, long long flags_) {
  3726. struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
  3727. if (mmsg) {
  3728. PRE_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) *
  3729. (vlen_ > 1024 ? 1024 : vlen_));
  3730. }
  3731. }
  3732. POST_SYSCALL(sendmmsg)
  3733. (long long res, long long s_, void *mmsg_, long long vlen_, long long flags_) {
  3734. struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
  3735. if (res >= 0) {
  3736. if (mmsg) {
  3737. POST_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) *
  3738. (vlen_ > 1024 ? 1024 : vlen_));
  3739. }
  3740. }
  3741. }
  3742. PRE_SYSCALL(clock_nanosleep)
  3743. (long long clock_id_, long long flags_, void *rqtp_, void *rmtp_) {
  3744. if (rqtp_) {
  3745. PRE_READ(rqtp_, struct_timespec_sz);
  3746. }
  3747. }
  3748. POST_SYSCALL(clock_nanosleep)
  3749. (long long res, long long clock_id_, long long flags_, void *rqtp_,
  3750. void *rmtp_) {
  3751. if (rqtp_) {
  3752. POST_READ(rqtp_, struct_timespec_sz);
  3753. }
  3754. }
  3755. PRE_SYSCALL(___lwp_park60)
  3756. (long long clock_id_, long long flags_, void *ts_, long long unpark_,
  3757. void *hint_, void *unparkhint_) {
  3758. if (ts_) {
  3759. PRE_READ(ts_, struct_timespec_sz);
  3760. }
  3761. }
  3762. POST_SYSCALL(___lwp_park60)
  3763. (long long res, long long clock_id_, long long flags_, void *ts_,
  3764. long long unpark_, void *hint_, void *unparkhint_) {
  3765. if (res == 0) {
  3766. if (ts_) {
  3767. POST_READ(ts_, struct_timespec_sz);
  3768. }
  3769. }
  3770. }
  3771. PRE_SYSCALL(posix_fallocate)
  3772. (long long fd_, long long PAD_, long long pos_, long long len_) {
  3773. /* Nothing to do */
  3774. }
  3775. POST_SYSCALL(posix_fallocate)
  3776. (long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
  3777. /* Nothing to do */
  3778. }
  3779. PRE_SYSCALL(fdiscard)
  3780. (long long fd_, long long PAD_, long long pos_, long long len_) {
  3781. /* Nothing to do */
  3782. }
  3783. POST_SYSCALL(fdiscard)
  3784. (long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
  3785. /* Nothing to do */
  3786. }
  3787. PRE_SYSCALL(wait6)
  3788. (long long idtype_, long long id_, void *status_, long long options_,
  3789. void *wru_, void *info_) {
  3790. /* Nothing to do */
  3791. }
  3792. POST_SYSCALL(wait6)
  3793. (long long res, long long idtype_, long long id_, void *status_,
  3794. long long options_, void *wru_, void *info_) {
  3795. /* Nothing to do */
  3796. }
  3797. PRE_SYSCALL(clock_getcpuclockid2)
  3798. (long long idtype_, long long id_, void *clock_id_) {
  3799. /* Nothing to do */
  3800. }
  3801. POST_SYSCALL(clock_getcpuclockid2)
  3802. (long long res, long long idtype_, long long id_, void *clock_id_) {
  3803. /* Nothing to do */
  3804. }
  3805. PRE_SYSCALL(__getvfsstat90)(void *buf_, long long bufsize_, long long flags_) {
  3806. /* Nothing to do */
  3807. }
  3808. POST_SYSCALL(__getvfsstat90)
  3809. (long long res, void *buf_, long long bufsize_, long long flags_) {
  3810. /* Nothing to do */
  3811. }
  3812. PRE_SYSCALL(__statvfs190)(void *path_, void *buf_, long long flags_) {
  3813. const char *path = (const char *)path_;
  3814. if (path) {
  3815. PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
  3816. }
  3817. }
  3818. POST_SYSCALL(__statvfs190)
  3819. (long long res, void *path_, void *buf_, long long flags_) {
  3820. const char *path = (const char *)path_;
  3821. if (path) {
  3822. POST_READ(path, __sanitizer::internal_strlen(path) + 1);
  3823. }
  3824. }
  3825. PRE_SYSCALL(__fstatvfs190)(long long fd_, void *buf_, long long flags_) {
  3826. /* Nothing to do */
  3827. }
  3828. POST_SYSCALL(__fstatvfs190)
  3829. (long long res, long long fd_, void *buf_, long long flags_) {
  3830. /* Nothing to do */
  3831. }
  3832. PRE_SYSCALL(__fhstatvfs190)
  3833. (void *fhp_, long long fh_size_, void *buf_, long long flags_) {
  3834. if (fhp_) {
  3835. PRE_READ(fhp_, fh_size_);
  3836. }
  3837. }
  3838. POST_SYSCALL(__fhstatvfs190)
  3839. (long long res, void *fhp_, long long fh_size_, void *buf_, long long flags_) {}
  3840. PRE_SYSCALL(__acl_get_link)(void *path_, long long type_, void *aclp_) {
  3841. /* TODO */
  3842. }
  3843. POST_SYSCALL(__acl_get_link)
  3844. (long long res, void *path_, long long type_, void *aclp_) {
  3845. /* TODO */
  3846. }
  3847. PRE_SYSCALL(__acl_set_link)(void *path_, long long type_, void *aclp_) {
  3848. /* TODO */
  3849. }
  3850. POST_SYSCALL(__acl_set_link)
  3851. (long long res, void *path_, long long type_, void *aclp_) {
  3852. /* TODO */
  3853. }
  3854. PRE_SYSCALL(__acl_delete_link)(void *path_, long long type_) { /* TODO */ }
  3855. POST_SYSCALL(__acl_delete_link)(long long res, void *path_, long long type_) {
  3856. /* TODO */
  3857. }
  3858. PRE_SYSCALL(__acl_aclcheck_link)(void *path_, long long type_, void *aclp_) {
  3859. /* TODO */
  3860. }
  3861. POST_SYSCALL(__acl_aclcheck_link)
  3862. (long long res, void *path_, long long type_, void *aclp_) {
  3863. /* TODO */
  3864. }
  3865. PRE_SYSCALL(__acl_get_file)(void *path_, long long type_, void *aclp_) {
  3866. /* TODO */
  3867. }
  3868. POST_SYSCALL(__acl_get_file)
  3869. (long long res, void *path_, long long type_, void *aclp_) {
  3870. /* TODO */
  3871. }
  3872. PRE_SYSCALL(__acl_set_file)(void *path_, long long type_, void *aclp_) {
  3873. /* TODO */
  3874. }
  3875. POST_SYSCALL(__acl_set_file)
  3876. (long long res, void *path_, long long type_, void *aclp_) {
  3877. /* TODO */
  3878. }
  3879. PRE_SYSCALL(__acl_get_fd)(long long filedes_, long long type_, void *aclp_) {
  3880. /* TODO */
  3881. }
  3882. POST_SYSCALL(__acl_get_fd)
  3883. (long long res, long long filedes_, long long type_, void *aclp_) {
  3884. /* TODO */
  3885. }
  3886. PRE_SYSCALL(__acl_set_fd)(long long filedes_, long long type_, void *aclp_) {
  3887. /* TODO */
  3888. }
  3889. POST_SYSCALL(__acl_set_fd)
  3890. (long long res, long long filedes_, long long type_, void *aclp_) {
  3891. /* TODO */
  3892. }
  3893. PRE_SYSCALL(__acl_delete_file)(void *path_, long long type_) { /* TODO */ }
  3894. POST_SYSCALL(__acl_delete_file)(long long res, void *path_, long long type_) {
  3895. /* TODO */
  3896. }
  3897. PRE_SYSCALL(__acl_delete_fd)(long long filedes_, long long type_) { /* TODO */ }
  3898. POST_SYSCALL(__acl_delete_fd)
  3899. (long long res, long long filedes_, long long type_) {
  3900. /* TODO */
  3901. }
  3902. PRE_SYSCALL(__acl_aclcheck_file)(void *path_, long long type_, void *aclp_) {
  3903. /* TODO */
  3904. }
  3905. POST_SYSCALL(__acl_aclcheck_file)
  3906. (long long res, void *path_, long long type_, void *aclp_) {
  3907. /* TODO */
  3908. }
  3909. PRE_SYSCALL(__acl_aclcheck_fd)
  3910. (long long filedes_, long long type_, void *aclp_) {
  3911. /* TODO */
  3912. }
  3913. POST_SYSCALL(__acl_aclcheck_fd)
  3914. (long long res, long long filedes_, long long type_, void *aclp_) {
  3915. /* TODO */
  3916. }
  3917. PRE_SYSCALL(lpathconf)(void *path_, long long name_) { /* TODO */ }
  3918. POST_SYSCALL(lpathconf)(long long res, void *path_, long long name_) {
  3919. /* TODO */
  3920. }
  3921. #undef SYS_MAXSYSARGS
  3922. } // extern "C"
  3923. #undef PRE_SYSCALL
  3924. #undef PRE_READ
  3925. #undef PRE_WRITE
  3926. #undef POST_SYSCALL
  3927. #undef POST_READ
  3928. #undef POST_WRITE
  3929. #endif // SANITIZER_NETBSD