auditor

An aarch64 constant-time memory access auditing tool.
git clone git://git.ppad.tech/auditor.git
Log | Files | Refs | README | LICENSE

IMPL14.md (761B)


      1 # IMPL14: Implement Stack Kind Tracking (Stage 2)
      2 
      3 ## Summary
      4 
      5 Extend taint state with stack slot kinds so pointer/scalar classification
      6 survives spills and reloads.
      7 
      8 ## Steps
      9 
     10 1) Extend TaintState
     11 - Add `tsStackKind :: IntMap RegKind`.
     12 - Initialize empty; clear on SP modification.
     13 
     14 2) Stack store/load updates
     15 - `storeToStack`/`storePairToStack`: record source kinds.
     16 - `loadFromStack`/`loadPairFromStack`: restore kinds for destinations.
     17 
     18 3) Clear on SP changes
     19 - Ensure `clearStackMap` clears stack kinds too.
     20 
     21 4) Tests
     22 - Add a test where a pointer is spilled and reloaded; ensure kind is
     23   preserved.
     24 - Add a test where a scalar spill does not upgrade to pointer.
     25 
     26 ## Files to Touch
     27 
     28 - `lib/Audit/AArch64/Taint.hs`
     29 - `test/`
     30 
     31 ## Validation
     32 
     33 - `cabal test`