capabilities in sel4
play

Capabilities in seL4 Types of Authority Resource Management - PowerPoint PPT Presentation

Capabilities in seL4 David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Capabilities in seL4 Types of Authority Resource Management Implementation Model Representation David Cock Operations


  1. � � � � � � � � � Capabilities in seL4 CSpaces and Authority David Cock thread 1 Background Microkernel Systems seL4 & Barrelfish CSpace CSpace CSpace Authorisation and Delegation VSpace cap Frame cap � Page Table cap Types of Authority Resource Management Implementation − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − Model Representation Operations Page Table VSpace Frame Usage & Results The seL4 Proofs Applications Questions thread 2 • CSpaces hold caps: explicit authority . 8 / 32

  2. � � � � � � � � � � � � Capabilities in seL4 CSpaces and Authority David Cock thread 1 Background Microkernel Systems seL4 & Barrelfish CSpace CSpace CSpace Authorisation and Delegation VSpace cap Frame cap � Page Table cap Types of Authority Resource Management KOP KOP KOP Implementation − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − Model Representation Operations Page Table VSpace Frame Usage & Results The seL4 Proofs Applications Questions thread 2 • CSpaces hold caps: explicit authority . 8 / 32

  3. � � � � � � � � � � � � Capabilities in seL4 CSpaces and Authority David Cock thread 1 Background Microkernel Systems seL4 & Barrelfish CSpace CSpace CSpace Authorisation and Delegation VSpace cap Frame cap � Page Table cap Types of Authority Resource Management KOP KOP KOP Implementation − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − Model Representation Operations Page Table VSpace Frame Usage & Results 1 1 1 The seL4 Proofs Applications Questions thread 2 • CSpaces hold caps: explicit authority . 8 / 32

  4. � � � � � � � � � � � � � Capabilities in seL4 CSpaces and Authority David Cock thread 1 Background Microkernel Systems seL4 & Barrelfish CSpace CSpace CSpace Authorisation and Delegation VSpace cap Frame cap � Page Table cap Types of Authority Resource Management KOP KOP KOP Implementation − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − Model Representation Operations Page Table VSpace Frame Usage & Results 1 1 1 The seL4 Proofs VSpace Applications Questions thread 2 • CSpaces hold caps: explicit authority . 8 / 32

  5. � � � � � � � � � � � � � � � Capabilities in seL4 CSpaces and Authority David Cock thread 1 Background Microkernel Systems seL4 & Barrelfish CSpace CSpace CSpace Authorisation and Delegation VSpace cap Frame cap � Page Table cap Types of Authority Resource Management KOP KOP KOP Implementation − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − Model Representation HW HW Operations Page Table VSpace Frame Usage & Results 1 1 1 The seL4 Proofs VSpace Applications Questions thread 2 • CSpaces hold caps: explicit authority . 8 / 32

  6. � � � � � � � � � � � � � � � � Capabilities in seL4 CSpaces and Authority David Cock thread 1 Background Microkernel Systems seL4 & Barrelfish CSpace CSpace CSpace Authorisation and Delegation VSpace cap Frame cap � Page Table cap Types of Authority Resource Management KOP KOP KOP Implementation − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − Model Representation HW HW Operations Page Table VSpace Frame Usage & Results 1 ,2 1 1 The seL4 Proofs VSpace R/W Applications Questions thread 2 • CSpaces hold caps: explicit authority . • HW gives implicit authority e.g. read/write. 8 / 32

  7. � � � � � � � � � � � � � � � � Capabilities in seL4 CSpaces and Authority David Cock thread 1 Background Microkernel Systems seL4 & Barrelfish CSpace CSpace CSpace Authorisation and Delegation VSpace cap Frame cap � Page Table cap Types of Authority Resource Management KOP KOP KOP Implementation − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − Model Representation HW HW Operations Page Table VSpace Frame Usage & Results 1 ,2 1 1 The seL4 Proofs VSpace R/W Applications Questions thread 2 • CSpaces hold caps: explicit authority . • HW gives implicit authority e.g. read/write. • implicit authority � explicit authority. 8 / 32

  8. Capabilities in seL4 Kernel Resource Allocation David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation Operations Usage & Results Traditional kernels, including L4, allocate resources for The seL4 Proofs Applications clients: Scheduling queues, IPC queues, .... Questions 9 / 32

  9. Capabilities in seL4 Kernel Resource Allocation David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation Operations Usage & Results Traditional kernels, including L4, allocate resources for The seL4 Proofs Applications clients: Scheduling queues, IPC queues, .... Questions • Threads compete for shared resources. • Hard to account to threads. • Allocation policy in the kernel. 9 / 32

  10. Capabilities in seL4 Retyping David Cock Background Microkernel Systems A seL4 & Barrelfish RAM 0–127 Authorisation and Delegation grant B grant C Types of Authority Resource Management B C RAM 0–63 RAM 64–127 Implementation Model Representation Operations C B B Usage & Results Frame EP Thread The seL4 Proofs Applications Questions • Resource manager A retypes (splits) a RAM object. 10 / 32

  11. Capabilities in seL4 Retyping David Cock Background Microkernel Systems A seL4 & Barrelfish RAM 0–127 Authorisation and Delegation grant B grant C Types of Authority Resource Management B C RAM 0–63 RAM 64–127 Implementation Model Representation Operations C B B Usage & Results Frame EP Thread The seL4 Proofs Applications Questions • Resource manager A retypes (splits) a RAM object. • A grants new caps to mutually untrusting B & C . 10 / 32

  12. Capabilities in seL4 Retyping David Cock Background Microkernel Systems A seL4 & Barrelfish RAM 0–127 Authorisation and Delegation grant B grant C Types of Authority Resource Management B C RAM 0–63 RAM 64–127 Implementation Model Representation Operations C B B Usage & Results Frame EP Thread The seL4 Proofs Applications Questions • Resource manager A retypes (splits) a RAM object. • A grants new caps to mutually untrusting B & C . • B & C now have partioned resources. 10 / 32

  13. Capabilities in seL4 Retyping David Cock Background Microkernel Systems A seL4 & Barrelfish RAM 0–127 Authorisation and Delegation grant B grant C Types of Authority Resource Management B C RAM 0–63 RAM 64–127 Implementation Model Representation Operations C B B Usage & Results Frame EP Thread The seL4 Proofs Applications Questions • Resource manager A retypes (splits) a RAM object. • A grants new caps to mutually untrusting B & C . • B & C now have partioned resources. • They can perform further retyping themselves. 10 / 32

  14. Capabilities in seL4 Retyping David Cock Background Microkernel Systems A seL4 & Barrelfish RAM 0–127 Authorisation and Delegation grant B grant C Types of Authority Resource Management B C RAM 0–63 RAM 64–127 Implementation Model Representation Operations C B B Usage & Results Frame EP Thread The seL4 Proofs Applications Questions • Resource manager A retypes (splits) a RAM object. • A grants new caps to mutually untrusting B & C . • B & C now have partioned resources. • They can perform further retyping themselves. • All kernel & user resources are allocated thusly. 10 / 32

  15. Capabilities in seL4 The Authority Database Model David Cock Background Microkernel Systems seL4 & Barrelfish The kernel maintains a database of valid capabilities, with Authorisation and Delegation requirements: Types of Authority Resource Management Atomicity Users (subjects) always see a consistent state. Implementation Model Performance Cap lookup is on the critical path. Representation Operations No Allocation Bookkeeping must be stored somewhere. Usage & Results The seL4 Proofs Applications Questions I will describe the seL4/sequential case. Simon will discuss the Barrelfish/concurrent case. 11 / 32

  16. Capabilities in seL4 CNodes David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Types of Authority Resource Management Implementation Model . Representation Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions 12 / 32

  17. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. 12 / 32

  18. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems seL4 & Barrelfish RAM Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. 12 / 32

  19. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. 12 / 32

  20. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. 12 / 32

  21. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation Types of Authority EP RAM Resource Management Implementation Model Frame Thread Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. 12 / 32

  22. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems 00 01 10 seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation 00 01 Types of Authority EP RAM Resource Management Implementation 00 10 Model Frame Thread Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. • What’s at 1000 ? 12 / 32

  23. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems 00 01 10 seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation 00 01 Types of Authority EP RAM Resource Management Implementation 00 10 Model Frame Thread Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. • What’s at 1000 ? 12 / 32

  24. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems 00 01 10 seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation 00 01 Types of Authority EP RAM Resource Management Implementation 00 10 Model Frame Thread Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. • What’s at 1000 ? An endpoint. 12 / 32

  25. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems 00 01 10 seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation 00 01 11 Types of Authority EP RAM CNode Resource Management Implementation 00 10 Model Frame Thread Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. • What’s at 1000 ? An endpoint. • CSpaces may have cycles, but finite effective depth. 12 / 32

  26. Capabilities in seL4 CNodes David Cock CRoot Background Microkernel Systems 00 01 10 seL4 & Barrelfish CNode RAM CNode Authorisation and Delegation 00 01 11 Types of Authority EP RAM CNode Resource Management Implementation 00 10 Model Frame Thread Representation . Operations Usage & Results The seL4 Proofs Applications • CNodes objects store caps and bookkeeping. Questions • A CSpace is all caps reachable from a CRoot. • CNodes are themselves managed with caps. • What’s at 1000 ? An endpoint. • CSpaces may have cycles, but finite effective depth. • Every invocation is an authority DB query . 12 / 32

  27. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation Operations Usage & Results The seL4 Proofs Applications Questions 13 / 32

  28. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Mint/Retype Derive new sub-objects, and caps to them. Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation Operations Usage & Results The seL4 Proofs Applications Questions 13 / 32

  29. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Mint/Retype Derive new sub-objects, and caps to them. Authorisation and Delegation Copy Create a new cap to an object. The old and Types of Authority new caps are (mostly) indistinguishable. Resource Management Implementation Model Representation Operations Usage & Results The seL4 Proofs Applications Questions 13 / 32

  30. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Mint/Retype Derive new sub-objects, and caps to them. Authorisation and Delegation Copy Create a new cap to an object. The old and Types of Authority new caps are (mostly) indistinguishable. Resource Management Implementation Move Move caps within or between CNodes. Model Representation Operations Usage & Results The seL4 Proofs Applications Questions 13 / 32

  31. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Mint/Retype Derive new sub-objects, and caps to them. Authorisation and Delegation Copy Create a new cap to an object. The old and Types of Authority new caps are (mostly) indistinguishable. Resource Management Implementation Move Move caps within or between CNodes. Model Representation Delete Remove the cap. Destroy the object once the Operations last cap is gone. Usage & Results The seL4 Proofs Applications Questions 13 / 32

  32. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Mint/Retype Derive new sub-objects, and caps to them. Authorisation and Delegation Copy Create a new cap to an object. The old and Types of Authority new caps are (mostly) indistinguishable. Resource Management Implementation Move Move caps within or between CNodes. Model Representation Delete Remove the cap. Destroy the object once the Operations last cap is gone. Usage & Results The seL4 Proofs Applications Revoke Destroy all objects derived (via retype) from Questions this one. 13 / 32

  33. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Mint/Retype Derive new sub-objects, and caps to them. Authorisation and Delegation Copy Create a new cap to an object. The old and Types of Authority new caps are (mostly) indistinguishable. Resource Management Implementation Move Move caps within or between CNodes. Model Representation Delete Remove the cap. Destroy the object once the Operations last cap is gone. Usage & Results The seL4 Proofs Applications Revoke Destroy all objects derived (via retype) from Questions this one. Delete and Revoke call each other, and are long-running. 13 / 32

  34. Capabilities in seL4 Cap Operations David Cock Background These mutate the authority DB: Microkernel Systems seL4 & Barrelfish Mint/Retype Derive new sub-objects, and caps to them. Authorisation and Delegation Copy Create a new cap to an object. The old and Types of Authority new caps are (mostly) indistinguishable. Resource Management Implementation Move Move caps within or between CNodes. Model Representation Delete Remove the cap. Destroy the object once the Operations last cap is gone. Usage & Results The seL4 Proofs Applications Revoke Destroy all objects derived (via retype) from Questions this one. Delete and Revoke call each other, and are long-running. The recursion is not atomic — Preemptible on seL4, done in a user-level monitor on Barrelfish. 13 / 32

  35. � Capabilities in seL4 Retype David Cock CRoot Background Microkernel Systems seL4 & Barrelfish RAM 1 Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation Operations Usage & Results . RAM 1 CRoot The seL4 Proofs Applications RAM 1 Questions 14 / 32

  36. � � � � � � � Capabilities in seL4 Retype David Cock CRoot Background Microkernel Systems seL4 & Barrelfish RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation Operations Usage & Results . RAM 1 CRoot The seL4 Proofs Applications RAM 1 RAM 2 RAM 3 RAM 2 RAM 3 Questions RAM caps may be split. 14 / 32

  37. � � � � � � � � � � Capabilities in seL4 Retype David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation Operations Usage & Results . RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 2 RAM 3 RAM 2 RAM 3 Questions CNode 1 CNodes are created like other objects. 14 / 32

  38. � � � � � � � � � � � � � � � � Capabilities in seL4 Retype David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model Frame 1 Frame 2 Representation Operations Usage & Results . RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 2 RAM 3 RAM 2 RAM 3 Questions Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 RAM must become Frames before being mapped. 14 / 32

  39. � � � � � � � � � � � � � � � � Capabilities in seL4 Move David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model Frame 1 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 2 RAM 3 RAM 2 RAM 3 Questions Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 15 / 32

  40. � � � � � � � � � � � � � � � � Capabilities in seL4 Move David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model Frame 1 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 2 RAM 3 RAM 2 RAM 3 Questions Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Moving within CNode doesn’t affect trees. 15 / 32

  41. � � � � � � � � � � � � � � � � Capabilities in seL4 Move David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Moving between affects CSpace but not ancestry. 15 / 32

  42. � � � � � � � � � � � � � � � � Capabilities in seL4 Copy David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 16 / 32

  43. � � � � � � � � � � � � � � � � � � � Capabilities in seL4 Copy David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 16 / 32

  44. � � � � � � � � � � � � � � � � � � � � Capabilities in seL4 Copy David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Copies make the CSpace a proper DAG. 16 / 32

  45. � � � � � � � � � � � � � � � � � � � � Capabilities in seL4 Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 17 / 32

  46. � � � � � � � � � � � � � � � � � � � � Capabilities in seL4 Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Deleting non-final leaf caps is easy. 17 / 32

  47. � � � � � � � � � � � � � � � � � � � Capabilities in seL4 Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Deleting non-final leaf caps is easy. 17 / 32

  48. � � � � � � � � � � � � � � � � � � � Capabilities in seL4 Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 1 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Deleting the last cap deletes the object. 17 / 32

  49. � � � � � � � � � � � � � � � � Capabilities in seL4 Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 2 CNode 1 Frame 2 Deleting the last cap deletes the object. 17 / 32

  50. � � � � � � � � � � � � � � � � Capabilities in seL4 Revoke David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 2 CNode 1 Frame 2 Revoke walks the ancestry tree. 18 / 32

  51. � � � � � � � � � � � � � � � � Capabilities in seL4 Revoke David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 2 CNode 1 Frame 2 Mark RAM 3 for revocation. 18 / 32

  52. � � � � � � � � � � � � � � � � Capabilities in seL4 Revoke David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Frame 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 Frame 2 CNode 1 Frame 2 Mark its descendents for deletion. 18 / 32

  53. � � � � � � � � � � � � � Capabilities in seL4 Revoke David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 CNode 1 Delete them. 18 / 32

  54. � � � � � � � � � � � � � Capabilities in seL4 Revoke David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 RAM 3 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Questions RAM 2 CNode 1 The root can now be deleted, if required. 18 / 32

  55. � � � � � � � � � � Capabilities in seL4 Revoke David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 2 Questions RAM 2 CNode 1 18 / 32

  56. � � � � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 1 RAM 2 Questions RAM 2 CNode 1 Move RAM 1 . 19 / 32

  57. � � � � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 2 Questions RAM 2 RAM 1 CNode 1 There’s now a loop, with links in both trees. 19 / 32

  58. � � � � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 2 Questions RAM 2 RAM 1 CNode 1 Let’s revoke RAM 2 , a child . 19 / 32

  59. � � � � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 2 Questions RAM 2 RAM 1 CNode 1 Mark its descendents for deletion. 19 / 32

  60. � � � � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 2 Questions RAM 2 RAM 1 CNode 1 Deleting a CNode first deletes (revokes) its contents. 19 / 32

  61. � � � � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 2 RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 2 Questions RAM 2 RAM 1 CNode 1 Revoking RAM 2 deletes RAM 1 . 19 / 32

  62. � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 2 Questions RAM 2 RAM 1 CNode 1 Delete starts bottom up. This RAM 2 cap is safe to delete. 19 / 32

  63. � � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 RAM 2 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 RAM 2 Questions RAM 2 RAM 1 CNode 1 19 / 32

  64. � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 Questions CNode 1 RAM 1 When RAM 2 is destroyed, RAM 1 adopts children. Now we’ve got an irreducible cycle. 19 / 32

  65. � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 Authorisation and Delegation Types of Authority Resource Management Implementation Model RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 Questions CNode 1 RAM 1 RAM 1 ’s revoke is finished, now delete it, but how? 19 / 32

  66. � � � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish CNode 1 Authorisation and Delegation Types of Authority Resource Management swap Implementation Model RAM 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications CNode 1 Questions CNode 1 RAM 1 In seL4, we swap the last two caps. 19 / 32

  67. � � � � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish RAM 1 Authorisation and Delegation Types of Authority Resource Management Implementation Model CNode 1 Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications RAM 1 Questions CNode 1 CNode 1 CNode 1 can now safely be deleted. 19 / 32

  68. � Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish RAM 1 Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation . Operations Usage & Results RAM 1 CRoot The seL4 Proofs Applications RAM 1 Questions Finally, RAM 1 goes too. 19 / 32

  69. Capabilities in seL4 Recursive Revoke & Delete David Cock CRoot Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Types of Authority Resource Management Implementation Model Representation . Operations Usage & Results CRoot The seL4 Proofs Applications Questions This process accidentally destroyed its whole world. 19 / 32

  70. � � � � � � � � � � � � Capabilities in seL4 Invariants David Cock In seL4 Background Microkernel Systems seL4 & Barrelfish Authorisation and RAM 1 CRoot Delegation Types of Authority CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Resource Management Implementation 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Model Representation Operations Usage & Results The seL4 Proofs Applications Questions 20 / 32

  71. � � � � � � � � � � � � Capabilities in seL4 Invariants David Cock In seL4 Background Microkernel Systems seL4 & Barrelfish Authorisation and RAM 1 CRoot Delegation Types of Authority CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Resource Management Implementation 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Model Representation Operations Usage & Results The seL4 Proofs • Ancestry is a tree (forest). Applications Questions 20 / 32

  72. � � � � � � � � � � � � Capabilities in seL4 Invariants David Cock In seL4 Background Microkernel Systems seL4 & Barrelfish Authorisation and RAM 1 CRoot Delegation Types of Authority CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Resource Management Implementation 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Model Representation Operations Usage & Results The seL4 Proofs • Ancestry is a tree (forest). Applications Questions • ∃ Object → ∃ Cap. 20 / 32

  73. � � � � � � � � � � � � Capabilities in seL4 Invariants David Cock In seL4 Background Microkernel Systems seL4 & Barrelfish Authorisation and RAM 1 CRoot Delegation Types of Authority CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Resource Management Implementation 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Model Representation Operations Usage & Results The seL4 Proofs • Ancestry is a tree (forest). Applications Questions • ∃ Object → ∃ Cap. • Barrelfish is not identical. 20 / 32

  74. � � � � � � � � � � � � Capabilities in seL4 Invariants David Cock In seL4 Background Microkernel Systems seL4 & Barrelfish Authorisation and RAM 1 CRoot Delegation Types of Authority CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Resource Management Implementation 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Model Representation Operations Usage & Results The seL4 Proofs • Ancestry is a tree (forest). Applications Questions • ∃ Object → ∃ Cap. • Barrelfish is not identical. We’re not sure exactly how yet. 20 / 32

  75. � � � � � � � � � � � � Capabilities in seL4 Invariants David Cock In seL4 Background Microkernel Systems seL4 & Barrelfish Authorisation and RAM 1 CRoot Delegation Types of Authority CNode 1 RAM 1 RAM 3 RAM 2 RAM 3 Resource Management Implementation 2 RAM 2 Frame 1 Frame 2 CNode 1 Frame 1 Frame 2 Model Representation Operations Usage & Results The seL4 Proofs • Ancestry is a tree (forest). Applications Questions • ∃ Object → ∃ Cap. • Barrelfish is not identical. We’re not sure exactly how yet. We’d really like to. 20 / 32

  76. Capabilities in seL4 Results David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation We know quite a bit already (in the Types of Authority Resource Management context of seL4). Implementation • Implementation proof. Model Representation Operations • Integrity proof. Usage & Results • Confidentiality proof. The seL4 Proofs Applications • Applications of user-level Questions allocation. 21 / 32

  77. Capabilities in seL4 The System is Correctly Implemented David Cock Background Microkernel Systems seL4 & Barrelfish Access Control Spec Access Control Spec Confinement Authorisation and Delegation Types of Authority Resource Management Implementation Specification Model Representation Operations Usage & Results The seL4 Proofs Applications Haskell Design Questions Prototype C Code 22 / 32

  78. Capabilities in seL4 The System is Correctly Implemented David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Delegation Types of Authority Resource Management Implementation Model The abstract spec is all that matters now! Representation Operations Usage & Results The seL4 Proofs Applications Questions 23 / 32

  79. Capabilities in seL4 Authority Confinement David Cock Background Microkernel Systems T seL4 & Barrelfish A B Send Send Authorisation and Send UNIV UNIV Delegation AEP 1 AEP 2 AEP 3 Types of Authority Read, Resource Management Write Recv Recv Recv Implementation Send Recv UNIV CTR EP RM R Model Representation Read, UNIV Read, Operations Write Write Usage & Results C D The seL4 Proofs Applications Questions Figure: The Secure Access Controller seL4 implements the take-grant model: 24 / 32

  80. Capabilities in seL4 Authority Confinement David Cock Background Microkernel Systems T seL4 & Barrelfish A B Send Send Authorisation and Send UNIV UNIV Delegation AEP 1 AEP 2 AEP 3 Types of Authority Read, Resource Management Write Recv Recv Recv Implementation Send Recv UNIV CTR EP RM R Model Representation Read, UNIV Read, Operations Write Write Usage & Results C D The seL4 Proofs Applications Questions Figure: The Secure Access Controller seL4 implements the take-grant model: Confinement Authority (caps) only flows along edges. 24 / 32

  81. Capabilities in seL4 Authority Confinement David Cock Background Microkernel Systems T seL4 & Barrelfish A B Send Send Authorisation and Send UNIV UNIV Delegation AEP 1 AEP 2 AEP 3 Types of Authority Read, Resource Management Write Recv Recv Recv Implementation Send Recv UNIV CTR EP RM R Model Representation Read, UNIV Read, Operations Write Write Usage & Results C D The seL4 Proofs Applications Questions Figure: The Secure Access Controller seL4 implements the take-grant model: Confinement Authority (caps) only flows along edges. Integrity Objects only modified via (transient) authority. 24 / 32

  82. Capabilities in seL4 Information Flow David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Page PD Thread Delegation Thread PD PT Types of Authority Resource Management R SPage PT RW Implementation Thread CNode Model AsyncSend AEP CNode Recv Representation Partition 1 Partition 2 Operations Usage & Results The seL4 Proofs Applications Questions seL4 enforces information flow policy: 25 / 32

  83. Capabilities in seL4 Information Flow David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Page PD Thread Delegation Thread PD PT Types of Authority Resource Management R SPage PT RW Implementation Thread CNode Model AsyncSend AEP CNode Recv Representation Partition 1 Partition 2 Operations Usage & Results The seL4 Proofs Applications Questions seL4 enforces information flow policy: • Builds on integrity proof. 25 / 32

  84. Capabilities in seL4 Information Flow David Cock Background Microkernel Systems seL4 & Barrelfish Authorisation and Page PD Thread Delegation Thread PD PT Types of Authority Resource Management R SPage PT RW Implementation Thread CNode Model AsyncSend AEP CNode Recv Representation Partition 1 Partition 2 Operations Usage & Results The seL4 Proofs Applications Questions seL4 enforces information flow policy: • Builds on integrity proof. • No flow via kernel mechanisms e.g. scheduler. 25 / 32

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend