@machinen/runtime 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +9445 -2148
- package/README.md +8 -10
- package/dist/index.d.ts +1788 -107
- package/dist/index.js +13044 -4861
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ interface PhaseLogEvent {
|
|
|
128
128
|
type LogEvent = ChunkLogEvent | PhaseLogEvent;
|
|
129
129
|
type OnLog = (evt: LogEvent) => void;
|
|
130
130
|
|
|
131
|
-
type SnapshotEngine = "criu" | "vmstate";
|
|
131
|
+
type SnapshotEngine = "criu" | "vmstate" | "portable";
|
|
132
132
|
|
|
133
133
|
interface AttachOptions {
|
|
134
134
|
/**
|
|
@@ -165,7 +165,8 @@ declare function attach(opts: AttachOptions): Promise<VmHandle>;
|
|
|
165
165
|
interface BootOptions {
|
|
166
166
|
/**
|
|
167
167
|
* Path to a rootfs tarball to boot from (e.g. the output of
|
|
168
|
-
* `provision()`, or
|
|
168
|
+
* `provision()`, or an arch-specific base rootfs tarball shipped in
|
|
169
|
+
* releases: `rootfs-debian-arm64.tar.gz` / `rootfs-debian-amd64.tar.gz`).
|
|
169
170
|
* Paired with `cmd` — both required, or neither (test-mode binary
|
|
170
171
|
* boots and snapshot-only restores both skip initramfs packing).
|
|
171
172
|
*/
|
|
@@ -287,10 +288,10 @@ interface BootOptions {
|
|
|
287
288
|
*
|
|
288
289
|
* Trade-off vs. `liveMount`: `mount` is copy-into-disk-image (no
|
|
289
290
|
* runtime channel back to the host source dir, snapshots cleanly,
|
|
290
|
-
* but writes don't propagate to the host); `liveMount` is
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* but the host shouldn't see; `liveMount` for shared scratch.
|
|
291
|
+
* but writes don't propagate to the host); `liveMount` is an in-VMM
|
|
292
|
+
* virtio-fs pass-through (writes land on the host and restore/fork
|
|
293
|
+
* re-establish the same guest mount topology). Pick `mount` for inputs the
|
|
294
|
+
* guest may modify but the host shouldn't see; `liveMount` for shared scratch.
|
|
294
295
|
*
|
|
295
296
|
* See #64 (original `mount`), #78 (`liveMount`), #114 (rootdisk
|
|
296
297
|
* relocation; same shape), #272 (this overlay relocation).
|
|
@@ -336,6 +337,14 @@ interface BootOptions {
|
|
|
336
337
|
* @internal
|
|
337
338
|
*/
|
|
338
339
|
_vmstateRestorePath?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Vmstate restore: exact root block image from the snapshot bundle.
|
|
342
|
+
* `boot()` reflink-clones this into a per-VM temp file before
|
|
343
|
+
* attaching it so the restored guest cannot mutate the bundle.
|
|
344
|
+
*
|
|
345
|
+
* @internal
|
|
346
|
+
*/
|
|
347
|
+
_rootDiskRestorePath?: string;
|
|
339
348
|
/**
|
|
340
349
|
* Host directories exposed to the guest as live-share mounts (#78,
|
|
341
350
|
* #332). Unlike `mount` (copy-once into the boot rootfs), these stay
|
|
@@ -345,8 +354,8 @@ interface BootOptions {
|
|
|
345
354
|
* caches, untrusted guests).
|
|
346
355
|
*
|
|
347
356
|
* Each guest path must live under `/mnt/` (same rule as `mount`).
|
|
348
|
-
* Repeatable up to
|
|
349
|
-
* in-VMM virtio-fs device (the VMM wires
|
|
357
|
+
* Repeatable up to 5 entries per VM — each is served by its own
|
|
358
|
+
* in-VMM virtio-fs device (the VMM wires 5 virtio-fs slots). The
|
|
350
359
|
* FUSE opcode handlers run inside the VMM and the guest mounts each
|
|
351
360
|
* share directly with `mount -t virtiofs` — no agent process, no
|
|
352
361
|
* vsock hop. Requires a guest kernel with `CONFIG_VIRTIO_FS` — every
|
|
@@ -406,14 +415,28 @@ interface BootOptions {
|
|
|
406
415
|
kernel?: string;
|
|
407
416
|
/** Path to the guest device-tree blob. Forwarded as `MACHINEN_DTB`. */
|
|
408
417
|
dtb?: string;
|
|
418
|
+
/**
|
|
419
|
+
* Opt in to exposing arm64 EL2 / `/dev/kvm` to the guest so the
|
|
420
|
+
* workload can start its own VMs. This is intentionally off by
|
|
421
|
+
* default: it requires Linux/arm64 KVM with nested EL2 support, or
|
|
422
|
+
* macOS 15+ on M3/M4-class Apple Silicon, and provider-level
|
|
423
|
+
* snapshots of a nested-enabled VM are refused until EL2 vmstate
|
|
424
|
+
* capture is audited.
|
|
425
|
+
*
|
|
426
|
+
* When set, the runtime does a best-effort host preflight and passes
|
|
427
|
+
* `MACHINEN_NESTED=1` to the VMM. The VMM's backend probe is still
|
|
428
|
+
* authoritative.
|
|
429
|
+
*/
|
|
430
|
+
nested?: boolean;
|
|
409
431
|
/**
|
|
410
432
|
* Guest RAM ceiling, in MiB (decimal integer; no unit suffixes). The
|
|
411
|
-
* VMM reads this as `MACHINEN_MEMORY` (#263 phase A).
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* ceiling
|
|
415
|
-
*
|
|
416
|
-
*
|
|
433
|
+
* VMM reads this as `MACHINEN_MEMORY` (#263 phase A). This is the
|
|
434
|
+
* guest's memory layout limit, not the host memory used right now.
|
|
435
|
+
* Defaults to `min(host_ram_mib / 2, 4096)` with a floor of 512 — a
|
|
436
|
+
* modest ceiling for typical dev workloads. The ceiling is
|
|
437
|
+
* approximately free until the guest touches a page (see
|
|
438
|
+
* `packages/microvm/docs/memory.md`), but a bigger ceiling still
|
|
439
|
+
* increases guest metadata and the possible high-water mark.
|
|
417
440
|
*
|
|
418
441
|
* This is documented as a debug knob — most workloads should never
|
|
419
442
|
* need to set it.
|
|
@@ -458,16 +481,15 @@ interface BootOptions {
|
|
|
458
481
|
*
|
|
459
482
|
* Forces `pdeathsig: false` (otherwise the parent's exit kills the
|
|
460
483
|
* VMM, defeating the purpose). Compatible with every other boot
|
|
461
|
-
* option: gvproxy
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
484
|
+
* option: gvproxy is tracked in the registry, live mounts are served
|
|
485
|
+
* by in-VMM virtio-fs devices, and `mount` (squashfs+ext4 overlay)
|
|
486
|
+
* is fd-passed to the VMM at spawn so the supervisor holds no live
|
|
487
|
+
* state afterwards.
|
|
465
488
|
*
|
|
466
489
|
* Cleanup of per-boot reflink disks, bundle dirs, and vsock UDS
|
|
467
490
|
* directories normally happens in the parent's `child.once("exit")`
|
|
468
|
-
* hook. After detach the parent is gone, so those leak until
|
|
469
|
-
*
|
|
470
|
-
* land. Use `--detached` only when you understand that trade-off.
|
|
491
|
+
* hook. After detach the parent is gone, so those leak until
|
|
492
|
+
* `machinen gc` / `machinen stop` reaps them.
|
|
471
493
|
*
|
|
472
494
|
* Reattach with `attach({ name | pid })` from another process —
|
|
473
495
|
* the registry entry stays live, the vsock UDS is still listening.
|
|
@@ -534,9 +556,9 @@ declare function validateMemoryMib(mib: number): number;
|
|
|
534
556
|
* 1. `MACHINEN_VMM` env var (dev-mode override)
|
|
535
557
|
* 2. `require.resolve("@machinen/native-<arch>-<os>")` → `binary` export
|
|
536
558
|
*
|
|
537
|
-
* `@machinen/native-arm64-
|
|
538
|
-
* package — it carries the VMM, gvproxy,
|
|
539
|
-
*
|
|
559
|
+
* `@machinen/native-{arm64-darwin,arm64-linux,x64-linux}` is the
|
|
560
|
+
* consolidated host-tool package — it carries the VMM, gvproxy,
|
|
561
|
+
* guest ELFs, mke2fs, and mksquashfs. Callers can pass an explicit
|
|
540
562
|
* `binary` to `boot()` to bypass this.
|
|
541
563
|
*
|
|
542
564
|
* @throws {BootError} BOOT_VMM_MISSING | BOOT_VMM_PACKAGE_BROKEN
|
|
@@ -595,8 +617,9 @@ declare function warmImageConfigCache(imagePath: string, config: ImageConfig | n
|
|
|
595
617
|
|
|
596
618
|
interface RestoreOptions extends Omit<BootOptions, "snapshot" | "image" | "cmd" | "name"> {
|
|
597
619
|
/**
|
|
598
|
-
* Snapshot bundle directory produced by `vm.snapshot()`.
|
|
599
|
-
*
|
|
620
|
+
* Snapshot bundle directory produced by `vm.snapshot()`. Vmstate bundles
|
|
621
|
+
* contain `state.vmstate`, `rootdisk.img`, and `meta.json`; legacy CRIU
|
|
622
|
+
* bundles contain `img/<crius>` and `meta.json`.
|
|
600
623
|
*/
|
|
601
624
|
snapDir: string;
|
|
602
625
|
/**
|
|
@@ -614,19 +637,17 @@ interface RestoreOptions extends Omit<BootOptions, "snapshot" | "image" | "cmd"
|
|
|
614
637
|
*/
|
|
615
638
|
name?: string;
|
|
616
639
|
/**
|
|
617
|
-
* Opt into lazy-pages restore —
|
|
618
|
-
* the guest read-only and `criu restore
|
|
619
|
-
* on demand (#266). Default false: the runtime
|
|
620
|
-
* image into a tar on `/dev/vdb`, the guest's
|
|
621
|
-
* `/sbin/machinen-restore` untars it into tmpfs, and CRIU does an
|
|
622
|
-
*
|
|
640
|
+
* Opt into CRIU lazy-pages restore — the CRIU image directory is mounted
|
|
641
|
+
* into the guest read-only via in-VMM virtio-fs and `criu restore
|
|
642
|
+
* --lazy-pages` faults pages on demand (#266). Default false: the runtime
|
|
643
|
+
* packs the CRIU image into a tar on `/dev/vdb`, the guest's
|
|
644
|
+
* `/sbin/machinen-restore` untars it into tmpfs, and CRIU does an eager
|
|
645
|
+
* load.
|
|
623
646
|
*
|
|
624
|
-
* Eager is still the default because lazy
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
* the buddy allocator from clearing the Reported flag during a
|
|
629
|
-
* merge.
|
|
647
|
+
* Eager is still the CRIU default because lazy restore is a specialized
|
|
648
|
+
* UFFD path. The historical runaway free-page-reporting blocker under
|
|
649
|
+
* lazy is fixed in #290 by the in-tree kernel patch that stops the buddy
|
|
650
|
+
* allocator from clearing the Reported flag during a merge.
|
|
630
651
|
*/
|
|
631
652
|
lazy?: boolean;
|
|
632
653
|
}
|
|
@@ -753,48 +774,34 @@ interface VmHandle {
|
|
|
753
774
|
*/
|
|
754
775
|
writeFile(guestPath: string, contents: Buffer | string, opts?: WriteFileOptions): Promise<void>;
|
|
755
776
|
/**
|
|
756
|
-
*
|
|
757
|
-
* `opts.outDir`. The bundle is a directory containing:
|
|
777
|
+
* Write a snapshot bundle into `opts.outDir`.
|
|
758
778
|
*
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
*
|
|
779
|
+
* With the default vmstate engine this is an incremental checkpoint:
|
|
780
|
+
* the source VM keeps running, the first checkpoint in the VM's
|
|
781
|
+
* chain carries full sparse RAM + `rootdisk.img`, and later
|
|
782
|
+
* checkpoints carry RAM/rootdisk delta sections plus full vCPU,
|
|
783
|
+
* GIC, virtio queue, and virtio-fs backend state. `restore()` walks
|
|
784
|
+
* parent pointers and materializes a flat vmstate/rootdisk pair
|
|
785
|
+
* before booting through the normal vmstate restore path.
|
|
786
|
+
*
|
|
787
|
+
* With `MACHINEN_SNAPSHOT_ENGINE=criu`, this keeps the historical
|
|
788
|
+
* process-tree behavior: CRIU image files live under `<outDir>/img/`,
|
|
789
|
+
* `opts.leaveRunning: true` keeps the source alive, and the default
|
|
790
|
+
* destructive CRIU snapshot powers the source off after the dump.
|
|
791
|
+
* With `MACHINEN_SNAPSHOT_ENGINE=portable`, snapshot currently
|
|
792
|
+
* refuses with an experimental/unsupported-workload error; the
|
|
793
|
+
* semantic cross-ISA checkpoint implementation has not landed yet.
|
|
768
794
|
*
|
|
769
795
|
* `mount-lower.sqfs` and `mount-upper.img` are reflinked from the
|
|
770
796
|
* runtime's per-VM materialization (#272), so on APFS / btrfs / xfs
|
|
771
797
|
* the snapshot is essentially free space-wise even for a large
|
|
772
798
|
* mount payload — blocks stay shared until either side writes.
|
|
773
799
|
*
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
* Guest contract: the rootfs ships a dump helper callable via
|
|
779
|
-
* vsock exec — default `/sbin/machinen-dump`, override via
|
|
780
|
-
* `opts.dumpCmd`. The helper runs `criu dump --leave-running` and
|
|
781
|
-
* tars the resulting image set out on stdout, which the host
|
|
782
|
-
* extracts into `<outDir>/img/`. For destructive snapshots (default)
|
|
783
|
-
* the runtime then issues `/sbin/machinen-poweroff` over vsock to
|
|
784
|
-
* bring the VMM down; `opts.leaveRunning: true` skips that step
|
|
785
|
-
* and the source VM keeps running.
|
|
800
|
+
* `SNAPSHOT_TIMEOUT` if the dump doesn't complete within
|
|
801
|
+
* `opts.timeoutMs`; `SNAPSHOT_DUMP_FAILED` if the engine reports a
|
|
802
|
+
* failed/incomplete dump.
|
|
786
803
|
*
|
|
787
|
-
*
|
|
788
|
-
* `opts.timeoutMs`; `SNAPSHOT_DUMP_FAILED` if it returns non-zero
|
|
789
|
-
* or the streamed bundle is empty.
|
|
790
|
-
*
|
|
791
|
-
* Supported on both boot-owned and attach handles — attach uses
|
|
792
|
-
* the `diskPath` stored in the VM registry entry at boot time.
|
|
793
|
-
*
|
|
794
|
-
* By default the VM exits as part of the dump (CRIU kills the
|
|
795
|
-
* dumped tree on success). Pass `opts.leaveRunning: true` to keep
|
|
796
|
-
* the source VM alive — the workload resumes from the dump point
|
|
797
|
-
* and the bundle can be restored into a sibling VM (`vm.fork()`).
|
|
804
|
+
* Supported on both boot-owned and attach handles.
|
|
798
805
|
*/
|
|
799
806
|
snapshot(opts: SnapshotOptions): Promise<SnapshotResult>;
|
|
800
807
|
/**
|
|
@@ -917,8 +924,7 @@ interface SnapshotOptions {
|
|
|
917
924
|
*/
|
|
918
925
|
dumpCmd?: string;
|
|
919
926
|
/**
|
|
920
|
-
* Wall-clock ceiling for the dump
|
|
921
|
-
* in this window we SIGKILL it and fail. Default 90s.
|
|
927
|
+
* Wall-clock ceiling for the dump/checkpoint. Default 90s.
|
|
922
928
|
*/
|
|
923
929
|
timeoutMs?: number;
|
|
924
930
|
/**
|
|
@@ -928,12 +934,11 @@ interface SnapshotOptions {
|
|
|
928
934
|
*/
|
|
929
935
|
onLog?: OnLog;
|
|
930
936
|
/**
|
|
931
|
-
*
|
|
932
|
-
* survives the snapshot.
|
|
933
|
-
*
|
|
934
|
-
* Used by `vm.fork()` (#216).
|
|
937
|
+
* CRIU engine only: pass `--leave-running` to `criu dump` so the
|
|
938
|
+
* source workload survives the snapshot. Vmstate checkpoints are
|
|
939
|
+
* always non-destructive and ignore this flag.
|
|
935
940
|
*
|
|
936
|
-
* Default: false (
|
|
941
|
+
* Default under CRIU: false (destructive CRIU snapshot behavior).
|
|
937
942
|
*/
|
|
938
943
|
leaveRunning?: boolean;
|
|
939
944
|
/**
|
|
@@ -962,7 +967,7 @@ interface SnapshotResult {
|
|
|
962
967
|
* bundle. Set by the vmstate engine only; undefined for criu bundles.
|
|
963
968
|
*/
|
|
964
969
|
vmstatePath?: string;
|
|
965
|
-
/** Time from `snapshot()` entry to
|
|
970
|
+
/** Time from `snapshot()` entry to completed bundle, in milliseconds. */
|
|
966
971
|
elapsedMs: number;
|
|
967
972
|
/** Guest console output captured during the dump. */
|
|
968
973
|
consoleLog: string;
|
|
@@ -971,13 +976,65 @@ interface SnapshotResult {
|
|
|
971
976
|
* On-disk shape of the bundle's `meta.json`. Read by `restore()`
|
|
972
977
|
* to reconstruct the source VM's name when registering the fork.
|
|
973
978
|
*/
|
|
979
|
+
type VmstateBackend = "hvf" | "kvm" | "unknown";
|
|
980
|
+
interface SnapshotFileIdentity {
|
|
981
|
+
/** Absolute source path when known on the snapshotting host. */
|
|
982
|
+
path?: string;
|
|
983
|
+
/** Logical file size in bytes. */
|
|
984
|
+
sizeBytes: number;
|
|
985
|
+
/** SHA-256 over the logical file bytes. */
|
|
986
|
+
sha256: string;
|
|
987
|
+
}
|
|
988
|
+
interface VmstateSnapshotMeta {
|
|
989
|
+
/** VMM backend that wrote `state.vmstate`. */
|
|
990
|
+
sourceBackend?: VmstateBackend;
|
|
991
|
+
/** Guest CPU architecture captured in `state.vmstate`; restore must match. */
|
|
992
|
+
guestArch?: "arm64" | "amd64" | "unknown";
|
|
993
|
+
/** Topology hash from the .vmstate header (guest IPA/GIC/RAM layout). */
|
|
994
|
+
topologyHash?: string;
|
|
995
|
+
/** Guest RAM ceiling/layout the source VM booted with; not current host memory use. */
|
|
996
|
+
memoryCeilingMib?: number;
|
|
997
|
+
/** Pointer-auth state inferred from SCTLR_EL1 at snapshot time. */
|
|
998
|
+
guestPauth?: {
|
|
999
|
+
active?: boolean;
|
|
1000
|
+
sctlrEl1?: string;
|
|
1001
|
+
};
|
|
1002
|
+
/** Exact root block image needed by the resumed guest, a parent-relative delta, or explicit absence. */
|
|
1003
|
+
rootDisk?: ({
|
|
1004
|
+
mode: "block";
|
|
1005
|
+
file: string;
|
|
1006
|
+
} & SnapshotFileIdentity) | {
|
|
1007
|
+
mode: "delta";
|
|
1008
|
+
} | {
|
|
1009
|
+
mode: "none";
|
|
1010
|
+
};
|
|
1011
|
+
/** Kernel image identity when the source boot used an explicit kernel. */
|
|
1012
|
+
kernel?: SnapshotFileIdentity;
|
|
1013
|
+
/** DTB identity when the source boot used an explicit DTB. */
|
|
1014
|
+
dtb?: SnapshotFileIdentity;
|
|
1015
|
+
/** Incremental checkpoint chain metadata for vmstate snapshots. */
|
|
1016
|
+
checkpoint?: {
|
|
1017
|
+
/** New random chain id for this VM's lifetime. */
|
|
1018
|
+
chainId: string;
|
|
1019
|
+
/** Per-chain checkpoint number, starting at 1. */
|
|
1020
|
+
sequence: number;
|
|
1021
|
+
/** Relative path from this bundle to its parent bundle, absent for a base checkpoint. */
|
|
1022
|
+
parent?: string;
|
|
1023
|
+
/** RAM section shape carried by this bundle. */
|
|
1024
|
+
ram: "full" | "delta";
|
|
1025
|
+
/** Rootdisk section shape carried by this bundle. */
|
|
1026
|
+
rootDisk: "full" | "delta" | "none";
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
974
1029
|
interface SnapshotMeta {
|
|
975
1030
|
/**
|
|
976
1031
|
* Which backend wrote this bundle — `"criu"` (process-tree images
|
|
977
|
-
* under `img/`)
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
1032
|
+
* under `img/`), `"vmstate"` (whole-VM `state.vmstate`), or the
|
|
1033
|
+
* experimental `"portable"` semantic format. `restore()` auto-detects
|
|
1034
|
+
* CRIU/vmstate from the bundle's contents; portable remains explicit
|
|
1035
|
+
* opt-in so semantic process restore is not confused with exact VM
|
|
1036
|
+
* restore. Absent on bundles predating the vmstate engine (treated as
|
|
1037
|
+
* `"criu"`).
|
|
981
1038
|
*/
|
|
982
1039
|
engine?: SnapshotEngine;
|
|
983
1040
|
/** Name passed to `boot({ name })` when the source VM was started. */
|
|
@@ -993,6 +1050,8 @@ interface SnapshotMeta {
|
|
|
993
1050
|
sourceImage?: string;
|
|
994
1051
|
/** ms epoch when `vm.snapshot()` returned. */
|
|
995
1052
|
snappedAt: number;
|
|
1053
|
+
/** Whole-VM `.vmstate` restore invariants. Present on new vmstate bundles. */
|
|
1054
|
+
vmstate?: VmstateSnapshotMeta;
|
|
996
1055
|
/**
|
|
997
1056
|
* #272: when the source VM was booted with `mount: { host, guest }`,
|
|
998
1057
|
* the snapshot bundle includes both halves of the overlay so a
|
|
@@ -1092,17 +1151,16 @@ interface ForkOptions extends Omit<RestoreOptions, "snapDir"> {
|
|
|
1092
1151
|
*/
|
|
1093
1152
|
onLog?: OnLog;
|
|
1094
1153
|
/**
|
|
1095
|
-
* Opt into lazy-pages restore for the fork —
|
|
1096
|
-
*
|
|
1097
|
-
*
|
|
1098
|
-
* an eager load.
|
|
1154
|
+
* Opt into CRIU lazy-pages restore for the fork — the CRIU image directory
|
|
1155
|
+
* is mounted into the guest read-only via in-VMM virtio-fs and `criu restore
|
|
1156
|
+
* --lazy-pages` faults pages on demand. Default false: the runtime packs the
|
|
1157
|
+
* CRIU image into a tar on `/dev/vdb` and the guest does an eager load.
|
|
1099
1158
|
*
|
|
1100
|
-
* Lazy keeps fork RSS proportional to the pages the sibling
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
1105
|
-
* phase 3); the runtime falls back to eager in that case.
|
|
1159
|
+
* Lazy keeps fork RSS proportional to the pages the sibling actually
|
|
1160
|
+
* touches, not the full snapshot size. Worth setting when the source dumped
|
|
1161
|
+
* a large heap that the fork will only sample. The CLI currently forces
|
|
1162
|
+
* eager restore for `fork --detach --lazy`; use the runtime API directly if
|
|
1163
|
+
* you need to experiment with that combination.
|
|
1106
1164
|
*/
|
|
1107
1165
|
lazy?: boolean;
|
|
1108
1166
|
/**
|
|
@@ -1230,6 +1288,14 @@ declare class Supervisor {
|
|
|
1230
1288
|
private installWinchHandler;
|
|
1231
1289
|
private removeWinchHandler;
|
|
1232
1290
|
private ingest;
|
|
1291
|
+
private ingestAttached;
|
|
1292
|
+
private findDetachSequence;
|
|
1293
|
+
private markCtrlRightBracket;
|
|
1294
|
+
private ingestRemainderAfterDetach;
|
|
1295
|
+
private sendAttachedIfNonEmpty;
|
|
1296
|
+
private sendAttached;
|
|
1297
|
+
private ingestDetached;
|
|
1298
|
+
private handleDetachedLine;
|
|
1233
1299
|
private handleCommand;
|
|
1234
1300
|
private doLs;
|
|
1235
1301
|
private bannerText;
|
|
@@ -1342,12 +1408,13 @@ declare const VsockFiles: {
|
|
|
1342
1408
|
interface ProvisionOptions {
|
|
1343
1409
|
/**
|
|
1344
1410
|
* Path to the base rootfs tarball to start from. Typically the
|
|
1345
|
-
* `
|
|
1346
|
-
* `
|
|
1411
|
+
* arch-specific rootfs tarball produced by `scripts/build-base-assets.sh`
|
|
1412
|
+
* (`rootfs-debian-arm64.tar.gz` or `rootfs-debian-amd64.tar.gz`) or
|
|
1413
|
+
* shipped in a machinen release.
|
|
1347
1414
|
*
|
|
1348
1415
|
* Optional — when omitted, `provision()` resolves it via `resolveBaseRootfs()`
|
|
1349
1416
|
* (MACHINEN_ASSETS_DIR env override, falling back to the `@machinen/cli`
|
|
1350
|
-
* cache
|
|
1417
|
+
* cache for the selected guest arch).
|
|
1351
1418
|
*/
|
|
1352
1419
|
base?: string;
|
|
1353
1420
|
/**
|
|
@@ -1431,11 +1498,11 @@ interface ProvisionResult {
|
|
|
1431
1498
|
*
|
|
1432
1499
|
* 1. `explicit` — the caller-supplied path (resolved against `cwd`).
|
|
1433
1500
|
* 2. `MACHINEN_ASSETS_DIR` env var — points at a directory laid out like
|
|
1434
|
-
* `scripts/build-base-assets.sh`'s output (contains
|
|
1435
|
-
*
|
|
1436
|
-
*
|
|
1501
|
+
* `scripts/build-base-assets.sh`'s output (contains the selected
|
|
1502
|
+
* arch's rootfs tarball). Same convention `@machinen/cli` honors for
|
|
1503
|
+
* local/dev builds.
|
|
1437
1504
|
* 3. `@machinen/cli`'s on-disk cache at
|
|
1438
|
-
* `~/.machinen/@machinen/runtime@<version>/bases/debian
|
|
1505
|
+
* `~/.machinen/@machinen/runtime@<version>/bases/debian-<arch>/rootfs.tar.gz`.
|
|
1439
1506
|
* Populated by running `machinen` once against the installed runtime.
|
|
1440
1507
|
*
|
|
1441
1508
|
* Throws `ProvisionError` with guidance if none of those turn up a file.
|
|
@@ -1445,8 +1512,8 @@ interface ProvisionResult {
|
|
|
1445
1512
|
*/
|
|
1446
1513
|
declare function resolveBaseRootfs(explicit?: string, cwd?: string): string;
|
|
1447
1514
|
/**
|
|
1448
|
-
* Resolve the path to the guest kernel
|
|
1449
|
-
* `resolveBaseRootfs`: explicit → `MACHINEN_ASSETS_DIR
|
|
1515
|
+
* Resolve the path to the guest kernel image. Same fallback chain as
|
|
1516
|
+
* `resolveBaseRootfs`: explicit → `MACHINEN_ASSETS_DIR/<arch kernel>` →
|
|
1450
1517
|
* `@machinen/cli` cache at `<base>/Image`. Exported for callers that
|
|
1451
1518
|
* want to pre-check or wire the path into `boot()`.
|
|
1452
1519
|
*
|
|
@@ -1455,14 +1522,15 @@ declare function resolveBaseRootfs(explicit?: string, cwd?: string): string;
|
|
|
1455
1522
|
*/
|
|
1456
1523
|
declare function resolveBaseKernel(explicit?: string, cwd?: string): string;
|
|
1457
1524
|
/**
|
|
1458
|
-
* Resolve the path to the guest DTB.
|
|
1525
|
+
* Resolve the path to the guest DTB. amd64 guests do not use a DTB unless
|
|
1526
|
+
* the caller passes one explicitly. arm64 follows the same fallback chain as
|
|
1459
1527
|
* `resolveBaseRootfs`: explicit → `MACHINEN_ASSETS_DIR/virt-arm64.dtb` →
|
|
1460
1528
|
* `@machinen/cli` cache at `<base>/virt.dtb`.
|
|
1461
1529
|
*
|
|
1462
1530
|
* @throws {ProvisionError} PROVISION_DTB_NOT_FOUND |
|
|
1463
1531
|
* PROVISION_ASSETS_DIR_INVALID
|
|
1464
1532
|
*/
|
|
1465
|
-
declare function resolveBaseDtb(explicit?: string, cwd?: string): string;
|
|
1533
|
+
declare function resolveBaseDtb(explicit?: string, cwd?: string): string | undefined;
|
|
1466
1534
|
/**
|
|
1467
1535
|
* Boot the base rootfs, run the user install hook, and freeze the
|
|
1468
1536
|
* resulting filesystem state to a new tarball at `opts.out`.
|
|
@@ -1744,6 +1812,14 @@ interface RegistryEntry {
|
|
|
1744
1812
|
socketPath: string;
|
|
1745
1813
|
/** Path to the image the VM was booted from (diagnostic only). */
|
|
1746
1814
|
imagePath?: string;
|
|
1815
|
+
/**
|
|
1816
|
+
* Host-side path of the root block device currently attached as
|
|
1817
|
+
* `/dev/vda`. Vmstate snapshots need the exact bytes because the
|
|
1818
|
+
* whole-VM state captures RAM/device/vCPU state, not disk blocks.
|
|
1819
|
+
*/
|
|
1820
|
+
rootDiskPath?: string;
|
|
1821
|
+
/** Whether the VM intentionally booted without a root block device. */
|
|
1822
|
+
rootDiskMode?: "block" | "none";
|
|
1747
1823
|
/**
|
|
1748
1824
|
* Host-side path of the scratch disk attached to the guest. Used by
|
|
1749
1825
|
* `attach().snapshot()` so an attach-owned handle can find the
|
|
@@ -1758,6 +1834,18 @@ interface RegistryEntry {
|
|
|
1758
1834
|
* booted without the vmstate engine.
|
|
1759
1835
|
*/
|
|
1760
1836
|
vmstatePath?: string;
|
|
1837
|
+
/** Per-VM incremental checkpoint chain id. New on every fresh boot/restore. */
|
|
1838
|
+
vmstateChainId?: string;
|
|
1839
|
+
/** Absolute bundle path the next vmstate checkpoint should parent to. */
|
|
1840
|
+
vmstateCheckpointParent?: string;
|
|
1841
|
+
/** Per-chain checkpoint sequence already written by this VM. */
|
|
1842
|
+
vmstateCheckpointSequence?: number;
|
|
1843
|
+
/**
|
|
1844
|
+
* Whether the VM was booted with nested virtualization enabled
|
|
1845
|
+
* (`boot({ nested: true })`). Provider-level snapshots are refused
|
|
1846
|
+
* while EL2 vmstate capture/restore is still being audited.
|
|
1847
|
+
*/
|
|
1848
|
+
nested?: boolean;
|
|
1761
1849
|
/**
|
|
1762
1850
|
* Absolute path to the snapshot directory this VM was forked from
|
|
1763
1851
|
* (set by `restore({ snapDir })`). Visible in `ls`; informational.
|
|
@@ -1890,7 +1978,10 @@ interface PackBundleOptions {
|
|
|
1890
1978
|
bundle: string;
|
|
1891
1979
|
/** Path to the initramfs cpio to write. */
|
|
1892
1980
|
out: string;
|
|
1893
|
-
/**
|
|
1981
|
+
/**
|
|
1982
|
+
* Optional arch-specific base rootfs tarball
|
|
1983
|
+
* (`rootfs-debian-arm64.tar.gz` or `rootfs-debian-amd64.tar.gz`).
|
|
1984
|
+
*/
|
|
1894
1985
|
base?: string;
|
|
1895
1986
|
/**
|
|
1896
1987
|
* A single host directory copied into the guest between the base
|
|
@@ -2013,6 +2104,10 @@ declare const ErrorCode: {
|
|
|
2013
2104
|
readonly BOOT_TIMEOUT: "BOOT_TIMEOUT";
|
|
2014
2105
|
readonly BOOT_DETACHED_READINESS_FAILED: "BOOT_DETACHED_READINESS_FAILED";
|
|
2015
2106
|
readonly BOOT_MEMORY_INVALID: "BOOT_MEMORY_INVALID";
|
|
2107
|
+
readonly BOOT_NESTED_VIRT_UNSUPPORTED: "BOOT_NESTED_VIRT_UNSUPPORTED";
|
|
2108
|
+
readonly BOOT_VMSTATE_UNSUPPORTED: "BOOT_VMSTATE_UNSUPPORTED";
|
|
2109
|
+
readonly BOOT_VMSTATE_RESEED_FAILED: "BOOT_VMSTATE_RESEED_FAILED";
|
|
2110
|
+
readonly BOOT_PORTABLE_UNSUPPORTED: "BOOT_PORTABLE_UNSUPPORTED";
|
|
2016
2111
|
readonly FORK_MEMORY_BACKPRESSURE: "FORK_MEMORY_BACKPRESSURE";
|
|
2017
2112
|
readonly BOOT_MOUNTDISK_TOOL_MISSING: "BOOT_MOUNTDISK_TOOL_MISSING";
|
|
2018
2113
|
readonly EXEC_VSOCK_UNAVAILABLE: "EXEC_VSOCK_UNAVAILABLE";
|
|
@@ -2023,6 +2118,7 @@ declare const ErrorCode: {
|
|
|
2023
2118
|
readonly SNAPSHOT_NO_DISK: "SNAPSHOT_NO_DISK";
|
|
2024
2119
|
readonly SNAPSHOT_DUMP_FAILED: "SNAPSHOT_DUMP_FAILED";
|
|
2025
2120
|
readonly SNAPSHOT_TIMEOUT: "SNAPSHOT_TIMEOUT";
|
|
2121
|
+
readonly SNAPSHOT_PORTABLE_UNSUPPORTED: "SNAPSHOT_PORTABLE_UNSUPPORTED";
|
|
2026
2122
|
readonly PROVISION_BASE_NOT_FOUND: "PROVISION_BASE_NOT_FOUND";
|
|
2027
2123
|
readonly PROVISION_KERNEL_NOT_FOUND: "PROVISION_KERNEL_NOT_FOUND";
|
|
2028
2124
|
readonly PROVISION_DTB_NOT_FOUND: "PROVISION_DTB_NOT_FOUND";
|
|
@@ -2120,6 +2216,1591 @@ declare function isMachinenError(err: unknown, code?: ErrorCode): err is Machine
|
|
|
2120
2216
|
*/
|
|
2121
2217
|
declare function formatMachinenError(err: MachinenError): string;
|
|
2122
2218
|
|
|
2219
|
+
/**
|
|
2220
|
+
* Transparent native cross-ISA process image contract.
|
|
2221
|
+
*
|
|
2222
|
+
* This format describes an externally captured Linux process that will be
|
|
2223
|
+
* translated into a target-native process. It intentionally separates raw
|
|
2224
|
+
* source-ISA capture data from target-ISA materialization plans so a restore
|
|
2225
|
+
* implementation cannot accidentally treat source registers, stacks, or mapping
|
|
2226
|
+
* addresses as directly reusable target state.
|
|
2227
|
+
*/
|
|
2228
|
+
declare const NATIVE_PROCESS_IMAGE_FORMAT_VERSION = 1;
|
|
2229
|
+
declare const NATIVE_PROCESS_IMAGE_FILES: {
|
|
2230
|
+
readonly manifest: "native-process.json";
|
|
2231
|
+
readonly mappings: "native-mappings.json";
|
|
2232
|
+
readonly threads: "native-threads.json";
|
|
2233
|
+
readonly resources: "native-resources.json";
|
|
2234
|
+
readonly translation: "native-translation.json";
|
|
2235
|
+
readonly memory: "native-memory.bin";
|
|
2236
|
+
};
|
|
2237
|
+
declare const nativeProcessImageArchitectures: readonly ["arm64", "amd64"];
|
|
2238
|
+
type NativeProcessImageArchitecture = (typeof nativeProcessImageArchitectures)[number];
|
|
2239
|
+
declare const nativeProcessImageRefusalCodes: readonly ["active-syscall", "architecture-pair-unsupported", "architecture-unsupported", "blocking-syscall-state-unsupported", "code-location-unknown", "fd-kind-unsupported", "futex-state-unsupported", "inherited-stdio-policy-required", "kernel-state-unsupported", "mapping-ambiguous", "mapping-permission-unsupported", "mapping-unreadable", "pointer-ambiguous", "resource-kind-unsupported", "non-stdio-kernel-state-unsupported", "rseq-state-unsupported", "signal-frame-active", "signal-state-unsupported", "stdin-buffer-state-unsupported", "syscall-argument-state-unsupported", "syscall-restart-unsupported", "target-build-id-mismatch", "target-build-mismatch", "target-code-location-unresolved", "target-callee-saved-state-unsupported", "target-caller-frame-unavailable", "target-code-rva-unmapped", "target-frame-layout-unsupported", "target-frame-register-value-unavailable", "target-module-bytes-missing", "target-module-file-missing", "target-module-missing", "target-module-not-executable", "target-module-range-unreadable", "target-ppoll-syscall-continuation-missing", "target-ppoll-timeout-missing", "target-return-slot-unsupported", "target-resume-execution-unavailable", "target-resume-fault-invalid-code-landing", "target-resume-fault-outside-target-bytes", "target-resume-fault-privileged-instruction", "target-resume-fault-signal-unsupported", "target-resume-fault-timeout", "target-resume-fault-unmodeled-memory", "target-semantic-continuation-missing", "target-sleep-remaining-time-missing", "target-sleep-signal-restart-unsupported", "target-sleep-syscall-continuation-missing", "target-synthetic-signal-restart-unsupported", "target-synthetic-syscall-return-unmodeled", "thread-state-unsupported", "tls-state-unsupported", "return-slot-unreadable", "target-unwind-mismatch", "unwind-fde-missing", "unwind-metadata-missing", "unwind-rule-unsupported", "vdso-policy-unsupported"];
|
|
2240
|
+
type NativeProcessImageRefusalCode = (typeof nativeProcessImageRefusalCodes)[number];
|
|
2241
|
+
interface NativeProcessImageRefusal {
|
|
2242
|
+
code: NativeProcessImageRefusalCode;
|
|
2243
|
+
message: string;
|
|
2244
|
+
detail?: Record<string, unknown>;
|
|
2245
|
+
}
|
|
2246
|
+
interface NativeProcessImageRefusals {
|
|
2247
|
+
vocabularyVersion: 1;
|
|
2248
|
+
refusals: NativeProcessImageRefusal[];
|
|
2249
|
+
}
|
|
2250
|
+
interface NativeProcessImageManifest {
|
|
2251
|
+
formatVersion: 1;
|
|
2252
|
+
kind: "machinen.native-process-image";
|
|
2253
|
+
capture: {
|
|
2254
|
+
method: "external-ptrace-procfs";
|
|
2255
|
+
sourceArch: NativeProcessImageArchitecture;
|
|
2256
|
+
pid?: number;
|
|
2257
|
+
capturedAt?: string;
|
|
2258
|
+
};
|
|
2259
|
+
target: {
|
|
2260
|
+
mode: "native-cross-isa";
|
|
2261
|
+
arch: NativeProcessImageArchitecture;
|
|
2262
|
+
abi: "linux-user";
|
|
2263
|
+
};
|
|
2264
|
+
process: {
|
|
2265
|
+
exe: string;
|
|
2266
|
+
argv: string[];
|
|
2267
|
+
env: Record<string, string>;
|
|
2268
|
+
cwd: string;
|
|
2269
|
+
};
|
|
2270
|
+
refusals: NativeProcessImageRefusals;
|
|
2271
|
+
}
|
|
2272
|
+
type NativeMemoryMappingKind = "text" | "data" | "heap" | "stack" | "tls" | "vdso" | "vvar" | "file" | "anonymous" | "shared" | "special";
|
|
2273
|
+
interface NativeMemoryMapping {
|
|
2274
|
+
id: string;
|
|
2275
|
+
kind: NativeMemoryMappingKind;
|
|
2276
|
+
sourceStart: string;
|
|
2277
|
+
sourceEnd: string;
|
|
2278
|
+
sizeBytes: number;
|
|
2279
|
+
permissions: {
|
|
2280
|
+
read: boolean;
|
|
2281
|
+
write: boolean;
|
|
2282
|
+
execute: boolean;
|
|
2283
|
+
private: boolean;
|
|
2284
|
+
shared: boolean;
|
|
2285
|
+
};
|
|
2286
|
+
file?: {
|
|
2287
|
+
path: string;
|
|
2288
|
+
offset: number;
|
|
2289
|
+
buildId?: string;
|
|
2290
|
+
sha256?: string;
|
|
2291
|
+
};
|
|
2292
|
+
captured?: {
|
|
2293
|
+
file: typeof NATIVE_PROCESS_IMAGE_FILES.memory;
|
|
2294
|
+
offset: number;
|
|
2295
|
+
sizeBytes: number;
|
|
2296
|
+
};
|
|
2297
|
+
target: {
|
|
2298
|
+
materialization: "translate" | "recreate" | "omit" | "refuse";
|
|
2299
|
+
targetStart?: string;
|
|
2300
|
+
reason?: string;
|
|
2301
|
+
};
|
|
2302
|
+
refusal?: NativeProcessImageRefusal;
|
|
2303
|
+
}
|
|
2304
|
+
interface NativeProcessImageMappings {
|
|
2305
|
+
formatVersion: 1;
|
|
2306
|
+
mappings: NativeMemoryMapping[];
|
|
2307
|
+
refusals: NativeProcessImageRefusals;
|
|
2308
|
+
}
|
|
2309
|
+
interface NativeArm64Registers {
|
|
2310
|
+
arch: "arm64";
|
|
2311
|
+
pc: string;
|
|
2312
|
+
sp: string;
|
|
2313
|
+
pstate: string;
|
|
2314
|
+
x: string[];
|
|
2315
|
+
}
|
|
2316
|
+
interface NativeAmd64Registers {
|
|
2317
|
+
arch: "amd64";
|
|
2318
|
+
rip: string;
|
|
2319
|
+
rsp: string;
|
|
2320
|
+
rflags: string;
|
|
2321
|
+
rax: string;
|
|
2322
|
+
rbx: string;
|
|
2323
|
+
rcx: string;
|
|
2324
|
+
rdx: string;
|
|
2325
|
+
rsi: string;
|
|
2326
|
+
rdi: string;
|
|
2327
|
+
rbp: string;
|
|
2328
|
+
r8: string;
|
|
2329
|
+
r9: string;
|
|
2330
|
+
r10: string;
|
|
2331
|
+
r11: string;
|
|
2332
|
+
r12: string;
|
|
2333
|
+
r13: string;
|
|
2334
|
+
r14: string;
|
|
2335
|
+
r15: string;
|
|
2336
|
+
fsBase: string;
|
|
2337
|
+
gsBase: string;
|
|
2338
|
+
}
|
|
2339
|
+
type NativeRegisterState = NativeArm64Registers | NativeAmd64Registers;
|
|
2340
|
+
interface NativeThreadState {
|
|
2341
|
+
id: string;
|
|
2342
|
+
lwpid?: number;
|
|
2343
|
+
state: "stopped";
|
|
2344
|
+
stopReason: "ptrace-stop" | "signal-delivery-stop" | "group-stop";
|
|
2345
|
+
stackMapping: string;
|
|
2346
|
+
sourceRegisters: NativeRegisterState;
|
|
2347
|
+
syscall: {
|
|
2348
|
+
state: "outside-syscall" | "inside-syscall" | "restart-block";
|
|
2349
|
+
number?: number;
|
|
2350
|
+
name?: string;
|
|
2351
|
+
arguments?: string[];
|
|
2352
|
+
stackPointer?: string;
|
|
2353
|
+
instructionPointer?: string;
|
|
2354
|
+
};
|
|
2355
|
+
signal: {
|
|
2356
|
+
blocked: string[];
|
|
2357
|
+
pending: string[];
|
|
2358
|
+
activeFrame: boolean;
|
|
2359
|
+
altStack: {
|
|
2360
|
+
state: "disabled" | "enabled" | "unsupported";
|
|
2361
|
+
sp?: string;
|
|
2362
|
+
sizeBytes?: number;
|
|
2363
|
+
refusal?: NativeProcessImageRefusal;
|
|
2364
|
+
};
|
|
2365
|
+
};
|
|
2366
|
+
tls: {
|
|
2367
|
+
threadPointer: string;
|
|
2368
|
+
rseq: {
|
|
2369
|
+
state: "absent" | "captured" | "unsupported";
|
|
2370
|
+
refusal?: NativeProcessImageRefusal;
|
|
2371
|
+
};
|
|
2372
|
+
};
|
|
2373
|
+
refusal?: NativeProcessImageRefusal;
|
|
2374
|
+
}
|
|
2375
|
+
interface NativeProcessImageThreads {
|
|
2376
|
+
formatVersion: 1;
|
|
2377
|
+
threads: NativeThreadState[];
|
|
2378
|
+
refusals: NativeProcessImageRefusals;
|
|
2379
|
+
}
|
|
2380
|
+
type NativeProcessResourceKind = "argv" | "env" | "cwd" | "exe" | "auxv" | "fd" | "file" | "pipe" | "socket" | "raw-socket" | "pty" | "timer" | "eventfd" | "signal" | "namespace" | "credential" | "futex" | "epoll" | "unknown";
|
|
2381
|
+
interface NativeProcessResource {
|
|
2382
|
+
id: string;
|
|
2383
|
+
kind: NativeProcessResourceKind;
|
|
2384
|
+
state: "captured" | "recipe" | "refused" | "unsupported";
|
|
2385
|
+
fd?: number;
|
|
2386
|
+
path?: string;
|
|
2387
|
+
flags?: string[];
|
|
2388
|
+
offset?: number;
|
|
2389
|
+
recipe?: Record<string, unknown>;
|
|
2390
|
+
refusal?: NativeProcessImageRefusal;
|
|
2391
|
+
}
|
|
2392
|
+
interface NativeProcessImageResources {
|
|
2393
|
+
formatVersion: 1;
|
|
2394
|
+
resources: NativeProcessResource[];
|
|
2395
|
+
refusals: NativeProcessImageRefusals;
|
|
2396
|
+
}
|
|
2397
|
+
interface NativeCodeLocationMapping {
|
|
2398
|
+
id: string;
|
|
2399
|
+
sourceMapping: string;
|
|
2400
|
+
sourceAddress: string;
|
|
2401
|
+
targetAddress?: string;
|
|
2402
|
+
state: "mapped" | "pending" | "refused";
|
|
2403
|
+
refusal?: NativeProcessImageRefusal;
|
|
2404
|
+
}
|
|
2405
|
+
interface NativeThreadTranslation {
|
|
2406
|
+
sourceThreadId: string;
|
|
2407
|
+
state: "pending" | "translated" | "refused";
|
|
2408
|
+
targetRegisters?: NativeRegisterState;
|
|
2409
|
+
refusal?: NativeProcessImageRefusal;
|
|
2410
|
+
}
|
|
2411
|
+
interface NativeMemoryRelocation {
|
|
2412
|
+
mapping: string;
|
|
2413
|
+
offset: number;
|
|
2414
|
+
kind: "pointer" | "code-pointer" | "return-address" | "thread-pointer";
|
|
2415
|
+
sourceValue: string;
|
|
2416
|
+
targetValue?: string;
|
|
2417
|
+
state: "translated" | "ambiguous" | "refused";
|
|
2418
|
+
refusal?: NativeProcessImageRefusal;
|
|
2419
|
+
}
|
|
2420
|
+
interface NativeProcessImageTranslation {
|
|
2421
|
+
formatVersion: 1;
|
|
2422
|
+
mode: "native-cross-isa";
|
|
2423
|
+
sourceArch: NativeProcessImageArchitecture;
|
|
2424
|
+
targetArch: NativeProcessImageArchitecture;
|
|
2425
|
+
codeLocations: NativeCodeLocationMapping[];
|
|
2426
|
+
threads: NativeThreadTranslation[];
|
|
2427
|
+
memoryRelocations: NativeMemoryRelocation[];
|
|
2428
|
+
refusals: NativeProcessImageRefusals;
|
|
2429
|
+
}
|
|
2430
|
+
interface NativeProcessImageDocuments {
|
|
2431
|
+
rootDir?: string;
|
|
2432
|
+
manifest: NativeProcessImageManifest;
|
|
2433
|
+
mappings: NativeProcessImageMappings;
|
|
2434
|
+
threads: NativeProcessImageThreads;
|
|
2435
|
+
resources: NativeProcessImageResources;
|
|
2436
|
+
translation: NativeProcessImageTranslation;
|
|
2437
|
+
}
|
|
2438
|
+
interface NativeProcessImageDocumentInput {
|
|
2439
|
+
rootDir?: string;
|
|
2440
|
+
manifest: unknown;
|
|
2441
|
+
mappings: unknown;
|
|
2442
|
+
threads: unknown;
|
|
2443
|
+
resources: unknown;
|
|
2444
|
+
translation: unknown;
|
|
2445
|
+
}
|
|
2446
|
+
type NativeProcessImageJsonSchema = Record<string, unknown>;
|
|
2447
|
+
declare const nativeProcessImageSchemas: {
|
|
2448
|
+
readonly manifest: {
|
|
2449
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
2450
|
+
readonly $id: "https://machinen.dev/schemas/native-process-image/manifest.schema.json";
|
|
2451
|
+
readonly title: "Machinen native process image manifest";
|
|
2452
|
+
readonly type: "object";
|
|
2453
|
+
readonly additionalProperties: false;
|
|
2454
|
+
readonly required: readonly ["formatVersion", "kind", "capture", "target", "process", "refusals"];
|
|
2455
|
+
readonly properties: {
|
|
2456
|
+
readonly formatVersion: {
|
|
2457
|
+
readonly const: 1;
|
|
2458
|
+
};
|
|
2459
|
+
readonly kind: {
|
|
2460
|
+
readonly const: "machinen.native-process-image";
|
|
2461
|
+
};
|
|
2462
|
+
readonly capture: {
|
|
2463
|
+
readonly type: "object";
|
|
2464
|
+
readonly additionalProperties: false;
|
|
2465
|
+
readonly required: readonly ["method", "sourceArch"];
|
|
2466
|
+
readonly properties: {
|
|
2467
|
+
readonly method: {
|
|
2468
|
+
readonly const: "external-ptrace-procfs";
|
|
2469
|
+
};
|
|
2470
|
+
readonly sourceArch: {
|
|
2471
|
+
readonly enum: readonly ["arm64", "amd64"];
|
|
2472
|
+
};
|
|
2473
|
+
readonly pid: {
|
|
2474
|
+
readonly type: "integer";
|
|
2475
|
+
readonly minimum: 1;
|
|
2476
|
+
};
|
|
2477
|
+
readonly capturedAt: {
|
|
2478
|
+
readonly type: "string";
|
|
2479
|
+
};
|
|
2480
|
+
};
|
|
2481
|
+
};
|
|
2482
|
+
readonly target: {
|
|
2483
|
+
readonly type: "object";
|
|
2484
|
+
readonly additionalProperties: false;
|
|
2485
|
+
readonly required: readonly ["mode", "arch", "abi"];
|
|
2486
|
+
readonly properties: {
|
|
2487
|
+
readonly mode: {
|
|
2488
|
+
readonly const: "native-cross-isa";
|
|
2489
|
+
};
|
|
2490
|
+
readonly arch: {
|
|
2491
|
+
readonly enum: readonly ["arm64", "amd64"];
|
|
2492
|
+
};
|
|
2493
|
+
readonly abi: {
|
|
2494
|
+
readonly const: "linux-user";
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2497
|
+
};
|
|
2498
|
+
readonly process: {
|
|
2499
|
+
readonly type: "object";
|
|
2500
|
+
readonly additionalProperties: false;
|
|
2501
|
+
readonly required: readonly ["exe", "argv", "env", "cwd"];
|
|
2502
|
+
readonly properties: {
|
|
2503
|
+
readonly exe: {
|
|
2504
|
+
readonly type: "string";
|
|
2505
|
+
readonly minLength: 1;
|
|
2506
|
+
};
|
|
2507
|
+
readonly argv: {
|
|
2508
|
+
readonly type: "array";
|
|
2509
|
+
readonly items: {
|
|
2510
|
+
readonly type: "string";
|
|
2511
|
+
};
|
|
2512
|
+
readonly minItems: 1;
|
|
2513
|
+
};
|
|
2514
|
+
readonly env: {
|
|
2515
|
+
readonly type: "object";
|
|
2516
|
+
readonly additionalProperties: {
|
|
2517
|
+
readonly type: "string";
|
|
2518
|
+
};
|
|
2519
|
+
};
|
|
2520
|
+
readonly cwd: {
|
|
2521
|
+
readonly type: "string";
|
|
2522
|
+
readonly minLength: 1;
|
|
2523
|
+
};
|
|
2524
|
+
};
|
|
2525
|
+
};
|
|
2526
|
+
readonly refusals: NativeProcessImageJsonSchema;
|
|
2527
|
+
};
|
|
2528
|
+
};
|
|
2529
|
+
readonly mappings: {
|
|
2530
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
2531
|
+
readonly $id: "https://machinen.dev/schemas/native-process-image/mappings.schema.json";
|
|
2532
|
+
readonly title: "Machinen native process image mappings";
|
|
2533
|
+
readonly type: "object";
|
|
2534
|
+
readonly additionalProperties: false;
|
|
2535
|
+
readonly required: readonly ["formatVersion", "mappings", "refusals"];
|
|
2536
|
+
readonly properties: {
|
|
2537
|
+
readonly formatVersion: {
|
|
2538
|
+
readonly const: 1;
|
|
2539
|
+
};
|
|
2540
|
+
readonly mappings: {
|
|
2541
|
+
readonly type: "array";
|
|
2542
|
+
};
|
|
2543
|
+
readonly refusals: NativeProcessImageJsonSchema;
|
|
2544
|
+
};
|
|
2545
|
+
};
|
|
2546
|
+
readonly threads: {
|
|
2547
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
2548
|
+
readonly $id: "https://machinen.dev/schemas/native-process-image/threads.schema.json";
|
|
2549
|
+
readonly title: "Machinen native process image threads";
|
|
2550
|
+
readonly type: "object";
|
|
2551
|
+
readonly additionalProperties: false;
|
|
2552
|
+
readonly required: readonly ["formatVersion", "threads", "refusals"];
|
|
2553
|
+
readonly properties: {
|
|
2554
|
+
readonly formatVersion: {
|
|
2555
|
+
readonly const: 1;
|
|
2556
|
+
};
|
|
2557
|
+
readonly threads: {
|
|
2558
|
+
readonly type: "array";
|
|
2559
|
+
readonly minItems: 1;
|
|
2560
|
+
};
|
|
2561
|
+
readonly refusals: NativeProcessImageJsonSchema;
|
|
2562
|
+
};
|
|
2563
|
+
};
|
|
2564
|
+
readonly resources: {
|
|
2565
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
2566
|
+
readonly $id: "https://machinen.dev/schemas/native-process-image/resources.schema.json";
|
|
2567
|
+
readonly title: "Machinen native process image resources";
|
|
2568
|
+
readonly type: "object";
|
|
2569
|
+
readonly additionalProperties: false;
|
|
2570
|
+
readonly required: readonly ["formatVersion", "resources", "refusals"];
|
|
2571
|
+
readonly properties: {
|
|
2572
|
+
readonly formatVersion: {
|
|
2573
|
+
readonly const: 1;
|
|
2574
|
+
};
|
|
2575
|
+
readonly resources: {
|
|
2576
|
+
readonly type: "array";
|
|
2577
|
+
};
|
|
2578
|
+
readonly refusals: NativeProcessImageJsonSchema;
|
|
2579
|
+
};
|
|
2580
|
+
};
|
|
2581
|
+
readonly translation: {
|
|
2582
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
2583
|
+
readonly $id: "https://machinen.dev/schemas/native-process-image/translation.schema.json";
|
|
2584
|
+
readonly title: "Machinen native process image translation plan";
|
|
2585
|
+
readonly type: "object";
|
|
2586
|
+
readonly additionalProperties: false;
|
|
2587
|
+
readonly required: readonly ["formatVersion", "mode", "sourceArch", "targetArch", "codeLocations", "threads", "memoryRelocations", "refusals"];
|
|
2588
|
+
readonly properties: {
|
|
2589
|
+
readonly formatVersion: {
|
|
2590
|
+
readonly const: 1;
|
|
2591
|
+
};
|
|
2592
|
+
readonly mode: {
|
|
2593
|
+
readonly const: "native-cross-isa";
|
|
2594
|
+
};
|
|
2595
|
+
readonly sourceArch: {
|
|
2596
|
+
readonly enum: readonly ["arm64", "amd64"];
|
|
2597
|
+
};
|
|
2598
|
+
readonly targetArch: {
|
|
2599
|
+
readonly enum: readonly ["arm64", "amd64"];
|
|
2600
|
+
};
|
|
2601
|
+
readonly codeLocations: {
|
|
2602
|
+
readonly type: "array";
|
|
2603
|
+
};
|
|
2604
|
+
readonly threads: {
|
|
2605
|
+
readonly type: "array";
|
|
2606
|
+
};
|
|
2607
|
+
readonly memoryRelocations: {
|
|
2608
|
+
readonly type: "array";
|
|
2609
|
+
};
|
|
2610
|
+
readonly refusals: NativeProcessImageJsonSchema;
|
|
2611
|
+
};
|
|
2612
|
+
};
|
|
2613
|
+
};
|
|
2614
|
+
declare class NativeProcessImageValidationError extends Error {
|
|
2615
|
+
readonly errors: string[];
|
|
2616
|
+
constructor(errors: string[]);
|
|
2617
|
+
}
|
|
2618
|
+
declare function isNativeProcessImageBundle(dir: string): boolean;
|
|
2619
|
+
declare function validateNativeProcessImageBundle(dir: string): NativeProcessImageDocuments;
|
|
2620
|
+
declare function validateNativeProcessImageDocuments(docs: NativeProcessImageDocumentInput, opts?: {
|
|
2621
|
+
rootDir?: string;
|
|
2622
|
+
}): string[];
|
|
2623
|
+
declare function assertNativeProcessImageDocuments(docs: NativeProcessImageDocumentInput, opts?: {
|
|
2624
|
+
rootDir?: string;
|
|
2625
|
+
}): asserts docs is NativeProcessImageDocuments;
|
|
2626
|
+
|
|
2627
|
+
/** Source-code to target-code mapping for native cross-ISA restore. */
|
|
2628
|
+
|
|
2629
|
+
interface NativeCodeModule {
|
|
2630
|
+
id: string;
|
|
2631
|
+
logicalName: string;
|
|
2632
|
+
path: string;
|
|
2633
|
+
arch?: NativeProcessImageArchitecture;
|
|
2634
|
+
kind: "executable" | "pie-executable" | "shared-object" | "vdso" | "unknown";
|
|
2635
|
+
buildId: string;
|
|
2636
|
+
loadBias: string;
|
|
2637
|
+
textMapping: string;
|
|
2638
|
+
}
|
|
2639
|
+
interface NativeCodeSymbol {
|
|
2640
|
+
name: string;
|
|
2641
|
+
mapping: string;
|
|
2642
|
+
address: string;
|
|
2643
|
+
sizeBytes?: number;
|
|
2644
|
+
buildId?: string;
|
|
2645
|
+
metadata: "symbol" | "dwarf" | "sidecar";
|
|
2646
|
+
moduleId?: string;
|
|
2647
|
+
relativeAddress?: string;
|
|
2648
|
+
}
|
|
2649
|
+
interface NativeCodeMapRequest {
|
|
2650
|
+
expectedTargetBuildId: string;
|
|
2651
|
+
targetBuildId: string;
|
|
2652
|
+
sourceSymbols: NativeCodeSymbol[];
|
|
2653
|
+
targetSymbols: NativeCodeSymbol[];
|
|
2654
|
+
requestedLocations: Array<{
|
|
2655
|
+
id: string;
|
|
2656
|
+
symbol: string;
|
|
2657
|
+
sourceAddress?: string;
|
|
2658
|
+
}>;
|
|
2659
|
+
sourceModules?: NativeCodeModule[];
|
|
2660
|
+
targetModules?: NativeCodeModule[];
|
|
2661
|
+
}
|
|
2662
|
+
interface NativeCodeMapResult {
|
|
2663
|
+
codeLocations: NativeCodeLocationMapping[];
|
|
2664
|
+
refusals: NativeProcessImageRefusal[];
|
|
2665
|
+
}
|
|
2666
|
+
declare function buildNativeCodeMap(request: NativeCodeMapRequest): NativeCodeMapResult;
|
|
2667
|
+
|
|
2668
|
+
/** Active native syscall classification for actual real-utility attempts. */
|
|
2669
|
+
|
|
2670
|
+
type NativeActiveSyscallClass = "outside-syscall" | "sleep-timer" | "poll-timeout" | "fd-blocking" | "restart" | "unknown-active";
|
|
2671
|
+
type NativeSleepTimerSyscallPolicy = "refuse" | "defer-target-resume";
|
|
2672
|
+
type NativePollTimeoutSyscallPolicy = "refuse" | "defer-target-resume";
|
|
2673
|
+
interface NativeActiveSyscallPolicyOptions {
|
|
2674
|
+
sleepTimerPolicy?: NativeSleepTimerSyscallPolicy;
|
|
2675
|
+
pollTimeoutPolicy?: NativePollTimeoutSyscallPolicy;
|
|
2676
|
+
documents?: NativeProcessImageDocuments;
|
|
2677
|
+
}
|
|
2678
|
+
interface NativeSleepTimerDuration {
|
|
2679
|
+
seconds: string;
|
|
2680
|
+
nanoseconds: number;
|
|
2681
|
+
}
|
|
2682
|
+
interface NativeModeledSleepTimerRemainingTime extends NativeSleepTimerDuration {
|
|
2683
|
+
state: "modeled";
|
|
2684
|
+
kind: "relative-duration";
|
|
2685
|
+
source: "active-syscall-request-timespec";
|
|
2686
|
+
precision: "requested-duration-upper-bound";
|
|
2687
|
+
}
|
|
2688
|
+
interface NativeModeledPpollTimeoutRemainingTime extends NativeSleepTimerDuration {
|
|
2689
|
+
state: "modeled";
|
|
2690
|
+
kind: "relative-duration";
|
|
2691
|
+
source: "active-syscall-ppoll-timeout";
|
|
2692
|
+
precision: "requested-duration-upper-bound";
|
|
2693
|
+
}
|
|
2694
|
+
interface NativeModeledSleepTimerState {
|
|
2695
|
+
kind: "relative-duration";
|
|
2696
|
+
syscallName: string;
|
|
2697
|
+
argumentSource: "proc-syscall" | "registers";
|
|
2698
|
+
clockId?: number;
|
|
2699
|
+
flags?: number;
|
|
2700
|
+
requestPointer: string;
|
|
2701
|
+
remainderPointer?: string;
|
|
2702
|
+
requestedTime: NativeSleepTimerDuration;
|
|
2703
|
+
remainingTime: NativeModeledSleepTimerRemainingTime;
|
|
2704
|
+
}
|
|
2705
|
+
interface NativeModeledPpollTimeoutState {
|
|
2706
|
+
kind: "relative-duration";
|
|
2707
|
+
syscallName: "ppoll";
|
|
2708
|
+
argumentSource: "proc-syscall" | "registers";
|
|
2709
|
+
fdsPointer: "0x0";
|
|
2710
|
+
nfds: 0;
|
|
2711
|
+
timeoutPointer: string;
|
|
2712
|
+
sigmaskPointer: "0x0";
|
|
2713
|
+
sigsetSize?: string;
|
|
2714
|
+
requestedTime: NativeSleepTimerDuration;
|
|
2715
|
+
remainingTime: NativeModeledPpollTimeoutRemainingTime;
|
|
2716
|
+
}
|
|
2717
|
+
type NativeSleepTimerModelResult = {
|
|
2718
|
+
state: "modeled";
|
|
2719
|
+
timer: NativeModeledSleepTimerState;
|
|
2720
|
+
} | {
|
|
2721
|
+
state: "missing";
|
|
2722
|
+
refusal: NativeProcessImageRefusal;
|
|
2723
|
+
};
|
|
2724
|
+
type NativePpollTimeoutModelResult = {
|
|
2725
|
+
state: "modeled";
|
|
2726
|
+
timeout: NativeModeledPpollTimeoutState;
|
|
2727
|
+
} | {
|
|
2728
|
+
state: "missing";
|
|
2729
|
+
refusal: NativeProcessImageRefusal;
|
|
2730
|
+
};
|
|
2731
|
+
interface NativeActiveSleepTimerContinuation {
|
|
2732
|
+
threadId: string;
|
|
2733
|
+
syscallClass: Extract<NativeActiveSyscallClass, "sleep-timer">;
|
|
2734
|
+
action: "defer-target-resume";
|
|
2735
|
+
syscall: NativeThreadState["syscall"];
|
|
2736
|
+
metadata: {
|
|
2737
|
+
remainingTime: NativeModeledSleepTimerRemainingTime;
|
|
2738
|
+
sleepTimer: NativeModeledSleepTimerState;
|
|
2739
|
+
policy: "conservative-target-timer-rearm-required";
|
|
2740
|
+
};
|
|
2741
|
+
}
|
|
2742
|
+
interface NativeActivePpollTimeoutContinuation {
|
|
2743
|
+
threadId: string;
|
|
2744
|
+
syscallClass: Extract<NativeActiveSyscallClass, "poll-timeout">;
|
|
2745
|
+
action: "defer-target-resume";
|
|
2746
|
+
syscall: NativeThreadState["syscall"];
|
|
2747
|
+
metadata: {
|
|
2748
|
+
remainingTime: NativeModeledPpollTimeoutRemainingTime;
|
|
2749
|
+
ppollTimeout: NativeModeledPpollTimeoutState;
|
|
2750
|
+
policy: "conservative-target-ppoll-timeout-rearm-required";
|
|
2751
|
+
};
|
|
2752
|
+
}
|
|
2753
|
+
type NativeActiveSyscallContinuation = NativeActiveSleepTimerContinuation | NativeActivePpollTimeoutContinuation;
|
|
2754
|
+
interface NativeActiveSyscallClassification {
|
|
2755
|
+
threadId: string;
|
|
2756
|
+
state: NativeThreadState["syscall"]["state"];
|
|
2757
|
+
syscallNumber?: number;
|
|
2758
|
+
syscallName?: string;
|
|
2759
|
+
class: NativeActiveSyscallClass;
|
|
2760
|
+
resumable: false;
|
|
2761
|
+
refusal?: NativeProcessImageRefusal;
|
|
2762
|
+
continuation?: NativeActiveSyscallContinuation;
|
|
2763
|
+
}
|
|
2764
|
+
interface NativeActiveSyscallClassificationResult {
|
|
2765
|
+
classifications: NativeActiveSyscallClassification[];
|
|
2766
|
+
refusals: NativeProcessImageRefusal[];
|
|
2767
|
+
continuations: NativeActiveSyscallContinuation[];
|
|
2768
|
+
}
|
|
2769
|
+
declare function classifyNativeActiveSyscalls(threads: NativeThreadState[], options?: NativeActiveSyscallPolicyOptions): NativeActiveSyscallClassificationResult;
|
|
2770
|
+
declare function classifyNativeThreadSyscall(thread: NativeThreadState, options?: NativeActiveSyscallPolicyOptions): NativeActiveSyscallClassification;
|
|
2771
|
+
declare function modelNativePpollTimeoutState(thread: NativeThreadState, documents?: NativeProcessImageDocuments): NativePpollTimeoutModelResult;
|
|
2772
|
+
declare function modelNativeSleepTimerState(thread: NativeThreadState, documents?: NativeProcessImageDocuments): NativeSleepTimerModelResult;
|
|
2773
|
+
|
|
2774
|
+
/** Shared descriptors for generated target-native synthetic continuations. */
|
|
2775
|
+
|
|
2776
|
+
declare const NATIVE_SYNTHETIC_SYSCALL_RESTART_EXIT_STATUS = 111;
|
|
2777
|
+
declare const NATIVE_SYNTHETIC_SYSCALL_UNMODELED_RETURN_EXIT_STATUS = 112;
|
|
2778
|
+
type NativeSyntheticContinuationTargetArch = "amd64";
|
|
2779
|
+
type NativeSyntheticContinuationByteSource = "generated-target-native-amd64-syscall-sequence";
|
|
2780
|
+
type NativeSyntheticContinuationByteEncoding = "amd64-machine-code";
|
|
2781
|
+
type NativeSyntheticContinuationSyscallAbi = "linux-amd64";
|
|
2782
|
+
type NativeSyntheticContinuationRegisterSetupAbi = "linux-amd64-syscall";
|
|
2783
|
+
type NativeSyntheticContinuationFailureKind = "signal-restart-unsupported" | "syscall-return-unmodeled";
|
|
2784
|
+
type NativeSyntheticContinuationFailureExitBucketCondition = "equals-negative-errno" | "restart-like-negative-errno" | "other-negative-errno" | "nonzero-return";
|
|
2785
|
+
type NativeSyntheticContinuationRegister = "rax" | "rdi" | "rsi" | "rdx" | "r10" | "r8" | "r9" | "rcx" | "r11";
|
|
2786
|
+
type NativeSyntheticContinuationProvenanceSource = "generated-target-native-amd64-syscall-sequence" | "linux-amd64-syscall-abi" | "modeled-source-sleep-timer" | "modeled-source-ppoll-timeout" | "target-caller-frame";
|
|
2787
|
+
interface NativeSyntheticSyscallArgumentDescriptor {
|
|
2788
|
+
register: NativeSyntheticContinuationRegister;
|
|
2789
|
+
role: string;
|
|
2790
|
+
value: string;
|
|
2791
|
+
source: NativeSyntheticContinuationProvenanceSource;
|
|
2792
|
+
}
|
|
2793
|
+
interface NativeSyntheticSyscallDescriptor {
|
|
2794
|
+
abi: NativeSyntheticContinuationSyscallAbi;
|
|
2795
|
+
name: string;
|
|
2796
|
+
number: number;
|
|
2797
|
+
arguments: NativeSyntheticSyscallArgumentDescriptor[];
|
|
2798
|
+
}
|
|
2799
|
+
interface NativeSyntheticContinuationRegisterSetupDescriptor {
|
|
2800
|
+
abi: NativeSyntheticContinuationRegisterSetupAbi;
|
|
2801
|
+
arguments: NativeSyntheticSyscallArgumentDescriptor[];
|
|
2802
|
+
clobberedBySyscall: NativeSyntheticContinuationRegister[];
|
|
2803
|
+
notes: string[];
|
|
2804
|
+
}
|
|
2805
|
+
interface NativeSyntheticContinuationStackSetupDescriptor {
|
|
2806
|
+
entryStackPointer: string;
|
|
2807
|
+
stackBytesWrittenByContinuation: number;
|
|
2808
|
+
returnAddress: string;
|
|
2809
|
+
requiresSourceStackBytes: boolean;
|
|
2810
|
+
}
|
|
2811
|
+
interface NativeSyntheticContinuationFailureExitBucket {
|
|
2812
|
+
exitStatus: number;
|
|
2813
|
+
failureKind: NativeSyntheticContinuationFailureKind;
|
|
2814
|
+
failureReason: string;
|
|
2815
|
+
syscallReturn: {
|
|
2816
|
+
register: "rax";
|
|
2817
|
+
condition: NativeSyntheticContinuationFailureExitBucketCondition;
|
|
2818
|
+
errno?: number;
|
|
2819
|
+
errnoName?: string;
|
|
2820
|
+
errnos?: {
|
|
2821
|
+
errno: number;
|
|
2822
|
+
errnoName: string;
|
|
2823
|
+
}[];
|
|
2824
|
+
errnoRange?: {
|
|
2825
|
+
min: number;
|
|
2826
|
+
max: number;
|
|
2827
|
+
};
|
|
2828
|
+
excludedErrnos?: {
|
|
2829
|
+
errno: number;
|
|
2830
|
+
errnoName: string;
|
|
2831
|
+
}[];
|
|
2832
|
+
};
|
|
2833
|
+
}
|
|
2834
|
+
interface NativeSyntheticContinuationCompletionDescriptor {
|
|
2835
|
+
mode: string;
|
|
2836
|
+
successExitStatus?: number;
|
|
2837
|
+
/** Legacy single-bucket failure status. Prefer failureExitBuckets for new continuations. */
|
|
2838
|
+
failureExitStatus?: number;
|
|
2839
|
+
/** Legacy single-bucket failure kind. Prefer failureExitBuckets for new continuations. */
|
|
2840
|
+
failureKind?: NativeSyntheticContinuationFailureKind;
|
|
2841
|
+
/** Legacy single-bucket failure reason. Prefer failureExitBuckets for new continuations. */
|
|
2842
|
+
failureReason?: string;
|
|
2843
|
+
failureExitBuckets?: NativeSyntheticContinuationFailureExitBucket[];
|
|
2844
|
+
}
|
|
2845
|
+
interface NativeSyntheticSyscallContinuationDescriptorRequest {
|
|
2846
|
+
targetArch: NativeSyntheticContinuationTargetArch;
|
|
2847
|
+
entryAddress: string;
|
|
2848
|
+
relativeAddress: string;
|
|
2849
|
+
generatorBuildId: string;
|
|
2850
|
+
bytes: Uint8Array;
|
|
2851
|
+
syscall: Omit<NativeSyntheticSyscallDescriptor, "abi">;
|
|
2852
|
+
registerSetup: NativeSyntheticContinuationRegisterSetupDescriptor;
|
|
2853
|
+
stackSetup: NativeSyntheticContinuationStackSetupDescriptor;
|
|
2854
|
+
completion: NativeSyntheticContinuationCompletionDescriptor;
|
|
2855
|
+
}
|
|
2856
|
+
interface NativeSyntheticSyscallContinuationDescriptor {
|
|
2857
|
+
kind: "synthetic-syscall-continuation";
|
|
2858
|
+
targetArch: NativeSyntheticContinuationTargetArch;
|
|
2859
|
+
entryAddress: string;
|
|
2860
|
+
relativeAddress: string;
|
|
2861
|
+
byteSource: NativeSyntheticContinuationByteSource;
|
|
2862
|
+
generatorBuildId: string;
|
|
2863
|
+
byteEncoding: NativeSyntheticContinuationByteEncoding;
|
|
2864
|
+
sizeBytes: number;
|
|
2865
|
+
bytesHex: string;
|
|
2866
|
+
byteSha256: string;
|
|
2867
|
+
descriptorSha256: string;
|
|
2868
|
+
generatedTargetBytes: true;
|
|
2869
|
+
sourceTextReusedAsTargetCode: false;
|
|
2870
|
+
sourceIsaEmulationUsed: false;
|
|
2871
|
+
sidecarRuntimeUsed: false;
|
|
2872
|
+
syscallAbi: NativeSyntheticContinuationSyscallAbi;
|
|
2873
|
+
syscall: NativeSyntheticSyscallDescriptor;
|
|
2874
|
+
registerSetup: NativeSyntheticContinuationRegisterSetupDescriptor;
|
|
2875
|
+
stackSetup: NativeSyntheticContinuationStackSetupDescriptor;
|
|
2876
|
+
completion: NativeSyntheticContinuationCompletionDescriptor;
|
|
2877
|
+
}
|
|
2878
|
+
type NativeSyntheticSyscallContinuationDescriptorPayload = Omit<NativeSyntheticSyscallContinuationDescriptor, "descriptorSha256">;
|
|
2879
|
+
declare function buildNativeSyntheticSyscallContinuationDescriptor(request: NativeSyntheticSyscallContinuationDescriptorRequest): NativeSyntheticSyscallContinuationDescriptor;
|
|
2880
|
+
declare function nativeSyntheticContinuationBytesHex(bytes: Uint8Array): string;
|
|
2881
|
+
declare function nativeSyntheticContinuationBytesSha256(bytes: Uint8Array): string;
|
|
2882
|
+
declare function nativeSyntheticContinuationDescriptorSha256(descriptor: NativeSyntheticSyscallContinuationDescriptorPayload): string;
|
|
2883
|
+
declare function nativeSyntheticRestartLikeErrnos(): {
|
|
2884
|
+
errno: number;
|
|
2885
|
+
errnoName: string;
|
|
2886
|
+
}[];
|
|
2887
|
+
declare function nativeSyntheticSyscallFailureExitBuckets(syscallName: string): NativeSyntheticContinuationFailureExitBucket[];
|
|
2888
|
+
declare function nativeSyntheticExitProcessSuffix(): number[];
|
|
2889
|
+
|
|
2890
|
+
/** Synthetic target-native ppoll timeout syscall continuation generation. */
|
|
2891
|
+
|
|
2892
|
+
declare const NATIVE_SYNTHETIC_PPOLL_SYSCALL_BUILD_ID = "machinen-synthetic-ppoll-syscall-v1";
|
|
2893
|
+
declare const NATIVE_SYNTHETIC_PPOLL_SYSCALL_LOGICAL_NAME = "machinen-synthetic-ppoll-syscall";
|
|
2894
|
+
declare const NATIVE_SYNTHETIC_PPOLL_SYSCALL_PATH = "machinen.synthetic://ppoll-syscall";
|
|
2895
|
+
declare const NATIVE_SYNTHETIC_PPOLL_SYSCALL_BASE = "0x700300000000";
|
|
2896
|
+
type NativeSyntheticPpollCompletionMode = "return-to-trampoline" | "exit-process";
|
|
2897
|
+
type NativeSyntheticPpollSyscallProvenanceSource = NativeSyntheticContinuationProvenanceSource;
|
|
2898
|
+
interface NativeSyntheticPpollSyscallArgumentProvenance extends NativeSyntheticSyscallArgumentDescriptor {
|
|
2899
|
+
register: "rax" | "rdi" | "rsi" | "rdx" | "r10" | "r8";
|
|
2900
|
+
role: "syscall-number" | "fds-pointer" | "nfds" | "timeout-timespec-pointer" | "sigmask-pointer" | "sigset-size";
|
|
2901
|
+
source: NativeSyntheticPpollSyscallProvenanceSource;
|
|
2902
|
+
}
|
|
2903
|
+
interface NativeSyntheticPpollSyscallRegisterSetupProvenance extends NativeSyntheticContinuationRegisterSetupDescriptor {
|
|
2904
|
+
arguments: NativeSyntheticPpollSyscallArgumentProvenance[];
|
|
2905
|
+
clobberedBySyscall: ["rax", "rcx", "r11"];
|
|
2906
|
+
}
|
|
2907
|
+
interface NativeSyntheticPpollSyscallStackSetupProvenance extends NativeSyntheticContinuationStackSetupDescriptor {
|
|
2908
|
+
entryStackPointer: "target-caller-frame-stack-pointer";
|
|
2909
|
+
stackBytesWrittenByContinuation: 0;
|
|
2910
|
+
returnAddress: "trampoline-sentinel-return-address" | "not-used-exit-process-completion";
|
|
2911
|
+
requiresSourceStackBytes: false;
|
|
2912
|
+
}
|
|
2913
|
+
interface NativeSyntheticPpollSyscallCompletionProvenance extends NativeSyntheticContinuationCompletionDescriptor {
|
|
2914
|
+
mode: NativeSyntheticPpollCompletionMode;
|
|
2915
|
+
successExitStatus?: 0;
|
|
2916
|
+
failureExitBuckets?: NativeSyntheticContinuationFailureExitBucket[];
|
|
2917
|
+
}
|
|
2918
|
+
interface NativeSyntheticPpollSyscallContinuationProvenance extends NativeSyntheticSyscallContinuationDescriptor {
|
|
2919
|
+
generatorBuildId: typeof NATIVE_SYNTHETIC_PPOLL_SYSCALL_BUILD_ID;
|
|
2920
|
+
syscall: NativeSyntheticSyscallContinuationDescriptor["syscall"] & {
|
|
2921
|
+
name: "ppoll";
|
|
2922
|
+
number: 271;
|
|
2923
|
+
arguments: NativeSyntheticPpollSyscallArgumentProvenance[];
|
|
2924
|
+
};
|
|
2925
|
+
embeddedData: {
|
|
2926
|
+
kind: "timespec";
|
|
2927
|
+
offset: number;
|
|
2928
|
+
seconds: string;
|
|
2929
|
+
nanoseconds: number;
|
|
2930
|
+
byteOrder: "little-endian";
|
|
2931
|
+
pointerRegister: "rdx";
|
|
2932
|
+
pointerEncoding: "rip-relative";
|
|
2933
|
+
};
|
|
2934
|
+
registerSetup: NativeSyntheticPpollSyscallRegisterSetupProvenance;
|
|
2935
|
+
stackSetup: NativeSyntheticPpollSyscallStackSetupProvenance;
|
|
2936
|
+
completion: NativeSyntheticPpollSyscallCompletionProvenance;
|
|
2937
|
+
}
|
|
2938
|
+
interface NativeSyntheticPpollSyscallContinuationRequest {
|
|
2939
|
+
threadId: string;
|
|
2940
|
+
remainingTime: NativeModeledPpollTimeoutRemainingTime;
|
|
2941
|
+
targetAddress?: string;
|
|
2942
|
+
completionMode?: NativeSyntheticPpollCompletionMode;
|
|
2943
|
+
}
|
|
2944
|
+
interface NativeSyntheticPpollSyscallContinuation {
|
|
2945
|
+
kind: "synthetic-ppoll-syscall";
|
|
2946
|
+
threadId: string;
|
|
2947
|
+
targetArch: "amd64";
|
|
2948
|
+
entryAddress: string;
|
|
2949
|
+
relativeAddress: "0x0";
|
|
2950
|
+
syscall: {
|
|
2951
|
+
name: "ppoll";
|
|
2952
|
+
number: 271;
|
|
2953
|
+
fdsPointer: "0x0";
|
|
2954
|
+
nfds: 0;
|
|
2955
|
+
timeoutPointerEncoding: "rip-relative-timespec";
|
|
2956
|
+
sigmaskPointer: "0x0";
|
|
2957
|
+
sigsetSize: 0;
|
|
2958
|
+
};
|
|
2959
|
+
remainingTime: NativeModeledPpollTimeoutRemainingTime;
|
|
2960
|
+
completionMode: NativeSyntheticPpollCompletionMode;
|
|
2961
|
+
exitStatusOnSuccess?: 0;
|
|
2962
|
+
descriptor: NativeSyntheticSyscallContinuationDescriptor;
|
|
2963
|
+
provenance: NativeSyntheticPpollSyscallContinuationProvenance;
|
|
2964
|
+
timespecOffset: number;
|
|
2965
|
+
sizeBytes: number;
|
|
2966
|
+
bytes: Uint8Array;
|
|
2967
|
+
sourceTextReusedAsTargetCode: false;
|
|
2968
|
+
sourceIsaEmulationUsed: false;
|
|
2969
|
+
sidecarRuntimeUsed: false;
|
|
2970
|
+
}
|
|
2971
|
+
interface NativeSyntheticPpollSyscallContinuationResult {
|
|
2972
|
+
continuation?: NativeSyntheticPpollSyscallContinuation;
|
|
2973
|
+
refusals: NativeProcessImageRefusal[];
|
|
2974
|
+
}
|
|
2975
|
+
declare function buildNativeSyntheticPpollSyscallContinuation(request: NativeSyntheticPpollSyscallContinuationRequest): NativeSyntheticPpollSyscallContinuationResult;
|
|
2976
|
+
|
|
2977
|
+
/** Synthetic target-native sleep syscall continuation generation. */
|
|
2978
|
+
|
|
2979
|
+
declare const NATIVE_SYNTHETIC_SLEEP_SYSCALL_BUILD_ID = "machinen-synthetic-sleep-syscall-v3";
|
|
2980
|
+
declare const NATIVE_SYNTHETIC_SLEEP_SYSCALL_LOGICAL_NAME = "machinen-synthetic-sleep-syscall";
|
|
2981
|
+
declare const NATIVE_SYNTHETIC_SLEEP_SYSCALL_PATH = "machinen.synthetic://sleep-syscall";
|
|
2982
|
+
declare const NATIVE_SYNTHETIC_SLEEP_SYSCALL_BASE = "0x700200000000";
|
|
2983
|
+
declare const NATIVE_SYNTHETIC_SLEEP_SYSCALL_RESTART_EXIT_STATUS = 111;
|
|
2984
|
+
declare const NATIVE_SYNTHETIC_SLEEP_SYSCALL_UNMODELED_RETURN_EXIT_STATUS = 112;
|
|
2985
|
+
declare const NATIVE_SYNTHETIC_SLEEP_SYSCALL_FAILURE_EXIT_STATUS = 111;
|
|
2986
|
+
type NativeSyntheticSleepCompletionMode = "return-to-trampoline" | "exit-process";
|
|
2987
|
+
type NativeSyntheticSleepSyscallProvenanceSource = NativeSyntheticContinuationProvenanceSource;
|
|
2988
|
+
interface NativeSyntheticSleepSyscallArgumentProvenance extends NativeSyntheticSyscallArgumentDescriptor {
|
|
2989
|
+
register: "rax" | "rdi" | "rsi" | "rdx" | "r10";
|
|
2990
|
+
role: "syscall-number" | "clock-id" | "flags" | "request-timespec-pointer" | "remainder-pointer";
|
|
2991
|
+
source: NativeSyntheticSleepSyscallProvenanceSource;
|
|
2992
|
+
}
|
|
2993
|
+
interface NativeSyntheticSleepSyscallRegisterSetupProvenance extends NativeSyntheticContinuationRegisterSetupDescriptor {
|
|
2994
|
+
arguments: NativeSyntheticSleepSyscallArgumentProvenance[];
|
|
2995
|
+
clobberedBySyscall: ["rax", "rcx", "r11"];
|
|
2996
|
+
}
|
|
2997
|
+
interface NativeSyntheticSleepSyscallStackSetupProvenance extends NativeSyntheticContinuationStackSetupDescriptor {
|
|
2998
|
+
entryStackPointer: "target-caller-frame-stack-pointer";
|
|
2999
|
+
stackBytesWrittenByContinuation: 0;
|
|
3000
|
+
returnAddress: "trampoline-sentinel-return-address" | "not-used-exit-process-completion";
|
|
3001
|
+
requiresSourceStackBytes: false;
|
|
3002
|
+
}
|
|
3003
|
+
interface NativeSyntheticSleepSyscallCompletionProvenance extends NativeSyntheticContinuationCompletionDescriptor {
|
|
3004
|
+
mode: NativeSyntheticSleepCompletionMode;
|
|
3005
|
+
successExitStatus?: 0;
|
|
3006
|
+
failureExitStatus?: typeof NATIVE_SYNTHETIC_SLEEP_SYSCALL_FAILURE_EXIT_STATUS;
|
|
3007
|
+
failureExitBuckets?: NativeSyntheticContinuationFailureExitBucket[];
|
|
3008
|
+
}
|
|
3009
|
+
interface NativeSyntheticSleepSyscallContinuationProvenance extends NativeSyntheticSyscallContinuationDescriptor {
|
|
3010
|
+
generatorBuildId: typeof NATIVE_SYNTHETIC_SLEEP_SYSCALL_BUILD_ID;
|
|
3011
|
+
syscall: NativeSyntheticSyscallContinuationDescriptor["syscall"] & {
|
|
3012
|
+
name: "clock_nanosleep";
|
|
3013
|
+
number: 230;
|
|
3014
|
+
arguments: NativeSyntheticSleepSyscallArgumentProvenance[];
|
|
3015
|
+
};
|
|
3016
|
+
embeddedData: {
|
|
3017
|
+
kind: "timespec";
|
|
3018
|
+
offset: number;
|
|
3019
|
+
seconds: string;
|
|
3020
|
+
nanoseconds: number;
|
|
3021
|
+
byteOrder: "little-endian";
|
|
3022
|
+
pointerRegister: "rdx";
|
|
3023
|
+
pointerEncoding: "rip-relative";
|
|
3024
|
+
};
|
|
3025
|
+
registerSetup: NativeSyntheticSleepSyscallRegisterSetupProvenance;
|
|
3026
|
+
stackSetup: NativeSyntheticSleepSyscallStackSetupProvenance;
|
|
3027
|
+
completion: NativeSyntheticSleepSyscallCompletionProvenance;
|
|
3028
|
+
}
|
|
3029
|
+
interface NativeSyntheticSleepSyscallContinuationRequest {
|
|
3030
|
+
threadId: string;
|
|
3031
|
+
remainingTime: NativeModeledSleepTimerRemainingTime;
|
|
3032
|
+
sleepTimer?: NativeModeledSleepTimerState;
|
|
3033
|
+
targetAddress?: string;
|
|
3034
|
+
completionMode?: NativeSyntheticSleepCompletionMode;
|
|
3035
|
+
}
|
|
3036
|
+
interface NativeSyntheticSleepSyscallContinuation {
|
|
3037
|
+
kind: "synthetic-sleep-syscall";
|
|
3038
|
+
threadId: string;
|
|
3039
|
+
targetArch: "amd64";
|
|
3040
|
+
entryAddress: string;
|
|
3041
|
+
relativeAddress: "0x0";
|
|
3042
|
+
syscall: {
|
|
3043
|
+
name: "clock_nanosleep";
|
|
3044
|
+
number: 230;
|
|
3045
|
+
clockId: 0;
|
|
3046
|
+
flags: 0;
|
|
3047
|
+
requestPointerEncoding: "rip-relative-timespec";
|
|
3048
|
+
remainderPointer: "0x0";
|
|
3049
|
+
};
|
|
3050
|
+
remainingTime: NativeModeledSleepTimerRemainingTime;
|
|
3051
|
+
completionMode: NativeSyntheticSleepCompletionMode;
|
|
3052
|
+
exitStatusOnSuccess?: 0;
|
|
3053
|
+
descriptor: NativeSyntheticSyscallContinuationDescriptor;
|
|
3054
|
+
provenance: NativeSyntheticSleepSyscallContinuationProvenance;
|
|
3055
|
+
timespecOffset: number;
|
|
3056
|
+
sizeBytes: number;
|
|
3057
|
+
bytes: Uint8Array;
|
|
3058
|
+
sourceTextReusedAsTargetCode: false;
|
|
3059
|
+
sourceIsaEmulationUsed: false;
|
|
3060
|
+
sidecarRuntimeUsed: false;
|
|
3061
|
+
}
|
|
3062
|
+
interface NativeSyntheticSleepSyscallContinuationResult {
|
|
3063
|
+
continuation?: NativeSyntheticSleepSyscallContinuation;
|
|
3064
|
+
refusals: NativeProcessImageRefusal[];
|
|
3065
|
+
}
|
|
3066
|
+
declare function buildNativeSyntheticSleepSyscallContinuation(request: NativeSyntheticSleepSyscallContinuationRequest): NativeSyntheticSleepSyscallContinuationResult;
|
|
3067
|
+
|
|
3068
|
+
/** Real utility module/RVA code-location resolution. */
|
|
3069
|
+
|
|
3070
|
+
interface NativeRealUtilityExecutableRange {
|
|
3071
|
+
relativeStart: string;
|
|
3072
|
+
relativeEnd: string;
|
|
3073
|
+
}
|
|
3074
|
+
interface NativeRealUtilitySourceModule extends NativeCodeModule {
|
|
3075
|
+
sourceStart: string;
|
|
3076
|
+
sourceEnd: string;
|
|
3077
|
+
}
|
|
3078
|
+
type NativeRealUtilityTargetContinuationKind = "sleep-timer" | "poll-timeout";
|
|
3079
|
+
interface NativeRealUtilityTargetSemanticContinuation {
|
|
3080
|
+
kind: NativeRealUtilityTargetContinuationKind;
|
|
3081
|
+
source: "elf-symbol";
|
|
3082
|
+
symbolName: string;
|
|
3083
|
+
relativeAddress: string;
|
|
3084
|
+
sizeBytes?: number;
|
|
3085
|
+
}
|
|
3086
|
+
interface NativeRealUtilityTargetModule extends NativeCodeModule {
|
|
3087
|
+
executable?: boolean;
|
|
3088
|
+
executableRanges?: NativeRealUtilityExecutableRange[];
|
|
3089
|
+
semanticContinuations?: NativeRealUtilityTargetSemanticContinuation[];
|
|
3090
|
+
}
|
|
3091
|
+
interface NativeRealUtilityModuleExpectation {
|
|
3092
|
+
sourcePath?: string;
|
|
3093
|
+
sourceLogicalName?: string;
|
|
3094
|
+
targetModuleId?: string;
|
|
3095
|
+
targetPath?: string;
|
|
3096
|
+
expectedTargetBuildId?: string;
|
|
3097
|
+
}
|
|
3098
|
+
type NativeRealUtilityContinuationStrategy = "module-rva-equivalence" | "semantic-sleep-timer-symbol" | "synthetic-sleep-syscall" | "synthetic-ppoll-syscall";
|
|
3099
|
+
interface NativeRealUtilitySemanticContinuationSelection {
|
|
3100
|
+
kind: NativeRealUtilityTargetContinuationKind;
|
|
3101
|
+
source: NativeRealUtilityTargetSemanticContinuation["source"];
|
|
3102
|
+
symbolName: string;
|
|
3103
|
+
targetRelativeAddress: string;
|
|
3104
|
+
targetAddress: string;
|
|
3105
|
+
sizeBytes?: number;
|
|
3106
|
+
}
|
|
3107
|
+
type NativeRealUtilitySyntheticContinuationSelection = {
|
|
3108
|
+
kind: "sleep-timer";
|
|
3109
|
+
source: "synthetic-syscall";
|
|
3110
|
+
symbolName: "machinen_synthetic_clock_nanosleep";
|
|
3111
|
+
targetRelativeAddress: "0x0";
|
|
3112
|
+
targetAddress: string;
|
|
3113
|
+
sizeBytes: number;
|
|
3114
|
+
syscall: NativeSyntheticSleepSyscallContinuation["syscall"];
|
|
3115
|
+
completionMode: NativeSyntheticSleepCompletionMode;
|
|
3116
|
+
exitStatusOnSuccess?: 0;
|
|
3117
|
+
descriptor: NativeSyntheticSyscallContinuationDescriptor;
|
|
3118
|
+
provenance: NativeSyntheticSleepSyscallContinuationProvenance;
|
|
3119
|
+
} | {
|
|
3120
|
+
kind: "poll-timeout";
|
|
3121
|
+
source: "synthetic-syscall";
|
|
3122
|
+
symbolName: "machinen_synthetic_ppoll";
|
|
3123
|
+
targetRelativeAddress: "0x0";
|
|
3124
|
+
targetAddress: string;
|
|
3125
|
+
sizeBytes: number;
|
|
3126
|
+
syscall: NativeSyntheticPpollSyscallContinuation["syscall"];
|
|
3127
|
+
completionMode: NativeSyntheticPpollCompletionMode;
|
|
3128
|
+
exitStatusOnSuccess?: 0;
|
|
3129
|
+
descriptor: NativeSyntheticSyscallContinuationDescriptor;
|
|
3130
|
+
provenance: NativeSyntheticPpollSyscallContinuationProvenance;
|
|
3131
|
+
};
|
|
3132
|
+
interface NativeRealUtilityDeferredActiveSyscallLanding {
|
|
3133
|
+
threadId: string;
|
|
3134
|
+
sourceAddress: string;
|
|
3135
|
+
sourceRva: string;
|
|
3136
|
+
targetAddress: string;
|
|
3137
|
+
targetRva: string;
|
|
3138
|
+
strategy: Extract<NativeRealUtilityContinuationStrategy, "semantic-sleep-timer-symbol" | "synthetic-sleep-syscall" | "synthetic-ppoll-syscall">;
|
|
3139
|
+
syscallClass: NativeActiveSyscallContinuation["syscallClass"];
|
|
3140
|
+
action: NativeActiveSyscallContinuation["action"];
|
|
3141
|
+
syscall: NativeActiveSyscallContinuation["syscall"];
|
|
3142
|
+
metadata: NativeActiveSyscallContinuation["metadata"];
|
|
3143
|
+
semanticContinuation?: NativeRealUtilitySemanticContinuationSelection;
|
|
3144
|
+
syntheticContinuation?: NativeRealUtilitySyntheticContinuationSelection;
|
|
3145
|
+
}
|
|
3146
|
+
interface NativeRealUtilityResolvedLocation {
|
|
3147
|
+
threadId: string;
|
|
3148
|
+
sourceModule: NativeRealUtilitySourceModule;
|
|
3149
|
+
targetModule: NativeRealUtilityTargetModule;
|
|
3150
|
+
sourceRva: string;
|
|
3151
|
+
targetRva: string;
|
|
3152
|
+
targetAddress: string;
|
|
3153
|
+
continuationStrategy: NativeRealUtilityContinuationStrategy;
|
|
3154
|
+
codeLocation: NativeCodeLocationMapping;
|
|
3155
|
+
deferredActiveSyscallLanding?: NativeRealUtilityDeferredActiveSyscallLanding;
|
|
3156
|
+
semanticContinuation?: NativeRealUtilitySemanticContinuationSelection;
|
|
3157
|
+
syntheticContinuation?: NativeRealUtilitySyntheticContinuationSelection;
|
|
3158
|
+
}
|
|
3159
|
+
interface NativeRealUtilityCodeLocationRequest {
|
|
3160
|
+
documents: NativeProcessImageDocuments;
|
|
3161
|
+
targetArch: NativeProcessImageArchitecture;
|
|
3162
|
+
targetModules: NativeRealUtilityTargetModule[];
|
|
3163
|
+
moduleExpectations?: NativeRealUtilityModuleExpectation[];
|
|
3164
|
+
threadIds?: string[];
|
|
3165
|
+
activeSyscallContinuations?: NativeActiveSyscallContinuation[];
|
|
3166
|
+
sleepTimerContinuationStrategy?: "target-symbol" | "synthetic-syscall";
|
|
3167
|
+
pollTimeoutContinuationStrategy?: "refuse" | "synthetic-syscall";
|
|
3168
|
+
syntheticSleepBaseAddress?: string;
|
|
3169
|
+
syntheticPpollBaseAddress?: string;
|
|
3170
|
+
syntheticSleepCompletionMode?: NativeSyntheticSleepCompletionMode;
|
|
3171
|
+
syntheticPpollCompletionMode?: NativeSyntheticPpollCompletionMode;
|
|
3172
|
+
}
|
|
3173
|
+
interface NativeRealUtilityCodeLocationResult {
|
|
3174
|
+
sourceModules: NativeRealUtilitySourceModule[];
|
|
3175
|
+
targetModules: NativeRealUtilityTargetModule[];
|
|
3176
|
+
resolved: NativeRealUtilityResolvedLocation[];
|
|
3177
|
+
codeLocations: NativeCodeLocationMapping[];
|
|
3178
|
+
refusals: NativeProcessImageRefusal[];
|
|
3179
|
+
}
|
|
3180
|
+
declare function inventoryNativeSourceCodeModules(documents: NativeProcessImageDocuments): NativeRealUtilitySourceModule[];
|
|
3181
|
+
declare function resolveNativeRealUtilityCodeLocations(request: NativeRealUtilityCodeLocationRequest): NativeRealUtilityCodeLocationResult;
|
|
3182
|
+
|
|
3183
|
+
/** Stack-frame and continuation translation for native process images. */
|
|
3184
|
+
|
|
3185
|
+
interface NativeStackFrame {
|
|
3186
|
+
id: string;
|
|
3187
|
+
sourceSp: string;
|
|
3188
|
+
sourceReturnAddress: string;
|
|
3189
|
+
sizeBytes: number;
|
|
3190
|
+
metadata: "dwarf" | "sidecar" | "unknown";
|
|
3191
|
+
locals: NativeStackSlot[];
|
|
3192
|
+
}
|
|
3193
|
+
interface NativeStackSlot {
|
|
3194
|
+
offset: number;
|
|
3195
|
+
kind: "integer" | "pointer" | "code-pointer" | "ambiguous";
|
|
3196
|
+
sourceValue: string;
|
|
3197
|
+
targetValue?: string;
|
|
3198
|
+
}
|
|
3199
|
+
interface NativeStackTranslationRequest {
|
|
3200
|
+
stackMapping: string;
|
|
3201
|
+
targetStackBase: string;
|
|
3202
|
+
frames: NativeStackFrame[];
|
|
3203
|
+
codeLocations: NativeCodeLocationMapping[];
|
|
3204
|
+
}
|
|
3205
|
+
interface NativeStackTranslationResult {
|
|
3206
|
+
stackMapping: string;
|
|
3207
|
+
targetStackBase: string;
|
|
3208
|
+
targetStackSizeBytes: number;
|
|
3209
|
+
relocations: NativeMemoryRelocation[];
|
|
3210
|
+
refusals: NativeProcessImageRefusal[];
|
|
3211
|
+
}
|
|
3212
|
+
declare function translateNativeStack(request: NativeStackTranslationRequest): NativeStackTranslationResult;
|
|
3213
|
+
|
|
3214
|
+
/** DWARF/eh-frame based native stack-frame discovery. */
|
|
3215
|
+
|
|
3216
|
+
type NativeUnwindMetadataKind = "dwarf" | "eh-frame";
|
|
3217
|
+
type NativeUnwindRegister = "sp" | "x29" | "x30";
|
|
3218
|
+
interface NativeUnwindFrameRule {
|
|
3219
|
+
id: string;
|
|
3220
|
+
functionName: string;
|
|
3221
|
+
mapping: string;
|
|
3222
|
+
pcStart: string;
|
|
3223
|
+
pcEnd: string;
|
|
3224
|
+
metadata: NativeUnwindMetadataKind;
|
|
3225
|
+
cfa: {
|
|
3226
|
+
register: Extract<NativeUnwindRegister, "sp" | "x29">;
|
|
3227
|
+
offset: number;
|
|
3228
|
+
};
|
|
3229
|
+
returnAddress: {
|
|
3230
|
+
location: "register";
|
|
3231
|
+
register: Extract<NativeUnwindRegister, "x30">;
|
|
3232
|
+
} | {
|
|
3233
|
+
location: "cfa-relative";
|
|
3234
|
+
offset: number;
|
|
3235
|
+
};
|
|
3236
|
+
}
|
|
3237
|
+
interface NativeUnwindStackWord {
|
|
3238
|
+
address: string;
|
|
3239
|
+
value: string;
|
|
3240
|
+
}
|
|
3241
|
+
interface NativeUnwindFrameDiscoveryRequest {
|
|
3242
|
+
threadId: string;
|
|
3243
|
+
stackMapping: string;
|
|
3244
|
+
sourceRegisters: NativeRegisterState;
|
|
3245
|
+
rules: NativeUnwindFrameRule[];
|
|
3246
|
+
stackWords: NativeUnwindStackWord[];
|
|
3247
|
+
}
|
|
3248
|
+
interface NativeEhFrameTextParseRequest {
|
|
3249
|
+
readelfFrames: string;
|
|
3250
|
+
mapping: string;
|
|
3251
|
+
functionName: string;
|
|
3252
|
+
pc: string;
|
|
3253
|
+
loadBias?: string;
|
|
3254
|
+
}
|
|
3255
|
+
interface NativeEhFrameTextParseResult {
|
|
3256
|
+
rules: NativeUnwindFrameRule[];
|
|
3257
|
+
refusals: NativeProcessImageRefusal[];
|
|
3258
|
+
}
|
|
3259
|
+
interface NativeDiscoveredUnwindFrame {
|
|
3260
|
+
id: string;
|
|
3261
|
+
functionName: string;
|
|
3262
|
+
sourcePc: string;
|
|
3263
|
+
sourceSp: string;
|
|
3264
|
+
cfa: string;
|
|
3265
|
+
returnAddress: string;
|
|
3266
|
+
returnAddressSlot?: string;
|
|
3267
|
+
metadata: NativeUnwindMetadataKind;
|
|
3268
|
+
stackFrame: NativeStackFrame;
|
|
3269
|
+
}
|
|
3270
|
+
interface NativeUnwindFrameDiscoveryResult {
|
|
3271
|
+
frames: NativeDiscoveredUnwindFrame[];
|
|
3272
|
+
refusals: NativeProcessImageRefusal[];
|
|
3273
|
+
}
|
|
3274
|
+
declare function discoverNativeUnwindFrames(request: NativeUnwindFrameDiscoveryRequest): NativeUnwindFrameDiscoveryResult;
|
|
3275
|
+
declare function parseNativeEhFrameText(request: NativeEhFrameTextParseRequest): NativeEhFrameTextParseResult;
|
|
3276
|
+
declare function nativeUnwindReturnAddressSlot(options: {
|
|
3277
|
+
rule: NativeUnwindFrameRule;
|
|
3278
|
+
sourceRegisters: NativeArm64Registers;
|
|
3279
|
+
}): string | undefined;
|
|
3280
|
+
|
|
3281
|
+
/** Target-native unwind matching for real utility continuation planning. */
|
|
3282
|
+
|
|
3283
|
+
type NativeTargetUnwindRegister = "rsp" | "rbp" | "rip" | "rbx" | "r12" | "r13" | "r14" | "r15";
|
|
3284
|
+
interface NativeTargetUnwindFrameRule {
|
|
3285
|
+
id: string;
|
|
3286
|
+
functionName: string;
|
|
3287
|
+
mapping: string;
|
|
3288
|
+
pcStart: string;
|
|
3289
|
+
pcEnd: string;
|
|
3290
|
+
metadata: NativeUnwindMetadataKind;
|
|
3291
|
+
cfa: {
|
|
3292
|
+
register: Extract<NativeTargetUnwindRegister, "rsp" | "rbp">;
|
|
3293
|
+
offset: number;
|
|
3294
|
+
};
|
|
3295
|
+
returnAddress: {
|
|
3296
|
+
location: "cfa-relative";
|
|
3297
|
+
offset: number;
|
|
3298
|
+
};
|
|
3299
|
+
calleeSaved?: Array<{
|
|
3300
|
+
register: Exclude<NativeTargetUnwindRegister, "rsp" | "rip">;
|
|
3301
|
+
location: "same-value" | "cfa-relative";
|
|
3302
|
+
offset?: number;
|
|
3303
|
+
}>;
|
|
3304
|
+
}
|
|
3305
|
+
interface NativeTargetEhFrameTextParseRequest {
|
|
3306
|
+
readelfFrames: string;
|
|
3307
|
+
mapping: string;
|
|
3308
|
+
functionName: string;
|
|
3309
|
+
targetAddress: string;
|
|
3310
|
+
loadBias?: string;
|
|
3311
|
+
}
|
|
3312
|
+
interface NativeTargetEhFrameTextParseResult {
|
|
3313
|
+
rules: NativeTargetUnwindFrameRule[];
|
|
3314
|
+
refusals: NativeProcessImageRefusal[];
|
|
3315
|
+
}
|
|
3316
|
+
type NativeTargetCalleeSavedPolicy = "strict" | "record";
|
|
3317
|
+
interface NativeTargetUnwindMatchRequest {
|
|
3318
|
+
sourceFrame: NativeDiscoveredUnwindFrame;
|
|
3319
|
+
targetAddress: string;
|
|
3320
|
+
targetRules: NativeTargetUnwindFrameRule[];
|
|
3321
|
+
calleeSavedPolicy?: NativeTargetCalleeSavedPolicy;
|
|
3322
|
+
}
|
|
3323
|
+
interface NativeTargetCalleeSavedSlot {
|
|
3324
|
+
register: Exclude<NativeTargetUnwindRegister, "rsp" | "rip">;
|
|
3325
|
+
offset: number;
|
|
3326
|
+
}
|
|
3327
|
+
interface NativeTargetUnwindFrameMatch {
|
|
3328
|
+
sourceFrameId: string;
|
|
3329
|
+
targetRule: NativeTargetUnwindFrameRule;
|
|
3330
|
+
targetAddress: string;
|
|
3331
|
+
targetReturnAddressSlotOffset: number;
|
|
3332
|
+
targetCalleeSavedSlots?: NativeTargetCalleeSavedSlot[];
|
|
3333
|
+
preservesReturnContract: true;
|
|
3334
|
+
}
|
|
3335
|
+
interface NativeTargetUnwindMatchResult {
|
|
3336
|
+
matches: NativeTargetUnwindFrameMatch[];
|
|
3337
|
+
refusals: NativeProcessImageRefusal[];
|
|
3338
|
+
}
|
|
3339
|
+
declare function parseNativeTargetEhFrameText(request: NativeTargetEhFrameTextParseRequest): NativeTargetEhFrameTextParseResult;
|
|
3340
|
+
declare function matchNativeTargetUnwindFrame(request: NativeTargetUnwindMatchRequest): NativeTargetUnwindMatchResult;
|
|
3341
|
+
|
|
3342
|
+
/** Target-native frame-state materialization planning. */
|
|
3343
|
+
|
|
3344
|
+
type NativeTargetFrameStateRegister = Exclude<NativeTargetUnwindRegister, "rsp" | "rip">;
|
|
3345
|
+
type NativeTargetFrameStateValueSource = "target-register" | "synthetic-target-caller";
|
|
3346
|
+
interface NativeSyntheticTargetCallerFrameStatePolicy {
|
|
3347
|
+
mode: "abi-neutral-sentinel";
|
|
3348
|
+
value?: string;
|
|
3349
|
+
}
|
|
3350
|
+
interface NativeTargetFrameRegisterValue {
|
|
3351
|
+
register: NativeTargetFrameStateRegister;
|
|
3352
|
+
value: string;
|
|
3353
|
+
source: NativeTargetFrameStateValueSource;
|
|
3354
|
+
}
|
|
3355
|
+
interface NativeTargetFrameStateRequirement {
|
|
3356
|
+
sourceFrameId: string;
|
|
3357
|
+
targetAddress: string;
|
|
3358
|
+
register: NativeTargetFrameStateRegister;
|
|
3359
|
+
slot: NativeTargetCalleeSavedSlot;
|
|
3360
|
+
}
|
|
3361
|
+
interface NativeTargetFrameStateMaterialization {
|
|
3362
|
+
requirement: NativeTargetFrameStateRequirement;
|
|
3363
|
+
value: string;
|
|
3364
|
+
valueSource: NativeTargetFrameStateValueSource;
|
|
3365
|
+
}
|
|
3366
|
+
interface NativeTargetFrameStateMaterializationRequest {
|
|
3367
|
+
targetUnwind: NativeTargetUnwindMatchResult;
|
|
3368
|
+
registerValues?: NativeTargetFrameRegisterValue[];
|
|
3369
|
+
syntheticTargetCaller?: NativeSyntheticTargetCallerFrameStatePolicy;
|
|
3370
|
+
}
|
|
3371
|
+
interface NativeTargetFrameStateMaterializationResult {
|
|
3372
|
+
requirements: NativeTargetFrameStateRequirement[];
|
|
3373
|
+
materialized: NativeTargetFrameStateMaterialization[];
|
|
3374
|
+
refusals: NativeProcessImageRefusal[];
|
|
3375
|
+
}
|
|
3376
|
+
declare function planNativeTargetFrameStateMaterialization(request: NativeTargetFrameStateMaterializationRequest): NativeTargetFrameStateMaterializationResult;
|
|
3377
|
+
|
|
3378
|
+
/** Safety-ordered planner for first real utility native continuation attempts. */
|
|
3379
|
+
|
|
3380
|
+
type NativeRealUtilityContinuationBoundary = "thread-state" | "resource-boundary" | "mapping-materialization" | "target-code-location" | "source-unwind" | "target-unwind" | "target-frame-state" | "ready";
|
|
3381
|
+
interface NativeRealUtilityContinuationRequest {
|
|
3382
|
+
threadRefusals?: NativeProcessImageRefusal[];
|
|
3383
|
+
resourceRefusals?: NativeProcessImageRefusal[];
|
|
3384
|
+
mappingRefusals?: NativeProcessImageRefusal[];
|
|
3385
|
+
codeLocations: NativeCodeLocationMapping[];
|
|
3386
|
+
sourceFrames: NativeDiscoveredUnwindFrame[];
|
|
3387
|
+
sourceFrameRefusals?: NativeProcessImageRefusal[];
|
|
3388
|
+
sourceUnwindRequired?: boolean;
|
|
3389
|
+
targetUnwind?: NativeTargetUnwindMatchResult;
|
|
3390
|
+
targetUnwindMatched?: boolean;
|
|
3391
|
+
targetFrameState?: NativeTargetFrameStateMaterializationResult;
|
|
3392
|
+
targetFrameStateMaterialized?: boolean;
|
|
3393
|
+
}
|
|
3394
|
+
interface NativeRealUtilityContinuationPlan {
|
|
3395
|
+
state: "ready" | "refused";
|
|
3396
|
+
blockingBoundary: NativeRealUtilityContinuationBoundary;
|
|
3397
|
+
blockingRefusal?: NativeProcessImageRefusal;
|
|
3398
|
+
attemptedResume: false;
|
|
3399
|
+
sourceTextReusedAsTargetCode: false;
|
|
3400
|
+
sourceIsaEmulationUsed: false;
|
|
3401
|
+
sidecarRuntimeUsed: false;
|
|
3402
|
+
}
|
|
3403
|
+
declare function planNativeRealUtilityContinuationAttempt(request: NativeRealUtilityContinuationRequest): NativeRealUtilityContinuationPlan;
|
|
3404
|
+
|
|
3405
|
+
/** Actual captured real-utility continuation gate planner. */
|
|
3406
|
+
|
|
3407
|
+
type NativeActualRealUtilityContinuationBoundary = NativeRealUtilityContinuationBoundary | "target-module-bytes" | "target-caller-frame" | "target-resume-execution";
|
|
3408
|
+
interface NativeActualRealUtilityContinuationRequest extends NativeRealUtilityContinuationRequest {
|
|
3409
|
+
targetModuleByteRefusals?: NativeProcessImageRefusal[];
|
|
3410
|
+
targetModuleBytesMaterialized?: boolean;
|
|
3411
|
+
targetCallerFrameRefusals?: NativeProcessImageRefusal[];
|
|
3412
|
+
targetCallerFrameMaterialized?: boolean;
|
|
3413
|
+
targetResumeExecutionRefusals?: NativeProcessImageRefusal[];
|
|
3414
|
+
targetResumeExecutionPlanned?: boolean;
|
|
3415
|
+
}
|
|
3416
|
+
interface NativeActualRealUtilityContinuationPlan {
|
|
3417
|
+
state: "ready" | "refused";
|
|
3418
|
+
blockingBoundary: NativeActualRealUtilityContinuationBoundary;
|
|
3419
|
+
blockingRefusal?: NativeProcessImageRefusal;
|
|
3420
|
+
attemptedResume: false;
|
|
3421
|
+
sourceTextReusedAsTargetCode: false;
|
|
3422
|
+
sourceIsaEmulationUsed: false;
|
|
3423
|
+
sidecarRuntimeUsed: false;
|
|
3424
|
+
}
|
|
3425
|
+
declare function planNativeActualRealUtilityContinuationAttempt(request: NativeActualRealUtilityContinuationRequest): NativeActualRealUtilityContinuationPlan;
|
|
3426
|
+
|
|
3427
|
+
/** Target module inventory for actual captured real-utility paths. */
|
|
3428
|
+
|
|
3429
|
+
interface NativeActualTargetModuleInventoryRequest {
|
|
3430
|
+
sourceModules: NativeRealUtilitySourceModule[];
|
|
3431
|
+
targetArch: NativeProcessImageArchitecture;
|
|
3432
|
+
targetRoot?: string;
|
|
3433
|
+
explicitTargetModulePath?: string;
|
|
3434
|
+
loadBiasBase?: string;
|
|
3435
|
+
}
|
|
3436
|
+
interface NativeActualTargetModuleInventoryResult {
|
|
3437
|
+
targetModules: NativeRealUtilityTargetModule[];
|
|
3438
|
+
}
|
|
3439
|
+
declare function inventoryNativeActualTargetModules(request: NativeActualTargetModuleInventoryRequest): NativeActualTargetModuleInventoryResult;
|
|
3440
|
+
|
|
3441
|
+
/** Synthetic target caller-frame planning for actual native continuations. */
|
|
3442
|
+
|
|
3443
|
+
interface NativeSyntheticTargetCallerFramePolicy {
|
|
3444
|
+
mode: "abi-neutral-sentinel";
|
|
3445
|
+
returnAddress?: string;
|
|
3446
|
+
stackPointer?: string;
|
|
3447
|
+
}
|
|
3448
|
+
interface NativeSyntheticTargetCallerFrameSlot {
|
|
3449
|
+
register: NativeTargetFrameStateMaterialization["requirement"]["register"];
|
|
3450
|
+
offset: number;
|
|
3451
|
+
value: string;
|
|
3452
|
+
valueSource: NativeTargetFrameStateMaterialization["valueSource"];
|
|
3453
|
+
}
|
|
3454
|
+
interface NativeSyntheticTargetCallerFrame {
|
|
3455
|
+
id: string;
|
|
3456
|
+
stackPointer: string;
|
|
3457
|
+
returnAddress: string;
|
|
3458
|
+
slots: NativeSyntheticTargetCallerFrameSlot[];
|
|
3459
|
+
sourceTextReusedAsTargetCode: false;
|
|
3460
|
+
sourceIsaEmulationUsed: false;
|
|
3461
|
+
sidecarRuntimeUsed: false;
|
|
3462
|
+
}
|
|
3463
|
+
interface NativeSyntheticTargetCallerFramePlanRequest {
|
|
3464
|
+
frameState: NativeTargetFrameStateMaterializationResult;
|
|
3465
|
+
policy?: NativeSyntheticTargetCallerFramePolicy;
|
|
3466
|
+
}
|
|
3467
|
+
interface NativeSyntheticTargetCallerFramePlanResult {
|
|
3468
|
+
state: "planned" | "refused";
|
|
3469
|
+
frame?: NativeSyntheticTargetCallerFrame;
|
|
3470
|
+
refusals: NativeProcessImageRefusal[];
|
|
3471
|
+
}
|
|
3472
|
+
declare function planNativeSyntheticTargetCallerFrame(request: NativeSyntheticTargetCallerFramePlanRequest): NativeSyntheticTargetCallerFramePlanResult;
|
|
3473
|
+
|
|
3474
|
+
/** Target-native module byte materialization for real utility continuation. */
|
|
3475
|
+
|
|
3476
|
+
interface NativeTargetModuleByteMaterializationRequest {
|
|
3477
|
+
module: NativeRealUtilityTargetModule;
|
|
3478
|
+
targetRoot?: string;
|
|
3479
|
+
relativeStart: string;
|
|
3480
|
+
sizeBytes: number;
|
|
3481
|
+
fileOffset?: number;
|
|
3482
|
+
expectedBuildId?: string;
|
|
3483
|
+
}
|
|
3484
|
+
interface NativeTargetModuleByteMaterialization {
|
|
3485
|
+
moduleId: string;
|
|
3486
|
+
path: string;
|
|
3487
|
+
buildId: string;
|
|
3488
|
+
relativeStart: string;
|
|
3489
|
+
relativeEnd: string;
|
|
3490
|
+
fileOffset: number;
|
|
3491
|
+
sizeBytes: number;
|
|
3492
|
+
bytes: Uint8Array;
|
|
3493
|
+
sourceTextReusedAsTargetCode: false;
|
|
3494
|
+
}
|
|
3495
|
+
interface NativeTargetModuleByteMaterializationResult {
|
|
3496
|
+
materialized?: NativeTargetModuleByteMaterialization;
|
|
3497
|
+
refusals: NativeProcessImageRefusal[];
|
|
3498
|
+
}
|
|
3499
|
+
declare function materializeNativeTargetModuleBytes(request: NativeTargetModuleByteMaterializationRequest): NativeTargetModuleByteMaterializationResult;
|
|
3500
|
+
|
|
3501
|
+
/** Target-native resume landing provenance and instruction-boundary audit. */
|
|
3502
|
+
|
|
3503
|
+
type NativeTargetLandingInstructionBoundaryState = "known-valid" | "known-invalid" | "unknown";
|
|
3504
|
+
interface NativeTargetLandingModuleProvenance {
|
|
3505
|
+
id: string;
|
|
3506
|
+
logicalName: string;
|
|
3507
|
+
path: string;
|
|
3508
|
+
buildId: string;
|
|
3509
|
+
loadBias: string;
|
|
3510
|
+
}
|
|
3511
|
+
interface NativeTargetLandingSectionProvenance {
|
|
3512
|
+
name: string;
|
|
3513
|
+
addressStart: string;
|
|
3514
|
+
addressEnd: string;
|
|
3515
|
+
fileOffsetStart: string;
|
|
3516
|
+
fileOffsetEnd: string;
|
|
3517
|
+
flags: string;
|
|
3518
|
+
executable: boolean;
|
|
3519
|
+
match: "address" | "file-offset";
|
|
3520
|
+
}
|
|
3521
|
+
interface NativeTargetLandingSymbolProvenance {
|
|
3522
|
+
name: string;
|
|
3523
|
+
address: string;
|
|
3524
|
+
offset: string;
|
|
3525
|
+
sizeBytes?: number;
|
|
3526
|
+
type: string;
|
|
3527
|
+
binding: string;
|
|
3528
|
+
containsLanding: boolean;
|
|
3529
|
+
}
|
|
3530
|
+
interface NativeTargetLandingFdeProvenance {
|
|
3531
|
+
id: string;
|
|
3532
|
+
functionName: string;
|
|
3533
|
+
pcStart: string;
|
|
3534
|
+
pcEnd: string;
|
|
3535
|
+
metadata: NativeTargetUnwindFrameRule["metadata"];
|
|
3536
|
+
}
|
|
3537
|
+
interface NativeTargetLandingDisassemblyProvenance {
|
|
3538
|
+
tool: "objdump";
|
|
3539
|
+
addressStart?: string;
|
|
3540
|
+
addressEnd?: string;
|
|
3541
|
+
lines: string[];
|
|
3542
|
+
entryLine?: string;
|
|
3543
|
+
previousLine?: string;
|
|
3544
|
+
nextLine?: string;
|
|
3545
|
+
}
|
|
3546
|
+
interface NativeTargetLandingInstructionBoundary {
|
|
3547
|
+
state: NativeTargetLandingInstructionBoundaryState;
|
|
3548
|
+
reason: string;
|
|
3549
|
+
}
|
|
3550
|
+
interface NativeTargetResumeLandingProvenance {
|
|
3551
|
+
id: string;
|
|
3552
|
+
threadId: string;
|
|
3553
|
+
sourceAddress: string;
|
|
3554
|
+
sourceRva: string;
|
|
3555
|
+
targetRva: string;
|
|
3556
|
+
targetAddress: string;
|
|
3557
|
+
targetRelativeAddress: string;
|
|
3558
|
+
continuationStrategy: NativeRealUtilityResolvedLocation["continuationStrategy"];
|
|
3559
|
+
semanticContinuation?: NativeRealUtilityResolvedLocation["semanticContinuation"];
|
|
3560
|
+
syntheticContinuation?: NativeRealUtilityResolvedLocation["syntheticContinuation"];
|
|
3561
|
+
targetFileOffset?: number;
|
|
3562
|
+
targetInstructionBytes?: string;
|
|
3563
|
+
targetModule: NativeTargetLandingModuleProvenance;
|
|
3564
|
+
section?: NativeTargetLandingSectionProvenance;
|
|
3565
|
+
symbol?: NativeTargetLandingSymbolProvenance;
|
|
3566
|
+
fde?: NativeTargetLandingFdeProvenance;
|
|
3567
|
+
disassembly?: NativeTargetLandingDisassemblyProvenance;
|
|
3568
|
+
instructionBoundary: NativeTargetLandingInstructionBoundary;
|
|
3569
|
+
refusal?: NativeProcessImageRefusal;
|
|
3570
|
+
}
|
|
3571
|
+
interface NativeTargetResumeLandingInspectionRequest {
|
|
3572
|
+
location: NativeRealUtilityResolvedLocation;
|
|
3573
|
+
targetBytes?: NativeTargetModuleByteMaterialization;
|
|
3574
|
+
targetUnwindMatches?: NativeTargetUnwindFrameMatch[];
|
|
3575
|
+
readelfSections?: string;
|
|
3576
|
+
readelfSymbols?: string;
|
|
3577
|
+
objdumpDisassembly?: string;
|
|
3578
|
+
disassemblyAddressStart?: string;
|
|
3579
|
+
disassemblyAddressEnd?: string;
|
|
3580
|
+
}
|
|
3581
|
+
declare function inspectNativeTargetResumeLanding(request: NativeTargetResumeLandingInspectionRequest): NativeTargetResumeLandingProvenance;
|
|
3582
|
+
declare function nativeTargetResumeLandingRefusals(provenances: NativeTargetResumeLandingProvenance[]): NativeProcessImageRefusal[];
|
|
3583
|
+
|
|
3584
|
+
/** Target-native resume execution planning for actual utility continuations. */
|
|
3585
|
+
|
|
3586
|
+
type NativeTargetResumeExecutionMode = "planned-not-executed";
|
|
3587
|
+
type NativeTargetResumeExecutor = "native-resume-trampoline";
|
|
3588
|
+
type NativeTargetResumeExecutionAttemptStatus = "returned" | "faulted" | "exited";
|
|
3589
|
+
type NativeTargetResumeFaultBoundary = "target-resume-fault-state";
|
|
3590
|
+
interface NativeTargetResumeFaultRegisters {
|
|
3591
|
+
rax?: string;
|
|
3592
|
+
rbx?: string;
|
|
3593
|
+
rcx?: string;
|
|
3594
|
+
rdx?: string;
|
|
3595
|
+
rsi?: string;
|
|
3596
|
+
rdi?: string;
|
|
3597
|
+
rbp?: string;
|
|
3598
|
+
rsp?: string;
|
|
3599
|
+
r8?: string;
|
|
3600
|
+
r9?: string;
|
|
3601
|
+
r10?: string;
|
|
3602
|
+
r11?: string;
|
|
3603
|
+
r12?: string;
|
|
3604
|
+
r13?: string;
|
|
3605
|
+
r14?: string;
|
|
3606
|
+
r15?: string;
|
|
3607
|
+
}
|
|
3608
|
+
interface NativeTargetResumeFaultClassification {
|
|
3609
|
+
boundary: NativeTargetResumeFaultBoundary;
|
|
3610
|
+
refusal: NativeProcessImageRefusal;
|
|
3611
|
+
signal?: string;
|
|
3612
|
+
faultAddress?: string;
|
|
3613
|
+
targetInstructionPointer?: string;
|
|
3614
|
+
targetInstructionBytes?: string;
|
|
3615
|
+
registers?: NativeTargetResumeFaultRegisters;
|
|
3616
|
+
attemptedResume: true;
|
|
3617
|
+
migrationCompleted: false;
|
|
3618
|
+
}
|
|
3619
|
+
interface NativeTargetResumeFaultClassificationResult {
|
|
3620
|
+
state: "classified" | "not-faulted" | "unattempted";
|
|
3621
|
+
classification?: NativeTargetResumeFaultClassification;
|
|
3622
|
+
refusals: NativeProcessImageRefusal[];
|
|
3623
|
+
}
|
|
3624
|
+
interface NativeTargetResumeFaultClassificationOptions {
|
|
3625
|
+
landingProvenance?: NativeTargetResumeLandingProvenance[];
|
|
3626
|
+
}
|
|
3627
|
+
interface NativeTargetResumeExecutionAttempt {
|
|
3628
|
+
status: NativeTargetResumeExecutionAttemptStatus;
|
|
3629
|
+
targetArch: "amd64";
|
|
3630
|
+
entryAddress: string;
|
|
3631
|
+
stackPointer: string;
|
|
3632
|
+
targetBytesStart: string;
|
|
3633
|
+
targetBytesEnd: string;
|
|
3634
|
+
targetInstructionPointer?: string;
|
|
3635
|
+
targetInstructionBytes?: string;
|
|
3636
|
+
registers?: NativeTargetResumeFaultRegisters;
|
|
3637
|
+
signal?: string;
|
|
3638
|
+
signalNumber?: number;
|
|
3639
|
+
faultAddress?: string;
|
|
3640
|
+
returnValue?: string;
|
|
3641
|
+
exitStatus?: number;
|
|
3642
|
+
instructionPointerInTargetBytes: boolean;
|
|
3643
|
+
attemptedResume: true;
|
|
3644
|
+
sourceTextReusedAsTargetCode: false;
|
|
3645
|
+
sourceIsaEmulationUsed: false;
|
|
3646
|
+
sidecarRuntimeUsed: false;
|
|
3647
|
+
}
|
|
3648
|
+
interface NativeTargetResumeExecutionPlan {
|
|
3649
|
+
mode: NativeTargetResumeExecutionMode;
|
|
3650
|
+
executor: NativeTargetResumeExecutor;
|
|
3651
|
+
targetArch: "amd64";
|
|
3652
|
+
entryAddress: string;
|
|
3653
|
+
stackPointer: string;
|
|
3654
|
+
callerFrameId: string;
|
|
3655
|
+
targetModuleByteModules: string[];
|
|
3656
|
+
attemptedResume: false;
|
|
3657
|
+
sourceTextReusedAsTargetCode: false;
|
|
3658
|
+
sourceIsaEmulationUsed: false;
|
|
3659
|
+
sidecarRuntimeUsed: false;
|
|
3660
|
+
}
|
|
3661
|
+
interface NativeTargetResumeExecutionPlanRequest {
|
|
3662
|
+
codeLocations: NativeCodeLocationMapping[];
|
|
3663
|
+
targetModuleBytes: NativeTargetModuleByteMaterialization[];
|
|
3664
|
+
callerFrame?: NativeSyntheticTargetCallerFrame;
|
|
3665
|
+
}
|
|
3666
|
+
interface NativeTargetResumeExecutionPlanResult {
|
|
3667
|
+
state: "planned" | "refused";
|
|
3668
|
+
plan?: NativeTargetResumeExecutionPlan;
|
|
3669
|
+
refusals: NativeProcessImageRefusal[];
|
|
3670
|
+
}
|
|
3671
|
+
declare function planNativeTargetResumeExecution(request: NativeTargetResumeExecutionPlanRequest): NativeTargetResumeExecutionPlanResult;
|
|
3672
|
+
declare function classifyNativeTargetResumeExecutionAttempt(attempt: NativeTargetResumeExecutionAttempt | undefined, options?: NativeTargetResumeFaultClassificationOptions): NativeTargetResumeFaultClassificationResult;
|
|
3673
|
+
|
|
3674
|
+
/** Process memory classification and relocation for native cross-ISA restore. */
|
|
3675
|
+
|
|
3676
|
+
interface NativeMemoryWord {
|
|
3677
|
+
mapping: string;
|
|
3678
|
+
offset: number;
|
|
3679
|
+
sourceValue: string;
|
|
3680
|
+
classification: "integer" | "pointer" | "code-pointer" | "thread-pointer" | "ambiguous";
|
|
3681
|
+
targetValue?: string;
|
|
3682
|
+
proof: "dwarf" | "sidecar" | "symbol" | "policy" | "none";
|
|
3683
|
+
}
|
|
3684
|
+
interface NativeMemoryTranslationRequest {
|
|
3685
|
+
words: NativeMemoryWord[];
|
|
3686
|
+
}
|
|
3687
|
+
interface NativeMemoryTranslationResult {
|
|
3688
|
+
relocations: NativeMemoryRelocation[];
|
|
3689
|
+
preservedWords: number;
|
|
3690
|
+
refusals: NativeProcessImageRefusal[];
|
|
3691
|
+
}
|
|
3692
|
+
declare function translateNativeMemory(request: NativeMemoryTranslationRequest): NativeMemoryTranslationResult;
|
|
3693
|
+
|
|
3694
|
+
/** Debug-metadata guided native memory pointer classification. */
|
|
3695
|
+
|
|
3696
|
+
type NativeDebugMemoryMetadataSource = "dwarf" | "symbol" | "none";
|
|
3697
|
+
type NativeDebugMemoryFieldClassification = "integer" | "pointer" | "code-pointer" | "unknown";
|
|
3698
|
+
interface NativeDebugMemoryField {
|
|
3699
|
+
name: string;
|
|
3700
|
+
offset: number;
|
|
3701
|
+
sizeBytes: number;
|
|
3702
|
+
sourceValue: string;
|
|
3703
|
+
classification: NativeDebugMemoryFieldClassification;
|
|
3704
|
+
metadata: NativeDebugMemoryMetadataSource;
|
|
3705
|
+
}
|
|
3706
|
+
interface NativeDebugMemoryObject {
|
|
3707
|
+
id: string;
|
|
3708
|
+
mapping: string;
|
|
3709
|
+
sourceStart: string;
|
|
3710
|
+
mappingOffset?: number;
|
|
3711
|
+
fields: NativeDebugMemoryField[];
|
|
3712
|
+
}
|
|
3713
|
+
interface NativeDebugAddressTranslation {
|
|
3714
|
+
id: string;
|
|
3715
|
+
sourceStart: string;
|
|
3716
|
+
sourceEnd: string;
|
|
3717
|
+
targetStart: string;
|
|
3718
|
+
}
|
|
3719
|
+
interface NativeDebugMemoryPointerClassificationRequest {
|
|
3720
|
+
objects: NativeDebugMemoryObject[];
|
|
3721
|
+
addressTranslations: NativeDebugAddressTranslation[];
|
|
3722
|
+
codeLocations?: NativeCodeLocationMapping[];
|
|
3723
|
+
}
|
|
3724
|
+
interface NativeDebugMemoryPointerClassificationResult {
|
|
3725
|
+
words: NativeMemoryWord[];
|
|
3726
|
+
preservedWords: number;
|
|
3727
|
+
relocatableWords: number;
|
|
3728
|
+
refusals: NativeProcessImageRefusal[];
|
|
3729
|
+
}
|
|
3730
|
+
declare function classifyNativeDebugMemoryPointers(request: NativeDebugMemoryPointerClassificationRequest): NativeDebugMemoryPointerClassificationResult;
|
|
3731
|
+
|
|
3732
|
+
/** Target mapping materialization planning for native process images. */
|
|
3733
|
+
|
|
3734
|
+
type NativeMappingMaterializationAction = "map-target-file" | "copy-captured-bytes" | "recreate" | "omit" | "refuse";
|
|
3735
|
+
interface NativeMappingMaterializationStep {
|
|
3736
|
+
mapping: string;
|
|
3737
|
+
kind: NativeMemoryMapping["kind"];
|
|
3738
|
+
action: NativeMappingMaterializationAction;
|
|
3739
|
+
targetStart?: string;
|
|
3740
|
+
sizeBytes: number;
|
|
3741
|
+
permissions: NativeMemoryMapping["permissions"];
|
|
3742
|
+
targetFile?: {
|
|
3743
|
+
path: string;
|
|
3744
|
+
offset: number;
|
|
3745
|
+
buildId?: string;
|
|
3746
|
+
sha256?: string;
|
|
3747
|
+
};
|
|
3748
|
+
sourceBytes?: {
|
|
3749
|
+
offset: number;
|
|
3750
|
+
sizeBytes: number;
|
|
3751
|
+
};
|
|
3752
|
+
refusal?: NativeProcessImageRefusal;
|
|
3753
|
+
}
|
|
3754
|
+
interface NativeMappingMaterializationRequest {
|
|
3755
|
+
mappings: NativeMemoryMapping[];
|
|
3756
|
+
memorySizeBytes: number;
|
|
3757
|
+
targetFileBuildIds?: Record<string, string>;
|
|
3758
|
+
}
|
|
3759
|
+
interface NativeMappingMaterializationResult {
|
|
3760
|
+
steps: NativeMappingMaterializationStep[];
|
|
3761
|
+
refusals: NativeProcessImageRefusal[];
|
|
3762
|
+
}
|
|
3763
|
+
declare function planNativeMappingMaterialization(request: NativeMappingMaterializationRequest): NativeMappingMaterializationResult;
|
|
3764
|
+
|
|
3765
|
+
/** Register/TLS/syscall-state translation rules for native process images. */
|
|
3766
|
+
|
|
3767
|
+
interface NativeRegisterTranslationRequest {
|
|
3768
|
+
sourceArch: NativeProcessImageArchitecture;
|
|
3769
|
+
targetArch: NativeProcessImageArchitecture;
|
|
3770
|
+
threads: NativeThreadState[];
|
|
3771
|
+
continuations: Record<string, NativeContinuationTarget>;
|
|
3772
|
+
}
|
|
3773
|
+
interface NativeContinuationTarget {
|
|
3774
|
+
sourcePc: string;
|
|
3775
|
+
targetIp: string;
|
|
3776
|
+
targetSp: string;
|
|
3777
|
+
targetTls: string;
|
|
3778
|
+
targetRegisterOverrides?: Partial<Pick<NativeAmd64Registers, "rax" | "rbx" | "rcx" | "rdx" | "rsi" | "rdi" | "rbp" | "r8" | "r9" | "r10" | "r11" | "r12" | "r13" | "r14" | "r15">>;
|
|
3779
|
+
}
|
|
3780
|
+
interface NativeRegisterTranslationResult {
|
|
3781
|
+
sourceArch: NativeProcessImageArchitecture;
|
|
3782
|
+
targetArch: NativeProcessImageArchitecture;
|
|
3783
|
+
threads: NativeThreadTranslation[];
|
|
3784
|
+
refusals: NativeProcessImageRefusal[];
|
|
3785
|
+
}
|
|
3786
|
+
declare function translateNativeRegisterState(request: NativeRegisterTranslationRequest): NativeRegisterTranslationResult;
|
|
3787
|
+
|
|
3788
|
+
/** Kernel-resource recipes and refusals for native process restore. */
|
|
3789
|
+
|
|
3790
|
+
interface NativeInheritedStdioPolicy {
|
|
3791
|
+
mode: "inherit-output" | "require-explicit";
|
|
3792
|
+
}
|
|
3793
|
+
interface NativeResourceTranslationRequest {
|
|
3794
|
+
resources: NativeProcessResource[];
|
|
3795
|
+
hostCapabilities?: string[];
|
|
3796
|
+
inheritedStdio?: NativeInheritedStdioPolicy;
|
|
3797
|
+
}
|
|
3798
|
+
interface NativeResourceTranslationResult {
|
|
3799
|
+
resources: NativeProcessResource[];
|
|
3800
|
+
refusals: NativeProcessImageRefusal[];
|
|
3801
|
+
}
|
|
3802
|
+
declare function translateNativeResources(request: NativeResourceTranslationRequest): NativeResourceTranslationResult;
|
|
3803
|
+
|
|
2123
3804
|
/**
|
|
2124
3805
|
* Bytes of memory the OS reports as available right now. "Available"
|
|
2125
3806
|
* is the loose union the kernel exposes:
|
|
@@ -2233,4 +3914,4 @@ interface BalloonCounters {
|
|
|
2233
3914
|
*/
|
|
2234
3915
|
declare function readBalloonStats(path: string): BalloonCounters | null;
|
|
2235
3916
|
|
|
2236
|
-
export { type AttachOptions, type BalloonCounters, BootError, type BootOptions, CacheError, type CheckForkBackpressureOptions, type ChunkLogEvent, DEFAULT_FREE_MEMORY_THRESHOLD, type EnsureMountDiskImageOptions, type EnsureMountDiskImageResult, type EnsureMountDiskUpperOptions, type EnsureMountDiskUpperResult, type EnsureRootfsImageOptions, ErrorCode, ExecError, FilesError, type ForkOptions, type GcResult, GvproxyError, type ImageConfig, type LogEvent, MachinenError, type MachinenErrorOptions, type MemoryStats, MkinitramfsError, MountError, type OnLog, type OnOutputListener, type PackBundleOptions, type PackMinimalOptions, type PackRootfsOptions, type PackTinyBundleOptions, type PackWorkspaceOptions, ParseError, type PhaseLogEvent, type PidStatus, ProvisionError, type ProvisionOptions, type ProvisionResult, type PtyBootOptions, type PtyVmHandle, type RegistryEntry, RegistryError, type RestoreOptions, type RssTarget, type RunGcOptions, STATS_FILE_SIZE, type SandboxEntry, SandboxError, Sandboxes, SecretsError, type SnapshotEngine, SnapshotError, type SnapshotMeta, type SnapshotOptions, type SnapshotResult, Supervisor, type SupervisorOptions, type VmHandle, VsockExec, type VsockExecOptions, type VsockExecPtyHandle, type VsockExecPtyOptions, type VsockExecPtyResult, type VsockExecResult, VsockFiles, type VsockFilesOptions, VsockSecrets, type VsockSecretsOptions, VsockWinsize, type VsockWinsizeOptions, WinsizeError, type WriteFileOptions, _internal, attach, autoSizeMemoryMib, boot, bootPty, bootSnapshotPath, buildMachinenConfig, buildWriteFileCmd, buildWriteFileCmds, checkForkBackpressure, detachedLogRoot, ensureMountDiskImage, ensureMountDiskUpper, ensureRootfsImage, formatMachinenError, isMachinenError, list, markMountDiskImageClean, markRootfsImageClean, measureFirstByte, packBundle as mkinitramfsBundle, cli as mkinitramfsCli, packMinimal as mkinitramfsMinimal, packRootfs as mkinitramfsRootfs, packTinyBundle as mkinitramfsTinyBundle, packWorkspace as mkinitramfsWorkspace, mountdiskImgCacheDir, provision, readBalloonStats, readHostFreeBytes, readHostRssBytes, readHostRssBytesMulti, readHostTotalBytes, registryRoot, resolveBaseDtb, resolveBaseKernel, resolveBaseRootfs, resolveMke2fs, resolveMksquashfs, resolveVmmBinary, restore, rootfsImgCacheDir, runGc, validatePid, warmImageConfigCache, writeBootSnapshot };
|
|
3917
|
+
export { type AttachOptions, type BalloonCounters, BootError, type BootOptions, CacheError, type CheckForkBackpressureOptions, type ChunkLogEvent, DEFAULT_FREE_MEMORY_THRESHOLD, type EnsureMountDiskImageOptions, type EnsureMountDiskImageResult, type EnsureMountDiskUpperOptions, type EnsureMountDiskUpperResult, type EnsureRootfsImageOptions, ErrorCode, ExecError, FilesError, type ForkOptions, type GcResult, GvproxyError, type ImageConfig, type LogEvent, MachinenError, type MachinenErrorOptions, type MemoryStats, MkinitramfsError, MountError, NATIVE_PROCESS_IMAGE_FILES, NATIVE_PROCESS_IMAGE_FORMAT_VERSION, NATIVE_SYNTHETIC_PPOLL_SYSCALL_BASE, NATIVE_SYNTHETIC_PPOLL_SYSCALL_BUILD_ID, NATIVE_SYNTHETIC_PPOLL_SYSCALL_LOGICAL_NAME, NATIVE_SYNTHETIC_PPOLL_SYSCALL_PATH, NATIVE_SYNTHETIC_SLEEP_SYSCALL_BASE, NATIVE_SYNTHETIC_SLEEP_SYSCALL_BUILD_ID, NATIVE_SYNTHETIC_SLEEP_SYSCALL_FAILURE_EXIT_STATUS, NATIVE_SYNTHETIC_SLEEP_SYSCALL_LOGICAL_NAME, NATIVE_SYNTHETIC_SLEEP_SYSCALL_PATH, NATIVE_SYNTHETIC_SLEEP_SYSCALL_RESTART_EXIT_STATUS, NATIVE_SYNTHETIC_SLEEP_SYSCALL_UNMODELED_RETURN_EXIT_STATUS, NATIVE_SYNTHETIC_SYSCALL_RESTART_EXIT_STATUS, NATIVE_SYNTHETIC_SYSCALL_UNMODELED_RETURN_EXIT_STATUS, type NativeActivePpollTimeoutContinuation, type NativeActiveSleepTimerContinuation, type NativeActiveSyscallClass, type NativeActiveSyscallClassification, type NativeActiveSyscallClassificationResult, type NativeActiveSyscallContinuation, type NativeActiveSyscallPolicyOptions, type NativeActualRealUtilityContinuationBoundary, type NativeActualRealUtilityContinuationPlan, type NativeActualRealUtilityContinuationRequest, type NativeActualTargetModuleInventoryRequest, type NativeActualTargetModuleInventoryResult, type NativeAmd64Registers, type NativeArm64Registers, type NativeCodeLocationMapping, type NativeCodeMapRequest, type NativeCodeMapResult, type NativeCodeModule, type NativeCodeSymbol, type NativeContinuationTarget, type NativeDebugAddressTranslation, type NativeDebugMemoryField, type NativeDebugMemoryFieldClassification, type NativeDebugMemoryMetadataSource, type NativeDebugMemoryObject, type NativeDebugMemoryPointerClassificationRequest, type NativeDebugMemoryPointerClassificationResult, type NativeDiscoveredUnwindFrame, type NativeEhFrameTextParseRequest, type NativeEhFrameTextParseResult, type NativeInheritedStdioPolicy, type NativeMappingMaterializationAction, type NativeMappingMaterializationRequest, type NativeMappingMaterializationResult, type NativeMappingMaterializationStep, type NativeMemoryMapping, type NativeMemoryMappingKind, type NativeMemoryRelocation, type NativeMemoryTranslationRequest, type NativeMemoryTranslationResult, type NativeMemoryWord, type NativeModeledPpollTimeoutRemainingTime, type NativeModeledPpollTimeoutState, type NativeModeledSleepTimerRemainingTime, type NativeModeledSleepTimerState, type NativePollTimeoutSyscallPolicy, type NativePpollTimeoutModelResult, type NativeProcessImageArchitecture, type NativeProcessImageDocumentInput, type NativeProcessImageDocuments, type NativeProcessImageJsonSchema, type NativeProcessImageManifest, type NativeProcessImageMappings, type NativeProcessImageRefusal, type NativeProcessImageRefusalCode, type NativeProcessImageRefusals, type NativeProcessImageResources, type NativeProcessImageThreads, type NativeProcessImageTranslation, NativeProcessImageValidationError, type NativeProcessResource, type NativeProcessResourceKind, type NativeRealUtilityCodeLocationRequest, type NativeRealUtilityCodeLocationResult, type NativeRealUtilityContinuationBoundary, type NativeRealUtilityContinuationPlan, type NativeRealUtilityContinuationRequest, type NativeRealUtilityContinuationStrategy, type NativeRealUtilityDeferredActiveSyscallLanding, type NativeRealUtilityExecutableRange, type NativeRealUtilityModuleExpectation, type NativeRealUtilityResolvedLocation, type NativeRealUtilitySemanticContinuationSelection, type NativeRealUtilitySourceModule, type NativeRealUtilitySyntheticContinuationSelection, type NativeRealUtilityTargetContinuationKind, type NativeRealUtilityTargetModule, type NativeRealUtilityTargetSemanticContinuation, type NativeRegisterState, type NativeRegisterTranslationRequest, type NativeRegisterTranslationResult, type NativeResourceTranslationRequest, type NativeResourceTranslationResult, type NativeSleepTimerDuration, type NativeSleepTimerModelResult, type NativeSleepTimerSyscallPolicy, type NativeStackFrame, type NativeStackSlot, type NativeStackTranslationRequest, type NativeStackTranslationResult, type NativeSyntheticContinuationByteEncoding, type NativeSyntheticContinuationByteSource, type NativeSyntheticContinuationCompletionDescriptor, type NativeSyntheticContinuationFailureExitBucket, type NativeSyntheticContinuationFailureExitBucketCondition, type NativeSyntheticContinuationFailureKind, type NativeSyntheticContinuationProvenanceSource, type NativeSyntheticContinuationRegister, type NativeSyntheticContinuationRegisterSetupAbi, type NativeSyntheticContinuationRegisterSetupDescriptor, type NativeSyntheticContinuationStackSetupDescriptor, type NativeSyntheticContinuationSyscallAbi, type NativeSyntheticContinuationTargetArch, type NativeSyntheticPpollCompletionMode, type NativeSyntheticPpollSyscallArgumentProvenance, type NativeSyntheticPpollSyscallCompletionProvenance, type NativeSyntheticPpollSyscallContinuation, type NativeSyntheticPpollSyscallContinuationProvenance, type NativeSyntheticPpollSyscallContinuationRequest, type NativeSyntheticPpollSyscallContinuationResult, type NativeSyntheticPpollSyscallProvenanceSource, type NativeSyntheticPpollSyscallRegisterSetupProvenance, type NativeSyntheticPpollSyscallStackSetupProvenance, type NativeSyntheticSleepCompletionMode, type NativeSyntheticSleepSyscallArgumentProvenance, type NativeSyntheticSleepSyscallCompletionProvenance, type NativeSyntheticSleepSyscallContinuation, type NativeSyntheticSleepSyscallContinuationProvenance, type NativeSyntheticSleepSyscallContinuationRequest, type NativeSyntheticSleepSyscallContinuationResult, type NativeSyntheticSleepSyscallProvenanceSource, type NativeSyntheticSleepSyscallRegisterSetupProvenance, type NativeSyntheticSleepSyscallStackSetupProvenance, type NativeSyntheticSyscallArgumentDescriptor, type NativeSyntheticSyscallContinuationDescriptor, type NativeSyntheticSyscallContinuationDescriptorPayload, type NativeSyntheticSyscallContinuationDescriptorRequest, type NativeSyntheticSyscallDescriptor, type NativeSyntheticTargetCallerFrame, type NativeSyntheticTargetCallerFramePlanRequest, type NativeSyntheticTargetCallerFramePlanResult, type NativeSyntheticTargetCallerFramePolicy, type NativeSyntheticTargetCallerFrameSlot, type NativeSyntheticTargetCallerFrameStatePolicy, type NativeTargetCalleeSavedPolicy, type NativeTargetCalleeSavedSlot, type NativeTargetEhFrameTextParseRequest, type NativeTargetEhFrameTextParseResult, type NativeTargetFrameRegisterValue, type NativeTargetFrameStateMaterialization, type NativeTargetFrameStateMaterializationRequest, type NativeTargetFrameStateMaterializationResult, type NativeTargetFrameStateRegister, type NativeTargetFrameStateRequirement, type NativeTargetFrameStateValueSource, type NativeTargetLandingDisassemblyProvenance, type NativeTargetLandingFdeProvenance, type NativeTargetLandingInstructionBoundary, type NativeTargetLandingInstructionBoundaryState, type NativeTargetLandingModuleProvenance, type NativeTargetLandingSectionProvenance, type NativeTargetLandingSymbolProvenance, type NativeTargetModuleByteMaterialization, type NativeTargetModuleByteMaterializationRequest, type NativeTargetModuleByteMaterializationResult, type NativeTargetResumeExecutionAttempt, type NativeTargetResumeExecutionAttemptStatus, type NativeTargetResumeExecutionMode, type NativeTargetResumeExecutionPlan, type NativeTargetResumeExecutionPlanRequest, type NativeTargetResumeExecutionPlanResult, type NativeTargetResumeExecutor, type NativeTargetResumeFaultBoundary, type NativeTargetResumeFaultClassification, type NativeTargetResumeFaultClassificationOptions, type NativeTargetResumeFaultClassificationResult, type NativeTargetResumeFaultRegisters, type NativeTargetResumeLandingInspectionRequest, type NativeTargetResumeLandingProvenance, type NativeTargetUnwindFrameMatch, type NativeTargetUnwindFrameRule, type NativeTargetUnwindMatchRequest, type NativeTargetUnwindMatchResult, type NativeTargetUnwindRegister, type NativeThreadState, type NativeThreadTranslation, type NativeUnwindFrameDiscoveryRequest, type NativeUnwindFrameDiscoveryResult, type NativeUnwindFrameRule, type NativeUnwindMetadataKind, type NativeUnwindRegister, type NativeUnwindStackWord, type OnLog, type OnOutputListener, type PackBundleOptions, type PackMinimalOptions, type PackRootfsOptions, type PackTinyBundleOptions, type PackWorkspaceOptions, ParseError, type PhaseLogEvent, type PidStatus, ProvisionError, type ProvisionOptions, type ProvisionResult, type PtyBootOptions, type PtyVmHandle, type RegistryEntry, RegistryError, type RestoreOptions, type RssTarget, type RunGcOptions, STATS_FILE_SIZE, type SandboxEntry, SandboxError, Sandboxes, SecretsError, type SnapshotEngine, SnapshotError, type SnapshotFileIdentity, type SnapshotMeta, type SnapshotOptions, type SnapshotResult, Supervisor, type SupervisorOptions, type VmHandle, type VmstateBackend, type VmstateSnapshotMeta, VsockExec, type VsockExecOptions, type VsockExecPtyHandle, type VsockExecPtyOptions, type VsockExecPtyResult, type VsockExecResult, VsockFiles, type VsockFilesOptions, VsockSecrets, type VsockSecretsOptions, VsockWinsize, type VsockWinsizeOptions, WinsizeError, type WriteFileOptions, _internal, assertNativeProcessImageDocuments, attach, autoSizeMemoryMib, boot, bootPty, bootSnapshotPath, buildMachinenConfig, buildNativeCodeMap, buildNativeSyntheticPpollSyscallContinuation, buildNativeSyntheticSleepSyscallContinuation, buildNativeSyntheticSyscallContinuationDescriptor, buildWriteFileCmd, buildWriteFileCmds, checkForkBackpressure, classifyNativeActiveSyscalls, classifyNativeDebugMemoryPointers, classifyNativeTargetResumeExecutionAttempt, classifyNativeThreadSyscall, detachedLogRoot, discoverNativeUnwindFrames, ensureMountDiskImage, ensureMountDiskUpper, ensureRootfsImage, formatMachinenError, inspectNativeTargetResumeLanding, inventoryNativeActualTargetModules, inventoryNativeSourceCodeModules, isMachinenError, isNativeProcessImageBundle, list, markMountDiskImageClean, markRootfsImageClean, matchNativeTargetUnwindFrame, materializeNativeTargetModuleBytes, measureFirstByte, packBundle as mkinitramfsBundle, cli as mkinitramfsCli, packMinimal as mkinitramfsMinimal, packRootfs as mkinitramfsRootfs, packTinyBundle as mkinitramfsTinyBundle, packWorkspace as mkinitramfsWorkspace, modelNativePpollTimeoutState, modelNativeSleepTimerState, mountdiskImgCacheDir, nativeProcessImageArchitectures, nativeProcessImageRefusalCodes, nativeProcessImageSchemas, nativeSyntheticContinuationBytesHex, nativeSyntheticContinuationBytesSha256, nativeSyntheticContinuationDescriptorSha256, nativeSyntheticExitProcessSuffix, nativeSyntheticRestartLikeErrnos, nativeSyntheticSyscallFailureExitBuckets, nativeTargetResumeLandingRefusals, nativeUnwindReturnAddressSlot, parseNativeEhFrameText, parseNativeTargetEhFrameText, planNativeActualRealUtilityContinuationAttempt, planNativeMappingMaterialization, planNativeRealUtilityContinuationAttempt, planNativeSyntheticTargetCallerFrame, planNativeTargetFrameStateMaterialization, planNativeTargetResumeExecution, provision, readBalloonStats, readHostFreeBytes, readHostRssBytes, readHostRssBytesMulti, readHostTotalBytes, registryRoot, resolveBaseDtb, resolveBaseKernel, resolveBaseRootfs, resolveMke2fs, resolveMksquashfs, resolveNativeRealUtilityCodeLocations, resolveVmmBinary, restore, rootfsImgCacheDir, runGc, translateNativeMemory, translateNativeRegisterState, translateNativeResources, translateNativeStack, validateNativeProcessImageBundle, validateNativeProcessImageDocuments, validatePid, warmImageConfigCache, writeBootSnapshot };
|