https://trustworthy.systems
The Formally Verified seL4 Microkernel
Gernot Heiser | gernot.heiser@data61.csiro.au | @GernotHeiser
- RTCSA Keynote, Aug’20
The Formally Verified seL4 Microkernel High-Assurance Foundation - - PowerPoint PPT Presentation
The Formally Verified seL4 Microkernel High-Assurance Foundation for MCS Gernot Heiser | gernot.heiser@data61.csiro.au | @GernotHeiser RTCSA Keynote, Aug20 https://trustworthy.systems What Is Needed For Mixed-Criticality? During a
https://trustworthy.systems
Gernot Heiser | gernot.heiser@data61.csiro.au | @GernotHeiser
During a review process, ca Aug’17:
“A mixed-critical system […] supports the execution of safety-critical, mission- critical, and non-critical software within a single, secure compute platform.” [Barhorst’09]
Criticality of a component is defined by the impact of failure:
Certification of critical component must not depend on behaviour of less critical components ⇒ must prevent any interference by less critical components!
RTCSA Keynote, Aug'20 4 |
Operating System
Modify data Affect timing
RTCSA Keynote, Aug'20 6 |
RTCSA Keynote, Aug'20 7 |
Processor Device Driver Device Driver Device Driver NW Stack Device Driver Device Driver File System Process Mgmt Memory Mgmt App App App
IPC
VM Linux App App App VMM Microkernel = context-switching engine Hypervisor Microkernel
RTCSA Keynote, Aug'20 8 |
err = method( cap, args ); Obj reference Access rights
write, send, execute…
address space
Proof
P r
Proof Proof Proof
Functional correctness: C code only behaves as specified Model enforces isolation Translation validation: Binary retains C-code semantics Limitations (work in progress):
RTCSA Keynote, Aug'20 9 |
Proof? Rewrite Rules C Source Binary Code Formalised C Formalised Binary Graph Language Graph Language
10 RTCSA Keynote, Aug'20
Target of functional correctness proof Proof Formal C Semantics Proof SMT Solver De- compiler Proof Formal ISA Spec Compiler Symbol Tables Proof
RTCSA Keynote, Aug'20 11 |
RTCSA Keynote, Aug'20 12 |
Thread-ObjectA CNodeA1 EP Thread-ObjectB CNodeB1 CNodeA2 VSpace VSpace CSpace CSpace Send Receive PDA PTA1
FRAME FRAME
...
... ... ... ... ...
CONTEXT CONTEXT
A B >50 capabilities for trivial program!
Send Receive
A B
RTCSA Keynote, Aug'20 13 |
RTCSA Keynote, Aug'20 14 |
Comp A Comp C Comp B Semaphore Shared memory RPC
Interface Component Connector
RTCSA Keynote, Aug'20 15 |
Comp A Comp B RPC
RTCSA Keynote, Aug'20 16 |
Security enforcement: Linux only sees encrypted data
RTCSA Keynote, Aug'20 17 |
Architecture specification language
CNode EP CNode CSpace CSpace Send Receive
... ...
CONTEXT CONTEXT
VSpace
capDL
+ pr
Thread Object Thread Object VSpace
A B
Low-level access rights
Radio Driver Crypto CAN Driver Data Link Uncritical/ untrusted, contained Linux Camera Wifi
driver.c VMM.c glue.c Compiler/ Linker binary init.c Conditions apply
RTCSA Keynote, Aug'20 18 |
Unmanned Little Bird (ULB) Autonomous trucks
RTCSA Keynote, Aug'20 19 |
Program binary Control Flow Graph Loop bounds Micro- architecture model Integer linear equations Infeasible path info WCET ILP solver Analysis tool
20
Proved at C level, transferred to binary though translation- validation toolchain
RTCSA Keynote, Aug'20 21 |
RTCSA Keynote, Aug'20 22 |
Critical: Control loop Sensor readings Untrusted: NW driver NW interrupts
Runs frequently but for short time (order of µs) Runs every 100 ms for few millisecods
RTCSA Keynote, Aug'20 23 |
Critical Less critical Vehicle Control Navigation Shared Data Vehicle control must see consistent state Updates
RTCSA Keynote, Aug'20 24 |
Control P1 Server PS Navig. P2 Single-threaded, guarantees atomicity Communication endpoint (port) Who pays for server time?
Implements immediate priority ceiling protocol (IPCP) if PS ≥ max (P1, P2)
RTCSA Keynote, Aug'20 25 |
Not runnable if null Not runnable if null Scheduling context object
Limits CPU access – sporadic server
Enables reasoning about time and temporal isolation for mixed-criticality systems
C = 2 T = 3 Capability for time
RTCSA Keynote, Aug'20 26 |
Runs every 100 ms for few millisecods Runs frequently but for short time (order of µs) Control loop P = low Sensor readings NW driver P = high NW interrupts C = 2 T = 3 Utilisation = 67% C = 25,000 T = 100,000 Utilisation = 25%
Client1 P1
RTCSA Keynote, Aug'20 27 |
Server PS Running Running Server runs on client’s scheduling context Client is charged for server’s time Client2 P2 Timeout exception to deal with budget exhaustion
RTCSA Keynote, Aug'20 29 |