PlashGlibc

PlashGlibc is a modified version of GNU libc.

In the normal Linux glibc, POSIX library calls that deal with filenames (eg. open(), stat(), unlink()) correspond directly to Linux system calls.

In PlashGlibc, these library calls are implemented as remote procedure calls (RPCs) to Plash's FsOp object. These RPCs involve sending a message to a ServerProcess via a socket file descriptor, using the PlashObjectCapabilityProtocol. This is implemented using the Linux kernel's sendmsg() and recvmsg() system calls. In cases where an RPC returns a file descriptor (e.g. for the POSIX open() call), the resulting file descriptor is sent across the socket by the ServerProcess using the "ancillary data" facility that Unix domain sockets provide.

Library calls that use only file descriptors (eg. read(), write(), mmap()) are unaffected, and continue to use the usual Linux system calls.

Typically, a process using PlashGlibc is not able to use the Linux filename-based syscalls, because the syscalls have been disabled by a jailing mechanism such as ChrootSetuidJail. If you used the normal Linux glibc (or another libc such as dietlibc) in this context, the program would likely not work, because these system calls would not do anything useful.

Build system

Currently, PlashGlibc does not integrate into glibc's build process. This needs to be fixed. See Story6.

Versions

Modified versions of glibc 2.3.6, 2.4 and 2.5 can be built.

Note that glibc 2.4 dropped support for versions of Linux earlier than 2.6.

Similar systems

Hurd's version of glibc also implements POSIX calls in terms of RPCs. In this case, it uses the Mach RPC mechanism.

See also

PlashGlibc (last edited 2008-04-12 13:02:33 by MarkSeaborn)