This chapter describes main features of LDoors.
In Solaris door is represented by STREAM file descriptor, created by door_create() and later attached to the file-system. LDoors represents door as character device with specific major number (currently 60). This way, LDoors can be implemented as loadable device driver without interfering with the rest of the kernel. Another possible solutions are:
implement door_create() as new sys-call creating new struct file, populating its struct file_operations and stuffing it into caller's current->files->fd array.
This leaves a problem of communicating this file descriptor to other processes through some form of fattach(). While something equivalent to fattach() would be useful by itself, implementation of such feature requires interaction with constantly changing VFS code.
Implement special new file-system type doorfs, existing only in RAM like proc. This only supports transient doors not surviving reboots.
Implement proper support for doors as new file type (in addition to regular files, directories, symlinks, pipes, etc.) in all file-system types.
It should be noted that implementing doors as character devices requires door creator process to have CAP_MKNOD capability. One can think of either
using of capset() sys-call to add necessary capability to individual processes or process groups;
modifying vfs_mknod() to allow less restrictive conditions for door creation;
creating of "boot-strap" device /dev/door serving as entry point for dedicated door creation server.
In Linux minor and major numbers fully specify device, but we don't want to be limited to 255 doors in a system. Minor number of door doesn't matter. In stead doors, possibly all sharing the same major and minor number, are identified by dentry structure associated with file structure created when the door is opened for the first time.