Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying notify or ppcalls on a per-channel, not per-protection domain basis #217

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

midnightveil
Copy link
Contributor

@midnightveil midnightveil commented Sep 4, 2024

Also fixes #168, as this allows us enough precision to check priorities.

Can specify pp="true" or notify="false" (or vice-versa, for the defaults):

<?xml version="1.0" encoding="UTF-8"?>
<system>
    <protection_domain name="test1">
        <program_image path="test" />
    </protection_domain>
    <protection_domain name="test2">
        <program_image path="test" />
    </protection_domain>

    <channel>
        <end pd="test1" id="0" pp="true" notify="false" />
        <end pd="test2" id="5" />
    </channel>
</system>

ToDo:

  • Parsing tests
  • Behaviour tests (it works on at least one system, but...)
  • Probably documentation of changes (where?)
  • Enforcing ppcall priority invariant
  • Syntax bikeshedding

@midnightveil midnightveil force-pushed the channel-extensions branch 2 times, most recently from 8a5a239 to 6e639d1 Compare September 4, 2024 00:47
@Ivan-Velickovic
Copy link
Collaborator

The first two commits look good, I'll review the main commit once the PR is ready for review.

@midnightveil midnightveil force-pushed the channel-extensions branch 2 times, most recently from cc4c48c to af11b68 Compare September 4, 2024 05:03
tool/microkit/src/sdf.rs Outdated Show resolved Hide resolved
@midnightveil midnightveil marked this pull request as ready for review September 4, 2024 10:32
@midnightveil midnightveil force-pushed the channel-extensions branch 5 times, most recently from c4d897e to 73e8f47 Compare September 5, 2024 01:52
@Ivan-Velickovic Ivan-Velickovic force-pushed the channel-extensions branch 5 times, most recently from 6952a46 to 73e8f47 Compare October 23, 2024 00:10
Turns a runtime invariant into a compile-time invariant.

Signed-off-by: julia <[email protected]>
Previously this resulted in a panic with Option::unwrap() on a None

Signed-off-by: julia <[email protected]>
Previously, this was done on a per-protection domain basis, which
meant that protection domains were given more rights than was strictly
necessary. This also allows for authors to remove rights for sending
notifications on either end of the channel, and so allows for having
unidirectional notification channels.

This removes the previous `pp="true"` attribute on PDs (the one you
would PPC *into*), replacing it with `pp="true/false" and
`notify="true/false"` on each channel end.

So the following:
```
<protection_domain name="sender" [...] />
<protection_domain name="receiver" pp="true" [...] />
<channel>
  <end id="0" pd="sender"   />
  <end id="0" pd="receiver" />
</channel>
```

Becomes instead:
```
<protection_domain name="sender" [...] />
<protection_domain name="receiver" [...] />
<channel>
  <end id="0" pd="sender" pp="true"  />
  <end id="0" pd="receiver"          />
</channel>
```

Signed-off-by: julia <[email protected]>
As per the Microkit manual,

> A protected call is only possible if the callee has strictly higher
> priority than the caller.

Due to the change to specify `pp="true"` in the SDF in the previous
commit, we can now verify that the priority invariant holds true,
instead of it being possible to create a system with this behaviour.

Signed-off-by: julia <[email protected]>
Signed-off-by: Ivan-Velickovic <[email protected]>
@Ivan-Velickovic Ivan-Velickovic merged commit d4d08d3 into seL4:main Oct 23, 2024
11 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.

Tutorial: part4 ppcall from VMM to less prioritized Wordle_server
2 participants