Plash history

I started Plash in October/November 2004, having finished writing my Masters thesis at Johns Hopkins University in Baltimore. It was a few weeks before I was due to leave Baltimore and return to the UK.

Plash came out of two ideas I had been exploring before:

  1. Virtualising filesystem access by changing glibc
  2. A Bash-like POLA shell

Filesystem virtualisation was something I had explored in the summer of 2001 while an undergraduate. I rebuilt glibc to insert my own code to replace functions such as open(). I started on creating a capability-based message-passing system for communicating between libc and a server process, allowing file descriptors to be sent in messages. I implemented a comms system with a server process written in OCaml -- sendmsg() and recvmsg() had to be wrapped using C extensions but the rest was pure OCaml -- while client code, to be linked into glibc, was written in C. The inspiration for this system was GNU Hurd: the motivation was more about allowing interesting filesystem abstractions to be written purely in user space than about providing security.

The POLA shell came out of an idea I had, also in the summer of 2001, for making C programs memory-safe, which involved tagging integer pointers with capabilities for memory blocks. I implemented the memory-safety scheme as part of my undergraduate third year project in 2001 and 2002. A related idea was to make programs treat filenames as capabilities by attaching capabilities to filename strings. I sketched out a scheme for implementing this with C, using a big hash table mapping string addresses to capabilities, with compiler support for propagating the tagged capabilities -- which I never implemented. But for this to work, the filename strings had to get tagged in the first place. My answer was that there would be a security-aware shell which would distinguish filename arguments to commands from other string arguments. I started to sketch out a syntax (an overly-complicated one) for the shell.

The immediate spur for working on Plash was a talk by Mark Miller to the programming languages lab at JHU (according to the lab seminar page, it was on 29th September). I think I had heard Mark do similar talks before, but this one set me thinking about why there was still no prototype for a POLA system using OS-based security on Unix. I started piecing together a system in my head. Afterwards I wrote down notes.

When I started it, Plash did not have a name, but I had to pick a name to release it under. The name referred to POLA and stood for the "principle of least authority shell". I released it in December 2004 (see the e-mail), soon after Alan Karp's post announcing Polaris, which does a similar thing under Windows. I wrote a few notes about how I had built Plash's version of glibc, but there was at the time no automatic build process.

What I did wrong before Plash

I made a number of mistakes in my first attempt at doing filesystem virtualisation.

PlashHistory (last edited 2008-03-09 18:00:34 by MarkSeaborn)