https://trustworthy.systems
Verified seL4 on Secure RISC-V Processors
Gernot Heiser | gernot.heiser@data61.csiro.au | @GernotHeiser
- LCA, Gold Coast, QLD, 2020-01-15
Verified seL4 on Secure RISC-V Processors and Other News in seL4 - - PowerPoint PPT Presentation
Verified seL4 on Secure RISC-V Processors and Other News in seL4 Land Gernot Heiser | gernot.heiser@data61.csiro.au | @GernotHeiser LCA, Gold Coast, QLD, 2020-01-15 https://trustworthy.systems What is seL4? A 30-Year Dream 3 | LCA |
https://trustworthy.systems
Gernot Heiser | gernot.heiser@data61.csiro.au | @GernotHeiser
LCA | Gold Coast | Jan'20 3 |
LCA | Gold Coast | Jan'20 4 |
LCA | Gold Coast | Jan'20 5 |
L3→L4 “X” Hazelnut Pistachio L4/Alpha L4/MIPS OKL4-µKernel OKL4-Microvisor Codezero P4 → PikeOS Fiasco Fiasco.OC L4-embed. Nova GMD/IBM/Karlsruhe UNSW/NICTA/Data61 Dresden Other (commercial) OK Labs
API Inheritance Code Inheritance
93 94 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12
seL4: The latest member of the L4 microkernel family
Qualcomm modem chips iOS secure enclave
LCA | Gold Coast | Jan'20 6 |
Processor Device Driver Device Driver Device Driver NW Stack Device Driver Device Driver File System Process Mgmt Memory Mgmt App App App
Strong Isolation Device drivers, file systems, crypto, power management, virtual-machine monitor are all usermode processes
IPC
Controlled Communication
VM Linux App App App VMM Microkernel = context-switching engine Hypervisor Microkernel
seL4 Summit | DC | Sep'19 7 |
Obj reference Access rights
Capability = Access Token: Prima-facie evidence of privilege
write, send, execute…
Capabilities provide:
control
information flow
address space
Object
LCA | Gold Coast | Jan'20 8 |
GPL v2 TS kernel source GPL v2 kernel.org source
TS system services: libs, drivers, file systems, NW stacks, tools, … BSD Your code (applications) any… GPL v2 Platform port:
GPL v2 Platform port:
Your system services any… GPL v2 Your system services Your code (applications) any…
Valuable IP Valuable IP Boiler plate Boiler plate
Details: https://microkerneldude.wordpress.com
LCA | Gold Coast | Jan'20 9 |
Unmanned Little Bird (ULB) Autonomous trucks
Cross-Domain Desktop Compositor Secure Comms Dongle DARPA HACMS: Retrofit existing system! DARPA HACMS: Retrofit existing system!
Abstract Model
P r
C Imple- mentation
Proof
Confidentiality Availability Binary code
Proof Proof Proof
Functional correctness: C code only behaves as specified Model enforces security Translation validation: Binary retains C-code semantics Limitations (work in progress):
Sound worst-case execution time bound
LCA | Gold Coast | Jan'20 11 |
Integrity
LCA | Gold Coast | Jan'20 13 |
Munich-based startup
Crypto Secured app File server Untrusted app Disclosure: I have an interest in HENSOLDT Cyber
Arch x86 32b x86 64b Arm 32b Arm 64b Intra address space 427 565 625 752 Inter address space 752 1041 625 752
Arch x86 32b x86 64b Arm 32b Arm 64b RISC-V 64b Intra address space 427 565 625 752 690 Inter address space 752 1041 625 752 1006 Message-passing round-trip latency in cycles
LCA | Gold Coast | Jan'20 14 |
Spectre-workaround disabled (else much more expensive) No ASIDS on HiFive Unleashed, else inter-AS would be same as intra-AS Not yet fully optimised!
Hypervisor extensions (draft spec 0.5) supported in branch
Abstract Model
P r
C Imple- mentation
Proof
Confidentiality Availability Binary code
Proof Proof Proof
Functional correctness: RISC-V due Q1’20 Translation validation: RISC-V due Q2’20 Sound WCET bound RISC-V in progress
LCA | Gold Coast | Jan'20 15 |
Integrity
LCA | Gold Coast | Jan'20 16 |
M mode Firmware S mode (Guest) OS U mode apps HS mode hypervisor VU mode VMM
Classical thread attributes
LCA | Gold Coast | Jan'20 17 |
Not runnable if null Not runnable if null Scheduling context object
Limits CPU access!
Enables reasoning about time and temporal isolation for mixed-criticality systems
C = 2 T = 3 C = 250 T = 1000 Capability for time
LCA | Gold Coast | Jan'20 18 |
Q1’20
Spec C Binary
Proof Proof
Q2’20 Q2’20 Q2’20
Spec C Binary
Proof Proof
Spec C Binary
Proof Proof
Spec C Binary
Proof Proof
Merge Merge
Q1’20
seL4 Summit | DC | Sep'19 20 |
An “unknown unknown” until recently A “known unknown” for decades
seL4 Summit | DC | Sep'19 21 |
High Low
Affect execution speed Shared hardware
architectural features
HW is capacity-limited
Any state-holding microarchitectural feature:
seL4 Summit | DC | Sep'19 22 |
High Low
Affect execution speed Shared hardware
seL4 Summit | DC | Sep'19 23 |
High Low Cache Flush Temporally partition Cannot spatially partition on- core caches (L1, TLB, branch predictor, pre-fetchers)
Cache High Low High Low Cache Spatially partition Flushing useless for concurrent access
Need both! Need both!
seL4 Summit | DC | Sep'19 24 |
seL4 Summit | DC | Sep'19 25 |
Cache RAM
⇒ colouring userland colours dynamic kernel memory
[Ge et al. EuroSys’19] High Low
TCB PT PT TCB
seL4 Summit | DC | Sep'19
Latency depends
Time padding to Remove dependency Ensure deterministic execution
Must remove any history dependence!
26 |
seL4 Summit | DC | Sep'19 27 |
Intel branch history buffer
0 1
10-1 10-3 10-2 10-4 10-5 400 600 800 1000 Trojan signal Spy execution time
HiSilicon A53 branch history buffer
Small channel! Channel!
ISA is purely functional contract, abstracts too much away
seL4 Summit | DC | Sep'19 28 |
New contract (augmented ISA): All shared HW resources must be spatially or temporally partitionable by OS [Ge et al, APSys’18] RISC-V to the rescue: Strong commitment to making it happen!
Security Standing Committee
“most secure architcture”
Privspec TC (now Standing Committee) Privileged Spec Tech Committee
well received
addressing our issues
progress soon
LCA | Gold Coast | Jan'20 30 |
Aims:
seL4 Summit | DC | Sep'19 31 |
LCA | Gold Coast | Jan'20 32 |
seL4 Foundation seL4 Board
seL4 Fund Charter seL4 Directed Fund $$
LF Projects LLC seL4 Series LLC
https://sel4.systems seL4 Technical Charter Technical Project seL4 TM Contributor Contributor Contributor Contributor Contributor
LCA | Gold Coast | Jan'20 33 |
Premium Members US$ 100k/a Trustworthy Systems Members US$ 3–30k/a Associate Members US$ 0 Board Chair ex officio 3 directors 1 director each 1 director Technical Steering Committee Committer Committer Technical Leader(s) Committer
Initial Board:
Note: members must be financial members of Linux Foundation!
LCA | Gold Coast | Jan'20 34 |
Proofs Code
Trustworthy Systems Team
Evolve Maintain/ extend
Community
Platform ports Core userland Provide & maintain Contribute, adopt? Other userland Provide samples/ templates Adopt/ extend/ maintain/ innovate!
LCA | Gold Coast | Jan'20 35 |
https://trustworthy.systems
Gernot Heiser | gernot.heiser@data61.csiro.au | @GernotHeiser