mystran wrote:
This is what I have too. As it is, after Hurd people tried to build their system over L4, they noticed that wasting the few cycles in IPC to do capability validation will translate into lots of overhead reduction in userspace. Hence, L4.sec, the status which I must confess I haven't followed really.
I'm not sure how it's going on either - there aren't many mentions of it on the L4 mailing lists, and no public source code release. I think I read that some people were trying to put Hurd on top of Coyotos, too...
As for copying capabilities, my capability move (no copies in general case) invalidates the capability from sender, by writing a single pointer, and saves the capability as part of the message (two pointers). So it's about as fast as sending two pointers, too.
My kernel isn't finished yet - I started it again
and haven't really had time to work on it much - so I'm not sure if capability transfer will be moving or copying. Moving capabilities does look rather nice...
- as general: proven to be universal (as in equivalent in power to Turing/Lambda....)
The pi-calculus looks at first glance to be similar to a capability system (it has processes, which you can send across channels, and little else). I haven't had much of a chance to look at it, but I wonder if it could be useful...(for example, there's a type system for the pi-calculus which prevents deadlock, and I wonder if a similar thing might work in a capability system.)
One example that you don't mention, but which my system allows, is doing system virtualization with little extra effort: in my system every process gets one capability too ("master" capability), but this capability is used to access all kernel services as well.
So any process can implement proxies for kernel services, and start other processes (provided it's own master allows), so that running a virtual copy of the system under system is just a matter of writing a suitable server. The processes running within the virtualized system can't (theoretically) tell whether they are running in a virtual system, and still might have direct access to some subdirectory (or well, subnamespace) of the global namespace, avoiding overhead there.
Well, I did mention something similar:
nick8325 wrote:Other kernel resources also have capabilities. For example, to set the priority of a thread you'd need a capability for it. There could be capabilities for processes and memory regions and things like that, and capabilities for privileged things (such as a disable-interrupts capability). That means that the kernel can forget about security policies, too, and user mode can organise security of kernel things.
In fact, the only operation in my kernel is [tt]invoke[/tt], which sends to a capability and awaits a reply. For example, you can map memory by invoking a memory-region capability. So you can certainly virtualise everything by changing the capabilities
Now, ofcourse the principal problem is how to maintain the capability table, when the number of capabilities per process grows. But this is little different from maintaining a list of file descriptors in a Unix process...
Distributing the capabilities correctly at startup could be a bit tricky, too, although using name servers could make it a lot easier. I think EROS tried to solve this by adding orthogonal persistence, so there was never any need to start up
One thing I'm unsure about: should messaging be symmetric or asymmetric. If client/server model is assumed anyway, then would it make sense to support that directly, instead of a general P2P mechanism (which can't take some shortcuts).
In mine it's synchronous and somewhat asymmetric: normally (it depends on the particular capability) if you send a message to a capability, the server will get a reply-capability for the client. When the server sends to that capability, the client will wake up and the reply-capability will be destroyed. (Come to think of it, a reply-capability is more like a continuation than an object, like you mentioned above.)