capablevms / CHERI-ELF-comp

Other
4 stars 1 forks source link

First inter-compartment call implementation #10

Closed 0152la closed 1 year ago

0152la commented 1 year ago

Main feature is two new added tests, test_two_comps and test_two_comps_inter_call. The former loads and maps two compartments in memory, then consecutively calls a function in each of them, while the latter loads and maps two compartments in memory, calling a function in the first one, which itself calls a function in the second one.

Additionally move more configuration file-related functionality in the library: now we only need the binary (i.e., compartment) file name, and we then derive the filename and load the configuration information.

During this, I stumbled across a number of TODOs (and added some more related to questionable code). I think the scope of this PR is sufficient as is (as it is a rather major feature by itself, even if limited in code changes), and plan on addressing some of these TODOs in the next step; I am happy to fold maybe at least some of them, directly related to multiple compartment support, in this PR, if we think that is better.

ltratt commented 1 year ago

All looks good to me. In terms of the TODOs, I'd suggest that we tackle them only if we need them for other features. AFAIK the major remaining feature is PIE? But that might require de-CheriBSDing things AIUI?

bors r+

bors[bot] commented 1 year ago

Build failed:

0152la commented 1 year ago

AFAIK the major remaining feature is PIE?

I think so; the next step will be the producer / consumer example in lua, which I expect should "just work". However, before I tackle that, I will check to see if this works on Morello Linux, as we discussed yesterday, and also add some brief profiling.

ltratt commented 1 year ago

Sounds good to me!

0152la commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here. For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

0152la commented 1 year ago

Ready for review.

ltratt commented 1 year ago

Please squash.

0152la commented 1 year ago

Squashed (also the initial three commits, as two of them were rather minor).

ltratt commented 1 year ago

bors r+

bors[bot] commented 1 year ago

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here. For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.