dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& –...

33
DOVER A MetadataExtended RISCV André DeHon [email protected] Eli Boling, Rishiyur Nikhil, Darius Rad, Julie Schwarz Niraj Sharma, Joseph Stoy, Greg Sullivan, Andrew Sutherland Draper 1/6/2016 1 RISCV Jan. 2016

Transcript of dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& –...

Page 1: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

DOVER  A  Metadata-­‐Extended  RISC-­‐V  

André  DeHon  [email protected]  

Eli  Boling,  Rishiyur  Nikhil,  Darius  Rad,  Julie  Schwarz  Niraj  Sharma,  Joseph  Stoy,  Greg  Sullivan,  Andrew  Sutherland  

Draper  1/6/2016  

1  RISCV  Jan.  2016  

Page 2: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Story  •  Non-­‐news:  Computers  systems  are  insecure  •  Processor  architecture  contributes  

–  Blindly  run  code    – Make  secure/safe  thing  expensive  

•  SoUware  Defined  Metadata  Processing  –  Extensible  architecture  for  concurrent  metadata  – Makes  safety  inexpensive  and  programmable  –  Learning,  customizaXon,  rapid  response  to  threats  

•  DOVER  =  RISC-­‐V  +  PUMP  (SDMP)  –  Programmable  Unit  for  Metadata  Processing  (PUMP)  

RISCV  Jan.  2016  2  

Page 3: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Outline  

•  Review  SDMP  – SoUware  Defined  Metadata  Processing  

•  Data/Metadata  SeparaXon  

•  RISC-­‐V  IntegraXon  •  DRAPER  and  RISC-­‐V  Community  

RISCV  Jan.  2016  3  

Page 4: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Parallel  Metadata  

RISCV  Jan.  2016  4  

Page 5: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Programmable  Metadata  

•  Give  each  word  a  programmable  tag  –  Indivisible  from  word  

– Uninterpreted  by  hardware  – SoUware  can  use  as  pointer  to  data  structure  

•  Tags  checked  and  updated  on  every  operaXon  – Common  case  in  parallel  by  PUMP  “rule”  cache  

5  RISCV  Jan.  2016  

Data  Tag  

Page 6: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Abstract  FuncXon  

•  Every  word  may  have  arbitrary    metadata  

•  PUMP  is  a  funcXon  from:  – Opcode,  PCtag,  Instrtag,  RS1tag,  RS2tag,  MRtag  

•  To:  – Allowed?  – PCtag  – Resulttag  (RD,  memory  result)  

RISCV  Jan.  2016  6  

Page 7: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Policies  

•  What  operaXons  are  allowed    and  how  metadata  is  updated  

•  Examples:  – Access  Control  (fine-­‐grained)  

•  Mandatory  Access  Control  

–  Types  (including  applicaXon-­‐defined)  –  Fine-­‐grained  instrucXon  permission  – Memory  Safety  –  Control  Flow  Integrity  –  Taint  tracking  /  InformaXon  Flow  Control  

RISCV  Jan.  2016  7  

Page 8: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Micro-­‐Policies  •  Type  Safety  •  Memory  Safety  

•  Control-­‐Flow  Integrity    

•  Stack  Safety    

•  Unforgeable  resource  idenXfiers    

•  Abstract  Types  

•  Immutability    

•  Linearity    

•  SoUware  Architecture  Enforcement    

•  Units    

•  Signing    

•  Sealing    

•  Endorsement  

•  Taint    

•  ConfidenXality  

•  Integrity  

•  Mandatory  Access  Control    •  ClassificaXon  levels  •  Lightweight  compartmentalizaXon  •  SoUware  Fault  IsolaXon  •  Sandboxing  •  Access  control    •  CapabiliXes  •  Provenance  •  Full/Empty  Bits  •  Concurrency:  Race  DetecXon  •  Debugging  •  Data  tracing  •  IntrospecXon  •  Audit  •  Reference  monitors    •  Garbage  collecXon  •  Bignums    

RISCV  Jan.  2016  8  

Page 9: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

PUMP    Uninterpreted  

•  PUMP  provides  uninterpreted  funcXonal  mapping  (bits-­‐to-­‐bits)  – Doesn’t  assign  meaning,  only  caches  

•  Leaves  meaning  up  to  soUware  (SDMP)  – Rules  installed  by  soUware  on  PUMP  misses  

•  Demand  metadata  structures  be  immutable  – So  meaning  of  a  tag  (address  to  structure)    never  changes  

RISCV  Jan.  2016  9  

Page 10: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

AbstracXng  Hardware  

•  HW  level  – Metadata  bits  alached  to  word  

– PUMP  to  resolve  

•  Programmer  – Shouldn’t  have  to  worry  about  limits  

•  Number  of  bits  

•  Complexity  of  rule  logic  

•  Metadata  tag  as  pointer  – can  point  to  data  structure  of  arbitrary  size  

RISCV  Jan.  2016  10  

Page 11: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Composite  Policies  

•  LimiXng  if  only  support  one  policy  at  a  Xme  •  Use  pointer  tag  to  point  to  tuple  of  µpolicies  

•  No  hardware  limit  on  number  of  µpolicies  supported  – Support  0-­‐1-­‐∞  design  principle  

RISCV  Jan.  2016  11  

tag   type   memsafe   cfi   taint  

Page 12: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

DATA/METADATA  SEPARATION  

RISCV  Jan.  2016  12  

Page 13: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

SeparaXon  

•  Data  and  Metadata  to  not  mix  •  Metadata  not  addressable  •  Datapaths  do  not  cross  •  No  instrucXons  read  or  write  metadata  

– No  set-­‐tag,  no  read-­‐tag  •  All  metadata  transforms  through  PUMP  

RISCV  Jan.  2016  13  

Page 14: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Metadata    SeparaXon  

•  Could  process  SDMP  rules    (PUMP  misses)  on  separate  processor  

•  Could  store  metadata  structures  (what  tags  point  to)  in  separate  memory    

•  Metadata  processor  not  need  access  to  data  memory  -­‐-­‐-­‐  operates  only  on  metadata  

RISCV  Jan.  2016  14  

Page 15: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Metadata  on  Processor  

•  To  avoid  a  second  processor,    typically  want  to  process  miss  on  same  processor  (in  isolated  subsystem).  

•  The  metadata  tags  become  “data”  to  the  metadata  processing  system  – E.g.  pointers  into  metadata  memory  space  

RISCV  Jan.  2016  15  

Page 16: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Mechanism  •  PUMP  CSRs  for  Rule  inputs    outputs  

•  On  PUMP  Miss  trap  –  Store  PUMP  tag  inputs  into  PUMP  CSRs  – Here  tags  become  data  

•  Metadata  subsystem  –  Read  these  PUMP  CSR  and  process  – Write  to  tag  results  (if  allowed)  to  PUMP  CSRs  –  Triggers  rule  inserXon  for  inputs!outputs  

•  All  tag  updates  done  through  Rules  in  PUMP  –  Controlled  by  metadata  system  

•  Only  metadata  system  can  insert  Rules  in  PUMP  –  Limited  by  access  to  PUMP  CSRs  

RISCV  Jan.  2016  16  

Page 17: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Compare  

•  LowRISC  – Limited  number  of  tag  bits  

– Tags  accessible  to  user  code  – Good  for  self-­‐protecXon  safety  – Not  adequate  to  enforce  policies  on  potenXally  malicious  code  

•  Oracle  M7  SSM/ADI  – Limited  number  of  colors  !  good  for  safety  

– Fixed  policy  RISCV  Jan.  2016  

17  

Page 18: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

RISC-­‐V  INTEGRATION  

RISCV  Jan.  2016  18  

Page 19: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

AddiXons  to  RISC-­‐V  Architecture  

•  No  instrucXons  •  CSRs  

– PUMP  inputs  

– PUMP  outputs  (wriXng  one  triggers  PUMP  load)  – PUMP  Flush  (write  to  trigger)  – Tagmode,  bootstrap  tag,  default  tag  

•  PUMP  Miss  cause  

RISCV  Jan.  2016  19  

Page 20: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

ParameterizaXon  

•  Tag  width  – Like  RV32  vs.  RV64  

•  Typically  –  same  width  as  RISC-­‐V  Word  – E.g.  64b  on  RV64  

RISCV  Jan.  2016  20  

Page 21: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

System  IntegraXon  

•  Global  tags  and  rules  – vs.  per  process  – Support  protecXon  across  applicaXons  that  share  memory  

•  Metadata  subsystem  – Place  at  hypervisor  or  machine  mode  – Needs  to  be  below  what  it  protects  

• Want  to  protect  OS,  maybe  Hypervisors  

RISCV  Jan.  2016  21  

Page 22: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

RISC-­‐V    Idiosyncrasies    

•  One  instrucXon  uses  RS3!  – Forces  another  PUMP  input  

•  Sparse  opcode  sprawl  – Opcode  +  funct3  +  funct12  …  22  bits!  – From  128  entry  memory  to  4M?  

•  MulXple  instrucXons  per  machine  word  – Policies  want  tagged  instrucXons  

•  RF  vs.  IRF  instrucXon  dependent  – SpecificaXon  hidden  in  the  instrucXon  .h  file  

RISCV  Jan.  2016  22  

Page 23: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

instrucXon_properXes.cc  

•  Problem:  need  to  know  about  instrucXons  outside  of  just  execuXng  – Reads  which  registers?,  write  result?,  FP  or  Int?  – What  address  does  it  access?  (how  calculate)  

•  Read  or  write?  •  Want  to  derive  from  single-­‐canonical  source  

– Rather  than  code  separately  and  change  •  Solu>on:  “parse”  riscv/insn/*.h  files  and  generate  methods  to  answer  

RISCV  Jan.  2016  23  

Page 24: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Pipeline  IntegraXon  

•  Bluespec  6-­‐stage,  in-­‐order  core  

RISCV  Jan.  2016  24  

Page 25: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

DRAPER  AND  RISC-­‐V  COMMUNITY  

RISCV  Jan.  2016  25  

Page 26: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Open Source plans Draper plans to make available:

•  Bluespec RISC-V + Metadata changes + PUMP •  Set of basic µ-policies •  Runtime support & tools

Draper is a RISC-V Foundation Platinum Sponsor: •  Will participate in standards work and IP sharing

•  Architect, HW designers, SW engineers & Biz Dev •  Contact [email protected] 617-306-8121

26

Page 27: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Draper’s  Business  Model  •  TradiXonal  focus  on  embedded  systems  

– Military  systems  –  Commercial  (industrial  controllers,  IoT,  medical)  

•  AUer  a  “design  win”  with  a  customer  –  Establish  requirements  for  a  Dover  SOC  – And  a  policy  (and  safety?)  protecXon  suite  

•  Inherently  Secure  Processing  Hive  – An  ecosystem  building  up  around  Dover  – Membership  has  many  benefits  –  Contact  [email protected]  617-­‐306-­‐8121  

RISCV  Jan.  2016  27  

Page 28: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Dover v0.9 2H 2015

•  FPGA based •  First tool chain •  Vanilla RISC-V Linux •  Heartbleed demo •  First eval boards •  IP planning complete •  I/O (Ethernet and

flash)

2H 2015 1H 2016 2H 2016 1H 2017 2H 2017 1H 2018 2H 2018

Dover Feature Roadmap Dover v1.0

1H 2016

•  FPGA based •  MIT red team •  HW and policy fixes •  Address red team

findings •  More mature tools •  Debugged RISC-V

Linux

Dover v1.1 2H 2016

•  FPGA based •  Add TPM (keys, encrypt/decrypt) •  Port VxWorks (RTOS) •  First ASIC customer design win •  Full control flow integrity

protection (compiler) •  Open source D’over RISC-V •  Professional red team(BAE, LL) •  Initial formal verification of PUMP

and policies •  Optimize for low power

Dover v2.0 1H 2017

•  FPGA and ASIC •  First ASIC tape out •  Protected Linux (portions) •  Full information flow

control and MLS (language)

Dover v2.1 2H 2017

•  Add anti-tamper •  Add trusted supply

chain (MicroSemi) •  Support Java and

Javascript programming

•  Add RAD hardening (via wafer fab process)

Dover v3.0 1H 2018

•  Mulicore implementation

•  Support virtualization (hypervisor)

•  Extensive formal verification complete

Dover v3.1 2H 2018

•  Support Haskel programming

•  Other (TBD)

Page 29: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Story  •  DOVER  =  RISC-­‐V  +  PUMP  (SDMP)  

–  Programmable  Unit  for  Metadata  Processing  (PUMP)  

•  SoUware  Defined  Metadata  Processing  –  Extensible  architecture  for  concurrent  metadata  – Makes  safety  inexpensive  and  programmable  –  Learning,  customizaXon,  rapid  response  to  threats  

•  Computers  systems  are  insecure  •  Processor  architecture  contributes  

–  Blindly  run  code    – Make  secure/safe  thing  expensive  

RISCV  Jan.  2016  29  

Page 30: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

More  InformaXon  

•  “Architectural  Support  for  SoUware-­‐Defined  Metadata  Processing”  –  ASPLOS  2015  

•  “Micro-­‐Policies:  Formally  Verified,  Tag-­‐Based  Security  Monitors”  –  IEEE  S&P  2015  

•  hlp://www.draper.com/soluXon/inherently-­‐secure-­‐processor  

•  hlps://vimeo.com/142503315  

RISCV  Jan.  2016  30  

Page 31: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Backup  

RISCV  Jan.  2016  31  

Page 32: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Related  Work  

RISCV  Jan.  2016  32  

Page 33: dover riscv jan2016€¦ · – An&ecosystem&building&up&around&Dover& – Membership&has&many&benefits& – Contact jothy@draper.com&617N306N8121& RISCV&Jan.&2016& 27. Dover v0.9

Dover  SoC  

RISCV  Jan.  2016  33