Closed 0152la closed 2 years ago
Can we squash this down to a smaller number of commits before review? Please force push an update if so.
Ok, it seems I fixed it.
I will admit that I'm not quite sure what "patch" means here. I think it means something like "switch the VDSO stuff"? But I might be very wrong!
I will admit that I'm not quite sure what "patch" means here. I think it means something like "switch the VDSO stuff"? But I might be very wrong!
Was this comment meant to come alongside some particular code, or what is it referring to particularly?
Was this comment meant to come alongside some particular code, or what is it referring to particularly?
It's a general comment: I saw "patch" mentioned a few times and wasn't quite sure what it meant. I need to read the new README to see if that clears things up.
What do we mean by "map"? Do we mean "create a compartment" or "narrow the DDC" or ... ?
Between the two, map would be the former. More specifically, it means that we take the ELF data needed to execute the binary (i.e., LOAD
segments) and map them into memory, such that we can then execute them.
I think this PR does do "transition into a compartment" but I don't think it does "transition to the manager or another compartment"?
It does transition to the manager
in the sense of transitioning when needed for the intercepted functions and when the compartment execution is complete. It doesn't in the sense that the compartment can't ask the manager to do something. It also doesn't transition to another compartment, as there is a single compartment modelled at the moment.
Ready for review.
That's everything from my POV. @jacobbramley anything?
No, LGTM!
Please squash.
Squashed.
bors r+
Build succeeded:
Improve the compartment transition process. This includes storing required information upon entering a compartment, intercepting functions within the compartment which need special privileges (e.g., vDSO functions, memory allocation), and restoring the manager state when returning from the compartment. Of particular interest should be
comp_add_intercept
changes withincompartment.c
and the code intransition.S
(where all assembly has been moved for readability).Some particular comments of interest are regarding the procedure call standard, and ensuring registers are correctly used.
This is currently a draft, as
buildbot
stuff needs updating.