~james/split

refactor(layout): relocate proof guest and host build inputs

commit
97648de5fc3014ea94b67db47246bfa31f71f5f3 browse tree
parent
36fd34c5221ae47ee29e89ecfbab8662ab4fd6f5
author
james <j@cpl0.zip>
signature
Verified ~james signed with a key registered by ~james
date
2026-08-31 16:48 UTC

18 files changed, +18 −18

Makefile modified

@@ -12,46 +12,46 @@ all: build/loader.img
1212 build:
1313 mkdir -p build
1414
15-build/pager.o: pager.c split.h | build
15+build/pager.o: guest/pager.c guest/split.h | build
1616 $(CC) $(CFLAGS) -c $< -o $@
1717
18-build/alpha.o: client.c split.h | build
18+build/alpha.o: guest/client.c guest/split.h | build
1919 $(CC) $(CFLAGS) -DCLIENT=0 -c $< -o $@
2020
21-build/beta.o: client.c split.h | build
21+build/beta.o: guest/client.c guest/split.h | build
2222 $(CC) $(CFLAGS) -DCLIENT=1 -c $< -o $@
2323
24-build/unsafe.o: pager.c split.h | build
24+build/unsafe.o: guest/pager.c guest/split.h | build
2525 $(CC) $(CFLAGS) -DSHARED_WRITE=1 -c $< -o $@
2626
2727 build/%.elf: build/%.o
2828 $(LD) -L$(BOARD)/lib $< -lmicrokit -Tmicrokit.ld -o $@
2929
30-build/loader.img: build/pager.elf build/alpha.elf build/beta.elf split.system
31- MICROKIT_SDK=$(SDK) $(TOOL) --board qemu_virt_aarch64 --config debug --search-path build -o $@ -r build/report.txt split.system
30+build/loader.img: build/pager.elf build/alpha.elf build/beta.elf guest/split.system
31+ MICROKIT_SDK=$(SDK) $(TOOL) --board qemu_virt_aarch64 --config debug --search-path build -o $@ -r build/report.txt guest/split.system
3232
33-build/unsafe.img: build/unsafe.elf build/alpha.elf build/beta.elf split.system
34- sed 's/pager.elf/unsafe.elf/' split.system > build/unsafe.system
33+build/unsafe.img: build/unsafe.elf build/alpha.elf build/beta.elf guest/split.system
34+ sed 's/pager.elf/unsafe.elf/' guest/split.system > build/unsafe.system
3535 MICROKIT_SDK=$(SDK) $(TOOL) --board qemu_virt_aarch64 --config debug --search-path build -o $@ -r build/unsafe.txt build/unsafe.system
3636
3737 proof:
38- isabelle build -D .
38+ isabelle build -D proof
3939
40-build/split.ml: Export.thy Reuse.thy Snapshot.thy Execution.thy Protocol.thy Isolation.thy Model.thy ROOT | build
41- isabelle build -D .
42- isabelle export -n -d . -O build/generated -x 'Split.Export:code/**' Split
40+build/split.ml: proof/Export.thy proof/Reuse.thy proof/Snapshot.thy proof/Execution.thy proof/Protocol.thy proof/Isolation.thy proof/Model.thy proof/ROOT | build
41+ isabelle build -D proof
42+ isabelle export -n -d proof -O build/generated -x 'Split.Export:code/**' Split
4343 cp build/generated/Split.Export/code/split.ocaml $@
4444
45-build/check: build/split.ml check.ml Makefile
45+build/check: build/split.ml host/check.ml Makefile
4646 ocamlopt -w -a -I build -c build/split.ml
47- ocamlopt -w +a-4-42-70 -I +unix -I build -c -o build/check.cmx check.ml
47+ ocamlopt -w +a-4-42-70 -I +unix -I build -c -o build/check.cmx host/check.ml
4848 ocamlopt -I +unix -I build unix.cmxa build/split.cmx build/check.cmx -o $@
4949
5050 model: build/check
5151 build/check --model
5252
5353 work: all build/check
54- build/check work document
54+ build/check work example/document
5555
5656 demo run: work
5757

README.md modified

@@ -1,3 +1,3 @@
11 Split gives two seL4 workers private configuration snapshots through a userspace pager that copies shared pages on first write and scrubs discarded frames before reuse, with an Isabelle model exported to OCaml for checking guest memory operations.
22
3-[![Watch the seL4 showcase](media/poster.png)](media/split.mp4)
3+https://github.com/user-attachments/assets/7301c6cf-f13c-49f5-9c92-14049c07c3ef

document → example/document renamed

client.c → guest/client.c renamed

pager.c → guest/pager.c renamed

split.h → guest/split.h renamed

split.system → guest/split.system renamed

check.ml → host/check.ml renamed

@@ -384,7 +384,7 @@ let work image path =
384384 done)
385385
386386 let exercise () =
387- let original = load "document" in
387+ let original = load "example/document" in
388388 let g = launch "build/loader.img" original in
389389 Fun.protect ~finally:(fun () -> close g) (fun () ->
390390 let physicals () =
@@ -475,7 +475,7 @@ let () =
475475 match Array.to_list Sys.argv with
476476 | [_; "--model"] -> selftest ()
477477 | [_; "--test"] -> exercise ()
478- | [_] | [_; "work"] -> work "build/loader.img" "document"
478+ | [_] | [_; "work"] -> work "build/loader.img" "example/document"
479479 | [_; "work"; path] -> work "build/loader.img" path
480480 | _ -> invalid_arg "usage: check work DOCUMENT"
481481 with

Execution.thy → proof/Execution.thy renamed

Export.thy → proof/Export.thy renamed

Isolation.thy → proof/Isolation.thy renamed

Model.thy → proof/Model.thy renamed

Protocol.thy → proof/Protocol.thy renamed

ROOT → proof/ROOT renamed

Reuse.thy → proof/Reuse.thy renamed

Snapshot.thy → proof/Snapshot.thy renamed

microkit.patch → tools/microkit.patch renamed

setup.sh → tools/setup.sh renamed