Skip to content

Commit

Permalink
Fix typo, link to network stack example.
Browse files Browse the repository at this point in the history
vim is to be blamed for typo.

Also add a link to the network stack module and examples, as they are a
great demonstration of the auditing tool.

Signed-off-by: Hugo Lefeuvre <[email protected]>
  • Loading branch information
hlef authored and davidchisnall committed Oct 24, 2024
1 parent 922915f commit c5f6158
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ You can use this with queries that introspect a firmware image.
For example, if you wanted to see which compartments in the test suite can allocate memory, you might use this query:

```sh
$ cheriot-audit --board path/to/cheriot-rtos/sdk/boards/sail.json i\
$ cheriot-audit --board path/to/cheriot-rtos/sdk/boards/sail.json \
-j /path/to/cheriot-rtos/tests/build/cheriot/cheriot/release/test-suite.json \
-q '[ { "owner": owner, "capability": data.rtos.decode_allocator_capability(c) } | c = input.compartments[owner].imports[_] ; data.rtos.is_allocator_capability(c) ]'
[{"capability":{"quota":1024}, "owner":"allocator_test"}, {"capability":{"quota":1048576}, "owner":"allocator_test"}, {"capability":{"quota":4096}, "owner":"eventgroup_test"}, {"capability":{"quota":4096}, "owner":"locks_test"}, {"capability":{"quota":4096}, "owner":"multiwaiter_test"}, {"capability":{"quota":4096}, "owner":"queue_test"}, {"capability":{"quota":4096}, "owner":"thread_pool_test"}]
Expand Down Expand Up @@ -109,6 +109,10 @@ true

This includes checks that the interrupt controller is accessible only by the scheduler, that the hardware revoker (if one exists) is exclusive to the allocator, that all allocator capabilities are valid, and a few other things.

### Other Examples

- The network stack ships with a [module](https://github.com/CHERIoT-Platform/network-stack/blob/main/network_stack.rego) and a set of [additional examples](https://github.com/CHERIoT-Platform/network-stack?tab=readme-ov-file#auditing).

Built ins
---------

Expand Down

0 comments on commit c5f6158

Please sign in to comment.