[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] kdbus for 4.1-rc1

On Wed, Apr 15, 2015 at 05:07:28PM -0400, Rik van Riel wrote:
> > This leads me to a potentially interesting question: where's the
> > buffering? If there's a bus with lots of untrusted clients and one of
> > them broadcasts data faster than all receivers can process it, where
> > does it go?
> >
> > At least with a userspace solution, it's clear what the OOM killer
> > should kill when this happens. Unless it's PID 1. Sigh
> It may be useful to do the buffering (and general interception
> of any message that cannot be delivered) in a userspace program.
> Not only to get the buffers out of the kernel and into swappable
> memory, but also so people could re-use the same infrastructure
> for things like cluster communication (or communication between
> different containers) - the userspace daemons could take care of
> routing messages to and from the outside.
> They could also be useful to keep some of the policy stuff
> outside of the kernel, if only to ensure that the kernel side
> policy is not set in stone, and people can do things differently
> in the future if they want to.
kdbus connections have memory pools, please check kdbus.pool(7). The
pool has its own quota accounting to prevent bad scenarios, and the
memory is attributed to the connection.

Messages that can't be delivered are not stored in the pool, but senders
will get an appropriate error code. For further details on how this
works, please see kdbus.message(7). If you are aware of any corner-cases
we overlooked, please let us know.

Regarding the policy, the implementaion is hardly more complex than
traditional UNIX file permissions. Bus names may have multiple
permissions assined, each of which consist of a bit-mask to denote OWN,
TALK and SEE flags which are applied to UIDs, GIDs or "world". This
policy has to be enforced by the kernel, therfore the information it
acts upon also needs to be stored there. For further details, please see

The concept of a name policy originates from dbus1 [1], however we
simplified it substantially, removing features which we believe rather
belong into userspace.


Djalal Harouni

 \ /
  Last update: 2015-04-16 20:21    [W:1.599 / U:4.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site