Skip to content

fix(dm): bind fork_delta to a dm pool's metadata - #175

Merged
markovejnovic merged 5 commits into
mainfrom
fix/dm-table-and-fork-delta
Nov 16, 2026
Merged

markovejnovic merged 5 commits into
mainfrom
fix/dm-table-and-fork-delta

Conversation

@markovejnovic

@markovejnovic markovejnovic commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

DevPath is now a validated newtype. It refuses any path holding Unicode
whitespace or byte 0xA0 (the kernel's isspace splits table operands on it),
and any path under /dev/mapper/, which renders identically to an
Origin::Device and flipped its paths()/devices() role on re-parse.
Summing mapping lengths panicked in debug and wrapped in release, where a
wrapped total could match mapped_blocks and pass the truncation check.
thin_fork_delta ran thin_dump on whatever loop device the caller named, so a
foreign pool's metadata silently forked the wrong blocks (and the fork flock
was taken on that foreign device). ThinPool now exposes its live table's
<metadata dev>, and the fork refuses a meta whose device number differs,
before any snapshot is taken.

read_full also retries io::ErrorKind::Interrupted instead of aborting the
fork, as std's Read contract requires.
@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Test Results

    4 files  ±  0    263 suites  +22   2m 51s ⏱️ -19s
1 255 tests + 90  1 255 ✅ +90    0 💤 ± 0  0 ❌ ±0 
1 805 runs  +133  1 255 ✅ +90  550 💤 +43  0 ❌ ±0 

Results for commit da42cd6. ± Comparison against base commit e2764c3.

This pull request removes 2 and adds 92 tests. Note that renamed tests count towards both.
Elixir.Hyper.Grpc.CodecTest ‑ test to_grpc/1 response encoding a created result carries the vm_id and node string
Elixir.Hyper.Node.FireVMM.AgentHostileTest ‑ test a hostile reply ends the call within the deadline as an error, and closes the connection
Elixir.Hyper.Grpc.CodecTest ‑ test from_grpc/1 LoadImageRequest an exec request needs an argv
Elixir.Hyper.Grpc.CodecTest ‑ test from_grpc/1 LoadImageRequest an exec request passes its timeout only when set
Elixir.Hyper.Grpc.CodecTest ‑ test to_grpc/1 response encoding a created result carries the vm_id, node string and IPv6 address
Elixir.Hyper.Grpc.CodecTest ‑ test to_grpc/1 response encoding an executed result carries the exit code and both streams
Elixir.Hyper.Grpc.CodecWirePropertiesTest ‑ property a cmdline carrying any byte outside printable ASCII, or a quote, is refused
Elixir.Hyper.Grpc.CodecWirePropertiesTest ‑ property a port rule is accepted exactly when its protocol and ascending range are valid
Elixir.Hyper.Grpc.CodecWirePropertiesTest ‑ property an unrecognised error reason is INTERNAL with a fixed message
Elixir.Hyper.Grpc.CodecWirePropertiesTest ‑ property appending a reserved argument to any accepted cmdline makes it refused
Elixir.Hyper.Grpc.CodecWirePropertiesTest ‑ property every instance_type/arch integer decodes or is refused with its specific reason
Elixir.Hyper.Grpc.CodecWirePropertiesTest ‑ test a direction of 128 rules is accepted and 129 is refused
…

♻️ This comment has been updated with latest results.

Pull the thin-pool table parse out of ThinPool::open so the unprivileged
suite pins which tables name a metadata device. Add a confinement law to
the copy_ranges suite: every read is non-empty and inside one listed
range, which catches read_full asking for more once its buffer is full.
The root-only metadata-device check is excluded, naming its _as_root
killer.
@markovejnovic
markovejnovic marked this pull request as ready for review November 16, 2026 02:24
@markovejnovic markovejnovic changed the title fix(dm): make DmTable render/parse a true inverse; bind fork_delta to the pool's metadata fix(dm): bind fork_delta to a dm pool's metadata Nov 16, 2026
@markovejnovic
markovejnovic merged commit 175bfce into main Nov 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant