-
Notifications
You must be signed in to change notification settings - Fork 3
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
smartmeter demo (CHERIoT device bits) #20
base: main
Are you sure you want to change the base?
Conversation
285556b
to
778c515
Compare
Looks like I cannot push to this branch. Here's a slightly different design to highlight the security guarantees of CHERIoT against a system that has no compartmentalization:
The grid controller and provider each run a thread for receiving data in the form of MQTT messages, and the provider runs a thread for sending accumulated consumption information. The javascript VM has FFI functions to access
On a system with no security features, a user can write a javascript program that abuses the set load consumptions or set battery charge/discharge functions to specify an arbitrary 32-bit index to update any value in the memory. With CHERIoT, each of the above components can be specified as a separate compartment and as a result, the user compartment that has the javascript VM cannot access/update arbitrary memory using the index value in the set load consumptions/set battery charge/discharge functions. Note that the grid controller is optional for this security feature demonstration and can potentially be removed to simplify the design. |
This should allow making the demo more interesting
Also change the name of CHERIOT_SDK env variable to CHERIOT_RTOS_SDK to avoid confusion with --sdk option to xmake.
Also set default board for smart_meter demo to sonata-1.1.
We self-check for validity only if debugging is turned on, and how odd that '-' isn't in the spec's permitted set (3.1.3.1, MQTT-3.1.3-5).
Works after CHERIoT-Platform/cheriot-rtos#461
On monolithic builds, move the sensor data and the userJS data snapshot objects into (the one compartment's) globals. This should make it possible, in a monolithic build, for a cap held in the JS machine to be abused to write to the sensor data.
55392af
to
a7e3fc5
Compare
Place sensitive and non-sensitive structures not just in the same .data segment but as subobjects of the same struct. This subverts CHERIoT-LLVM's understanding of properly bounding address-taken globals and permits subobject bounds violtion to model code running on a pre-CHERI machine.
Defaults to 'random' which causes the device to generate a random ID on boot.
106b4bd
to
fa09d89
Compare
This means we can now have user js talk to esp32 over uart.
Update CHERIoT readme and dox in light of changes here, too
No description provided.