This is an old revision of the document!


KDBUS in FreeBSD

Things in the Linux world (e.g. GNOME, systemd) are increasingly moving towards requiring kdbus support from the kernel. This page contains notes on what a FreeBSD implementation will look like.

The FreeBSD implementation has the following basic requirements:

  • Source compatibility with Linux kdbus
  • Integration with Capsicum and other FreeBSD features (audit, MAC)
  • Kernel changes only where required for performance
  • Use existing UNIX APIs where possible (e.g. aio_read() for one-copy I/O).

Kdbus on Linux has two major components: IPC and namespace management. The IPC component allows:

  • Support point-to-point and multicast messaging
  • Fast one-copy messaging
  • Message-oriented protocol
  • Userspace and kernel endpoints
  • Messages contain bytes and / or file descriptors

The namespace management is responsible for creating hierarchies (under /dev in Linux) containing the busses.

Endpoints should be represented by a new kind of file descriptor, which should support all of the capsicum restrictions. These should be either anonymous or present in the filesystem. Placing them in the filesystem allows a userspace component to manage the namespace. Anonymous endpoints allow integration with Capsicum by providing endpoints to sandboxed processes without ever placing them in a global namespace.

  • davidchisnall/kdbus.1400336118.txt.gz
  • Last modified: 2014/05/17 14:15
  • by theraven