Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/omc/sites/found-xhreq-4.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / omc / sites / found-xhreq-4.om` 94 lines ยท 2390 bytes Raw Blame History 1 note sites: found by a one-token change of a tracked program (41 to 120 lines); reaches the omc error site in xhreq (code 9) 2 note Parameter binding checks use invalid descriptors, never a GPU device. 3 global header uchar 48 4 global params uchar 32 5 note The parameter pool is image-backed, not a per-call stack allocation. 6 global large uchar `1048577` 7 global status uchar 4 8 text msg "PASS native device parameter binding\n" 9 fn ck yes bool to void 10 if not yes 11 exit int 80 12 end 13 end 14 fn fault k int to int 15 if eq k 0 16 r = devcall neg 15 1 uint `3223340587` header 0 31 params 0 0 17 ret int r 18 end 19 if eq k 1 20 r = devcall neg int 1 uint `3223340587` header 17 32 params 0 0 21 ret int r 22 end 23 if eq k 2 24 r = devcall neg int 1 uint `3223340587` header 0 32 params 31 2 25 ret int r 26 end 27 if eq k 3 28 put header 16 1 29 r = devcall neg int 1 uint `3223340587` header 0 32 params 0 1 30 ret int r 31 end 32 if eq k 4 33 r = devcall neg int 1 uint `3223340587` header 0 32 large 0 `1048577` 34 ret int r 35 end 36 if eq k 6 37 r = devcall neg int 1 uint `3223340587` header 0 32 large 2 `1048576` 38 ret int r 39 end 40 r = devcall neg int 1 uint `3223340587` header 0 32 params `18446744073709551615` 1 41 ret int r 42 end 43 fn main to int 44 for i ulong 48 45 put header i 171 46 end 47 for i ulong 8 48 put header add i 24 0 49 end 50 for n ulong 33 51 ck eq devcall neg int 1 uint `3223340587` header 8 32 params 0 n neg long 9 52 for i ulong 48 53 if and ge i 24 lt i 32 54 ck eq get header i 0 55 else 56 if eq i 32 57 ck eq get header i uchar n 58 else 59 if and gt i 32 lt i 36 60 ck eq get header i 0 61 else 62 ck eq get header i 171 63 end 64 end 65 end 66 end 67 end 68 ck eq add devcall neg int 1 uint `3223340586` header 8 32 params 4 12 10 1 69 for i ulong 48 70 put header i 0 71 end 72 ck eq devcall neg int 1 uint `3223340587` header 0 32 large 1 16383 neg long 9 73 note Harmless memfd ioctls must reach Linux and return ENOTTY, not trap. 74 fd = memfd msg 0 len msg 0 75 ck ge fd 0 76 ck eq devcall int fd uint `3223340587` header 0 32 large 0 16384 neg long 25 77 ck eq devcall int fd uint `3223340587` header 0 32 large 0 32 neg long 25 78 ck eq devcall int fd uint `3223340587` header 0 32 large 0 55888 neg long 25 79 ck eq devcall int fd uint `3223340587` header 0 32 large 1 `1048576` neg long 25 80 ck eq devcall int fd uint `3223340586` header 0 32 large 0 `1048576` neg long 25 81 ck eq fclose int fd 0 82 for k int 7 83 p = fork 84 ck ge p 0 85 if eq p 0 86 exit fault k 87 end 88 ck eq waitpid int p status 0 4 0 p 89 ck eq get status 0 0 90 ck eq get status 1 103 91 end 92 ck eq write 1 msg 0 len msg long len msg 93 ret 0 94 end