[systemd-devel] [PATCH 3/4] connection: use the already cached metadata if KDBUS_HELLO_CACHE_META is set

Daniel Mack daniel at zonque.org
Fri Jun 27 04:02:19 PDT 2014


On 06/27/2014 12:46 PM, Kay Sievers wrote:
> On Fri, Jun 27, 2014 at 12:32 PM, Djalal Harouni <tixxdz at opendz.org> wrote:
>> For connections with the KDBUS_HELLO_CACHE_META flag dup the
>> metadata/credentials from handle or from the HELLO cmd, and use it to
>> construct kdbus kmsg object, this improves benchmark by ~50%
>>
>> The KDBUS_HELLO_CACHE_META flag is only for privileged bus users, others
>> will fail with -EPERM. Privileged bus users can do what ever they want.
> 
> Metadata contains timestamps, global message sequence numbers,  PIDs,
> none of that should be cached or faked, I think.

By no means, even for 'trusted' connections. The entire concept of
metadata breaks if we cache things here.


Daniel



More information about the systemd-devel mailing list