In this class project I will explore a preliminary implementation of the tag policy language.
Writeup
Progress/Milestones
Current status:
- Language specification complete (ran it by Michael McMartin as well), supports all hardware features
Milestone by end of week
- Initial lexer/parser finished, port a few small analyses
- Compile and run on FPGA
Milestone by end of next week
- Add support for flexible specification of check handlers and basic modularity/composability
- Implement more complex analyses
Update - Weekend of 5/21
- Updated language specification, now happy with final version
- Added support for check handlers
- Modularity will be provided by allowing policies to specify their own configuration using DSLs
- Languages for various policies are too different to try to unify (syscall tainting resembles AppArmor or conventional RBAC/SELinux, while breakpoints/watchpoints might just be symbol lists, etc)
- Implementation delayed by new issue - role of multiplexing register windows in Linux kernel
- See internal Kozyrakis wiki for a much longer writeup (ask me if you want it reposted here)
- _Serious_ threat to reliability - without modifications, Linux would allow stale tags from one process's register windows to show up in another process, potentially causing false positives/negatives
- Artifact of the shared register window format of the SPARC register file
- Devised solution that prevents tags from one process' register window showing up in another process (with no appreciable performance impact)
- Thankfully Linux guarantees isolation of the _data_ in register windows already
- Laid out plan to ensure all register window tags are zero at execve() time
- Laid out plan to prevent OS tag policies from interfering with user tag policies
- Two solutions, one trivial but wasteful, one complete but more time-intensive
- Beginning implementation Monday/Tuesday now that register window problems are sorted out
- Did not encounter these register window issues before because we weren't concurrently running processes which used the same tag bit for different tag policies
- Thankfully issue turned out to be quite resolveable