Skip to content

Improve support for program reset#342

Merged
nspin merged 22 commits into
seL4:mainfrom
nspin:pr/improve-reset
Apr 28, 2026
Merged

Improve support for program reset#342
nspin merged 22 commits into
seL4:mainfrom
nspin:pr/improve-reset

Conversation

@nspin
Copy link
Copy Markdown
Member

@nspin nspin commented Apr 28, 2026

#167 added support for resettable protection domains.

This PR generalizes this to support for resettable programs in general. This PR also improves upon previous reset support by reducing how invasive the sel4-reset crate is. For example, after this PR, *-resettable.json target specs are not necessary.

This PR also introduces a new, simpler way of patching ELF files. Before this PR, all ELF patching in this project used the sel4-synthetic-elf crate which creates a new ELF file including the data of the original ELF file plus new data. This PR introduces a new approach, where the program to be patched ensures the presence of some extra program header slots (via elfnotes), and the patching tool just modifies the ELF file by replacing those spare program header slots with new program headers pointing to new segments, whose data is appended to the original file. This new approach is much simpler than the old approach. The only downside of the new approach is that it makes assumptions about how the linker handles elfnotes.

This PR also adds a test for sel4-reset using the new minimal Linux runtime.

This PR moves sel4-reset out of ./crates/experimental up into ./crates.

nspin added 22 commits April 28, 2026 02:18
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
For compatibility with sel4-reset

Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Back to ImmutableCell

Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
Signed-off-by: Nick Spinale <nick@nickspinale.com>
@nspin nspin merged commit 15cb731 into seL4:main Apr 28, 2026
14 checks passed
@nspin nspin deleted the pr/improve-reset branch April 28, 2026 09:51
@nspin nspin mentioned this pull request May 15, 2026
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