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/qualification/security673/gate669.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 / qualification / security673 / gate669.om` 770 lines ยท 15964 bytes Raw Blame History 1 note Native issue669 qualification coordinator. Run from repository root; scratch must not exist. 2 note All child exits are observed; signal, timeout, failed build, malformed oracle output fail closed. 3 note GNU objdump is an independent decoder. Hashes identify artifacts and do not prove correctness. 4 text bd "build" 5 text scratch "build/security673-native" 6 text prefix "build/security673-native/" 7 text names "seed/omc/omc.om\nseed/qualification/security673/branch-corpus.om\nseed/qualification/security673/branch-mutate.om\nseed/qualification/security673/branch-check.om\n/usr/bin/objdump\n-D\n-b\nbinary\n-m\naarch64\n0\n1\n/dev/null\nseed/rung4/om4.bin\nseed/qualification/security673/array-fill.om\nseed/qualification/security673/oracle-corpus.om\nseed/qualification/security673/gate-child.om\nseed/qualification/security673/hostile-corpus.om\n3\nseed/qualification/security673/branch-forms.om\nseed/qualification/security673/packet-corpus.om\nseed/qualification/security673/pkt-consumer.om\nseed/qualification/security673/renames-corpus.om\nseed/qualification/security673/renames-consumer.om\nseed/qualification/security673/path-consumer.om\nseed/authority/action-gate.om\nseed/authority/delegate-gate.om\nseed/authority/reuse-gate.om\nseed/authority/store-gate.om\nseed/authority/dispatch-gate.om\nseed/trace/sha256-gate.om\nseed/authority/lock-gate.om\n7\nseed/authority/dispatch-order-gate.om\nseed/authority/store-exact-gate.om\nseed/authority/store-cleanup-gate.om\n" 8 text input " < " 9 text output " > " 10 text errors " 2> " 11 text cwdmsg " cwd=" 12 text nl "\n" 13 text statusm "exit=" 14 text expect " expected=" 15 text signalm "INVALID child wait low-byte=" 16 text timeoutm "INVALID child deadline exceeded; sent SIGKILL; wait low-byte=" 17 text elapsedm "elapsed_ns=" 18 text ingress "GATE671 SOURCE PASS bounded synthetic source families only\n" 19 text numred "NEGATIVE CONTROL: compiled numeric-limit bypass admits21 digits; this violates the20-digit profile. Fixed compiler refuses6.\n" 20 text passed "GATE669 PASS bounded Linux AArch64 execution and independent decoding only\n" 21 text failed "GATE669 FAIL; retain all scratch files and command output\n" 22 global pathbuf uchar 4096 23 global plen ulong 1 24 global serial ulong 1 25 global workdir ulong 1 26 global argv uchar 4096 27 global argc ulong 1 28 global apos ulong 1 29 global statbuf uchar 4 30 global buf uchar 4096 31 global other uchar 4096 32 global digits uchar 32 33 fn stop to void 34 r = write 2 failed 0 len failed 35 exit 99 36 end 37 fn decimal v ulong to ulong 38 x = v 39 n = ulong 0 40 while ge x 10 41 put digits n uchar add 48 rem x 10 42 x = div x 10 43 n = add n 1 44 end 45 put digits n uchar add 48 x 46 ret add n 1 47 end 48 fn num v ulong to void 49 n = decimal v 50 for i ulong n 51 r = write 1 digits sub sub n i 1 1 52 if ne r 1 53 stop 54 end 55 end 56 end 57 fn setpath id ulong to void 58 if ge id 1000 59 for i ulong len prefix 60 put pathbuf i get prefix i 61 end 62 n = decimal id 63 for i ulong n 64 put pathbuf add len prefix i get digits sub sub n i 1 65 end 66 put plen 0 add len prefix n 67 ret 68 end 69 index = ulong 1 70 p = ulong 0 71 for i ulong len names 72 b = get names i 73 if eq b 10 74 if eq index id 75 put plen 0 p 76 ret 77 end 78 index = add index 1 79 else 80 if eq index id 81 put pathbuf p b 82 p = add p 1 83 end 84 end 85 end 86 stop 87 end 88 fn showpath id ulong to void 89 setpath id 90 r = write 1 pathbuf 0 get plen 0 91 if ne r long get plen 0 92 stop 93 end 94 end 95 fn openfile id ulong flags int to int 96 setpath id 97 r = fopen pathbuf 0 get plen 0 flags 384 98 if lt r 0 99 stop 100 end 101 ret int r 102 end 103 fn fresh to ulong 104 n = add get serial 0 1 105 if ge n 400000 106 stop 107 end 108 put serial 0 n 109 ret add 1000 n 110 end 111 fn packarg to void 112 p = get apos 0 113 n = get plen 0 114 if gt add add p n 2 len argv 115 stop 116 end 117 put argv p uchar and n 255 118 put argv add p 1 uchar shr n 8 119 p = add p 2 120 for i ulong n 121 put argv add p i get pathbuf i 122 end 123 put apos 0 add p n 124 put argc 0 add get argc 0 1 125 end 126 fn arg id ulong to void 127 setpath id 128 packarg 129 end 130 note Shift the relative path right by base+1 (from its end), then prefix the cwd and '/'. 131 fn absjoin base ulong size ulong to void 132 for i ulong get plen 0 133 at = sub sub get plen 0 i 1 134 put pathbuf add add base 1 at get pathbuf at 135 end 136 for i ulong base 137 put pathbuf i get other i 138 end 139 put pathbuf base 47 140 put plen 0 size 141 end 142 note Isolated children use the absolute executable path captured before chdir. 143 fn abscmd exe ulong to void 144 setpath exe 145 n = cwd other 0 len other 146 if or le n 1 gt n long len other 147 stop 148 end 149 base = sub ulong n 1 150 if or ne get other 0 47 ne get other base 0 151 stop 152 end 153 size = add add base 1 get plen 0 154 if gt size len pathbuf 155 stop 156 end 157 absjoin base size 158 put argc 0 0 159 put apos 0 2 160 packarg 161 r = write 1 pathbuf 0 size 162 if ne r long size 163 stop 164 end 165 end 166 fn command exe ulong to void 167 put argc 0 0 168 put apos 0 2 169 arg exe 170 showpath exe 171 end 172 fn argument id ulong to void 173 put digits 0 32 174 r = write 1 digits 0 1 175 showpath id 176 arg id 177 end 178 fn close fd int to void 179 if ne fclose fd 0 180 stop 181 end 182 end 183 fn redirect source int dest int to void 184 if ne source dest 185 if ne dupfd source dest 0 long dest 186 stop 187 end 188 end 189 end 190 fn reap pid int to ulong 191 start = monons 192 if lt start 0 193 stop 194 end 195 while true 196 r = waitpid pid statbuf 0 len statbuf 1 197 if eq r long pid 198 r = write 1 elapsedm 0 len elapsedm 199 num ulong sub monons start 200 r = write 1 nl 0 1 201 if ne get statbuf 0 0 202 r = write 1 signalm 0 len signalm 203 num ulong get statbuf 0 204 r = write 1 nl 0 1 205 stop 206 end 207 ret ulong get statbuf 1 208 end 209 if lt r 0 210 stop 211 end 212 now = monons 213 if or lt now start gt sub now start `30000000000` 214 r = killpid pid 9 215 r = waitpid pid statbuf 0 len statbuf 0 216 r = write 1 timeoutm 0 len timeoutm 217 num ulong get statbuf 0 218 r = write 1 nl 0 1 219 stop 220 end 221 if ne sleepns `1000000` 0 222 stop 223 end 224 end 225 exit 99 226 end 227 fn run source ulong wanted ulong to ulong 228 outid = fresh 229 errid = add outid 500000 230 r = write 1 input 0 len input 231 showpath source 232 r = write 1 output 0 len output 233 showpath outid 234 r = write 1 errors 0 len errors 235 showpath errid 236 if ne get workdir 0 0 237 r = write 1 cwdmsg 0 len cwdmsg 238 showpath get workdir 0 239 end 240 r = write 1 nl 0 1 241 rd = openfile source 524288 242 wr = openfile outid 524481 243 er = openfile errid 524481 244 put argv 0 uchar get argc 0 245 put argv 1 uchar shr get argc 0 8 246 pid = fork 247 if lt pid 0 248 stop 249 end 250 if eq pid 0 251 redirect rd 0 252 redirect wr 1 253 redirect er 2 254 if ne get workdir 0 0 255 setpath get workdir 0 256 if ne chdir pathbuf 0 get plen 0 0 257 exit 97 258 end 259 end 260 r = execprog argv 0 get apos 0 261 exit 98 262 end 263 close rd 264 close wr 265 close er 266 actual = reap int pid 267 r = write 1 statusm 0 len statusm 268 num actual 269 r = write 1 expect 0 len expect 270 num wanted 271 r = write 1 nl 0 1 272 if ne actual wanted 273 stop 274 end 275 ret outid 276 end 277 fn enable id ulong to void 278 fd = openfile id 524288 279 r = read fd buf 0 4 280 if ne r 4 281 stop 282 end 283 if or ne get buf 0 127 ne get buf 1 69 284 stop 285 end 286 if or ne get buf 2 76 ne get buf 3 70 287 stop 288 end 289 if ne fchmod fd 448 0 290 stop 291 end 292 close fd 293 end 294 fn empty id ulong to void 295 fd = openfile id 524288 296 r = read fd buf 0 1 297 close fd 298 if ne r 0 299 stop 300 end 301 end 302 fn compile cc ulong src ulong wanted ulong to ulong 303 command cc 304 outid = run src wanted 305 if eq wanted 0 306 enable outid 307 else 308 empty outid 309 end 310 ret outid 311 end 312 fn equal a ulong b ulong to void 313 fa = openfile a 524288 314 fb = openfile b 524288 315 while true 316 ra = read fa buf 0 len buf 317 rb = read fb other 0 len other 318 if or lt ra 0 ne ra rb 319 stop 320 end 321 if eq ra 0 322 close fa 323 close fb 324 ret 325 end 326 for i ulong ulong ra 327 if ne get buf i get other i 328 stop 329 end 330 end 331 end 332 end 333 fn params mode uchar count ulong size ulong to ulong 334 id = fresh 335 fd = openfile id 524481 336 put buf 0 mode 337 for i ulong 4 338 put buf add i 1 uchar and shr count mul i 8 255 339 end 340 if ne write fd buf 0 size long size 341 stop 342 end 343 close fd 344 ret id 345 end 346 fn decode checker ulong elf ulong wanted ulong to void 347 command 5 348 argument 6 349 argument 7 350 argument 8 351 argument 9 352 argument 10 353 argument elf 354 decoded = run 13 0 355 command checker 356 result = run decoded wanted 357 end 358 fn fixture gen ulong mode uchar count ulong to ulong 359 p = params mode count 5 360 command gen 361 ret run p 0 362 end 363 fn positive cc ulong gen ulong checker ulong count ulong to void 364 src = fixture gen 0 count 365 elf = compile cc src 0 366 decode checker elf 0 367 command elf 368 outid = run 13 0 369 empty outid 370 end 371 fn negative cc ulong gen ulong mode uchar count ulong to void 372 src = fixture gen mode count 373 elf = compile cc src 24 374 end 375 note trapfar: corpus mode3 (div x 0, then N one-word lines). Through omc `f4fa7951` the trap branch's stub sat at 376 note the function's end, past imm19, and N = 300000 was error 24; since 2026-11-11 omc places waiting trap stubs 377 note in an island behind a B (OMEGESE 9.6), so it compiles and runs to trap 2 (exit 102, no output): the division 378 note check's CBZ reaches the code-2 stub the island placed 512 KiB in. (branch-check reads b.ne forms only.) 379 fn trapfar cc ulong gen ulong checker ulong count ulong to void 380 src = fixture gen 3 count 381 elf = compile cc src 0 382 command elf 383 outid = run 13 102 384 empty outid 385 end 386 note backward: corpus mode4 (a while whose `continue` is a B.AL back to the loop head, N+11 words from it) 387 note compiled, decoded with branch-check 1 (first b.al must hit mov x4, 12345) and run (exit 0, no output). 388 fn backward cc ulong gen ulong checker ulong count ulong to void 389 src = fixture gen 4 count 390 elf = compile cc src 0 391 command 5 392 argument 6 393 argument 7 394 argument 8 395 argument 9 396 argument 10 397 argument elf 398 decoded = run 13 0 399 command checker 400 argument 12 401 result = run decoded 0 402 command elf 403 outid = run 13 0 404 empty outid 405 end 406 note backred: N = 262134 puts the continue 2^18 + 1 words back. The correct compiler refuses it with 24 407 note (the head's loop-bound B.cs, N+16 words forward, is refused first); the range-free compiler (mode7) 408 note accepts it, and its continue decodes to the wrong target (61). That output is never executed. 409 fn backred cc ulong gen ulong mut ulong checker ulong to void 410 command mut 411 argument 33 412 bare = run 1 0 413 badcc = compile cc bare 0 414 sample = fixture gen 4 262134 415 elf = compile badcc sample 0 416 command 5 417 argument 6 418 argument 7 419 argument 8 420 argument 9 421 argument 10 422 argument elf 423 decoded = run 13 0 424 command checker 425 argument 12 426 result = run decoded 61 427 refused = compile cc sample 24 428 end 429 note boundaries: the real bdisp through probe cases 0..7 (imm19 and imm26 extremes, accepted with the exact 430 note field), 8..15 (one word past each limit, misaligned target or origin: error 24), 16 (a word at 8 MiB, 431 note the ceiling through omc `f4fa7951`, accepted since the output grows in omc's arena) and 17 (the first word at 432 note the AArch64 output ceiling of 128 MiB: error 14, the invariant that keeps every B/BL inside imm26). Then the range-free mutant (mode7 then mode0) must answer 81 exactly 433 note on the four out-of-range cases: a removed range check is caught by name, alignment cases stay 24. 434 fn want669 i ulong to ulong 435 if and ge i 8 lt i 16 436 ret 24 437 end 438 if eq i 17 439 ret 14 440 end 441 ret 0 442 end 443 fn boundaries cc ulong mut ulong to void 444 command mut 445 argument 11 446 src = run 1 0 447 probe = compile cc src 0 448 for i ulong 18 449 p = params uchar i 0 1 450 command probe 451 result = run p want669 i 452 end 453 end 454 fn rangefree cc ulong mut ulong to void 455 command mut 456 argument 33 457 bare = run 1 0 458 command mut 459 argument 11 460 fsrc = run bare 0 461 fprobe = compile cc fsrc 0 462 for i ulong 18 463 p = params uchar i 0 1 464 want = want669 i 465 if or or eq i 8 eq i 9 or eq i 12 eq i 13 466 want = ulong 81 467 end 468 command fprobe 469 result = run p want 470 end 471 end 472 fn mutant cc ulong gen ulong mut ulong checker ulong to void 473 command mut 474 argument 12 475 src = run 1 0 476 badcc = compile cc src 0 477 sample = fixture gen 0 262144 478 elf = compile badcc sample 0 479 decode checker elf 61 480 refused = compile cc sample 24 481 end 482 fn oracle cc ulong checker ulong to void 483 gen = compile cc 16 0 484 for i ulong 7 485 p = params uchar i 0 1 486 command gen 487 sample = run p 0 488 command checker 489 wanted = ulong 62 490 if eq i 0 491 wanted = ulong 0 492 end 493 if eq i 5 494 wanted = ulong 61 495 end 496 result = run sample wanted 497 end 498 end 499 fn control cc ulong to void 500 if ne argread 1 buf 0 1 1 501 stop 502 end 503 m = get buf 0 504 if or lt m 48 gt m 50 505 stop 506 end 507 p = params sub m 48 0 1 508 child = compile cc 17 0 509 command child 510 result = run p 0 511 stop 512 end 513 fn ingresscase cc ulong gen ulong mode uchar count ulong wanted ulong result ulong to void 514 src = fixture gen mode count 515 elf = compile cc src wanted 516 if eq wanted 0 517 command elf 518 outid = run 13 result 519 empty outid 520 end 521 end 522 fn hostile cc ulong to void 523 gen = compile cc 18 0 524 ingresscase cc gen 0 20 0 0 525 ingresscase cc gen 0 21 6 0 526 ingresscase cc gen 0 `1000001` 6 0 527 ingresscase cc gen 1 1000 0 0 528 ingresscase cc gen 1 1021 0 1 529 ingresscase cc gen 1 1022 0 0 530 ingresscase cc gen 1 1023 14 0 531 ingresscase cc gen 2 512 0 0 532 ingresscase cc gen 2 513 14 0 533 ingresscase cc gen 3 `1000001` 0 0 534 ingresscase cc gen 4 4095 0 0 535 ingresscase cc gen 4 4096 14 0 536 ingresscase cc gen 5 0 16 0 537 ingresscase cc gen 6 0 23 0 538 ingresscase cc gen 7 0 22 0 539 ingresscase cc gen 8 0 3 0 540 ingresscase cc gen 9 `1000001` 0 0 541 ingresscase cc gen 10 `8388608` 14 0 542 ingresscase cc gen 11 `1000001` 0 0 543 ingresscase cc gen 12 `1000001` 0 15 544 ingresscase cc gen 13 70 0 3 545 ingresscase cc gen 13 `1000001` 0 3 546 mut = compile cc 3 0 547 command mut 548 argument 19 549 changed = run 1 0 550 badcc = compile cc changed 0 551 sample = fixture gen 0 21 552 badelf = compile badcc sample 0 553 refused = compile cc sample 6 554 r = write 1 numred 0 len numred 555 if ne r long len numred 556 stop 557 end 558 r = write 1 ingress 0 len ingress 559 if ne r long len ingress 560 stop 561 end 562 end 563 fn formwant m ulong to ulong 564 if eq m 0 565 ret 11 566 end 567 if eq m 1 568 ret 12 569 end 570 if eq m 2 571 ret 11 572 end 573 if eq m 3 574 ret 11 575 end 576 if eq m 4 577 ret 11 578 end 579 if eq m 5 580 ret 11 581 end 582 if eq m 6 583 ret 11 584 end 585 if eq m 7 586 ret 12 587 end 588 if eq m 8 589 ret 12 590 end 591 if eq m 9 592 ret 3 593 end 594 if eq m 10 595 ret 3 596 end 597 if eq m 11 598 ret 21 599 end 600 if eq m 12 601 ret 30 602 end 603 if eq m 13 604 ret 107 605 end 606 if eq m 14 607 ret 102 608 end 609 ret 90 610 end 611 fn forms cc ulong to void 612 gen = compile cc 20 0 613 for m ulong 15 614 p = params uchar m 0 1 615 command gen 616 src = run p 0 617 elf = compile cc src 0 618 command elf 619 outid = run 13 formwant m 620 empty outid 621 end 622 end 623 fn packetwant m ulong to ulong 624 if eq m 0 625 ret 0 626 end 627 if eq m 8 628 ret 0 629 end 630 ret 103 631 end 632 fn packets cc ulong to void 633 gen = compile cc 21 0 634 cons = compile cc 22 0 635 for m ulong 9 636 p = params uchar m 0 1 637 command gen 638 src = run p 0 639 command cons 640 outid = run src packetwant m 641 empty outid 642 end 643 end 644 fn renameswant m ulong to ulong 645 if eq m 0 646 ret 0 647 end 648 ret 103 649 end 650 fn renamescc cc ulong to void 651 gen = compile cc 23 0 652 cons = compile cc 24 0 653 for m ulong 7 654 p = params uchar m 0 1 655 command gen 656 src = run p 0 657 command cons 658 outid = run src renameswant m 659 empty outid 660 end 661 end 662 fn pathwant m ulong to ulong 663 if or or eq m 1 eq m 2 eq m 5 664 ret 103 665 end 666 ret 0 667 end 668 fn pathcc cc ulong to void 669 cons = compile cc 25 0 670 for m ulong 7 671 p = params uchar m 0 1 672 command cons 673 argument 1 674 outid = run p pathwant m 675 empty outid 676 end 677 end 678 fn authone cc ulong id ulong to void 679 elf = compile cc id 0 680 command elf 681 outid = run 13 0 682 end 683 note Only these three regressions get fresh child cwd; parent stays at repository root. 684 fn authiso cc ulong id ulong to void 685 elf = compile cc id 0 686 dir = fresh 687 setpath dir 688 if ne makedir pathbuf 0 get plen 0 448 0 689 stop 690 end 691 abscmd elf 692 put workdir 0 dir 693 outid = run 13 0 694 put workdir 0 0 695 end 696 fn authority cc ulong to void 697 authone cc 26 698 authone cc 27 699 authone cc 28 700 authone cc 29 701 authone cc 30 702 authone cc 31 703 authone cc 32 704 authiso cc 34 705 authiso cc 35 706 authiso cc 36 707 end 708 fn main to int 709 if or lt argcnt 1 gt argcnt 2 710 ret 90 711 end 712 mk = makedir bd 0 len bd 448 713 if or eq mk 0 eq mk -17 714 else 715 ret 91 716 end 717 if ne makedir scratch 0 len scratch 448 0 718 ret 91 719 end 720 cc1 = compile 14 1 0 721 cc2 = compile cc1 1 0 722 equal cc1 cc2 723 if eq argcnt 2 724 if ne argread 1 buf 0 1 1 725 stop 726 end 727 if eq get buf 0 51 728 hostile cc2 729 ret 0 730 end 731 control cc2 732 ret 99 733 end 734 gen = compile cc2 2 0 735 mut = compile cc2 3 0 736 checker = compile cc2 4 0 737 boundaries cc2 mut 738 rangefree cc2 mut 739 array = compile cc2 15 0 740 command array 741 result = run 13 0 742 oracle cc2 checker 743 forms cc2 744 packets cc2 745 renamescc cc2 746 pathcc cc2 747 authority cc2 748 positive cc2 gen checker 16 749 positive cc2 gen checker 262142 750 negative cc2 gen 0 262143 751 negative cc2 gen 0 524287 752 negative cc2 gen 1 300000 753 negative cc2 gen 2 300000 754 trapfar cc2 gen checker 300000 755 backward cc2 gen checker 3 756 backward cc2 gen checker 16 757 backward cc2 gen checker 262131 758 negative cc2 gen 4 262132 759 negative cc2 gen 4 262133 760 negative cc2 gen 4 262134 761 backred cc2 gen mut checker 762 mutant cc2 gen mut checker 763 command checker 764 result = run 13 62 765 r = write 1 passed 0 len passed 766 if ne r long len passed 767 ret 99 768 end 769 ret 0 770 end