tree-wide: remove comments about 'devices'

Thanks to Harald.

Signed-off-by: Daniel Mack <daniel@zonque.org>
util: include linux/io.h

This should fix:

   make.cross ARCH=powerpc

All error/warnings:

   ipc/kdbus/util.c: In function 'kdbus_memdup_user':
>> ipc/kdbus/util.c:157:3: error: implicit declaration of function 'ERR_PTR'
>> [-Werror=implicit-function-declaration]
      return ERR_PTR(ret);

Signed-off-by: Daniel Mack <daniel@zonque.org>
test-fd: fix test on 32-bit machines

The code assumes time_t is 64-bit, which is not the case on 32-bit
archs. Fix this by using a uint64_t explicitly.

Signed-off-by: Daniel Mack <daniel@zonque.org>
node: avoid signed overflow on archs without atomic_sub()

Some archs implement atomic_sub(v) with atomic_add(-v). If v is INT_MIN,
this will cause a signed overflow on -INT_MIN.

Add a +1 offset to our BIAS values so all of them can be represented as
signed _and_ unsigned 32bit values.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
util: fix missing include on powerpc

powerpc somehow has different include paths (probably somewhere routed
through asm/). Currently, util.c fails as it lacks an err.h include. Add
it!

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Revert "util: include linux/io.h"

David's fix to include linux/err.h is correct, so this one can go
away.

This reverts commit c039ed0c473db19382dcd16e03d0bd3627f82917.
queue: avoid variable size stack items

Call kdbus_pool_slice_copy() twice, once for the header, once for the
string, to fix that.

Fixes:
>> ipc/kdbus/queue.c:518:49: sparse: Variable length array is used.

Signed-off-by: Daniel Mack <daniel@zonque.org>
handle: copy back number of lost messages

Signed-off-by: Daniel Mack <daniel@zonque.org>
test: fix leak when preparing env

unique name should be release after use.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
connection: fix off-by-one in quota accounting for MAX_MSGS_PER_USER

As in commit 639c41c0534, fix the quota accounting for MAX_MSGS_PER_USER

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
test: add tests for kernel notification quota

Make sure that the kernel notification quota is honored, and it won't
flood users.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
kdbus.txt: assorted fixes

Signed-off-by: Daniel Mack <daniel@zonque.org>
fs: mark kdbus as FS_USERNS_MOUNT

Allow user-ns to mount their own kdbusfs instances without being root in
the parent user-ns.

Each kdbusfs mount has its own private context. No reason to disallow
user-ns to mount kdbusfs.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Changelog: update

Signed-off-by: Daniel Mack <daniel@zonque.org>
kdbus.txt: more documentation nits

Signed-off-by: Daniel Mack <daniel@zonque.org>
kdbus.txt: fix audit documentaion again

Signed-off-by: Daniel Mack <daniel@zonque.org>
kdbus.txt: more documentation on the broadcast behaviour

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
kdbus.txt: more documentation fixes on the broadcast behaviour

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
kdbus.txt: document the fact the implicit policies will override installed policies

Document the fact that implicit policies will override policies provided
by the bus user.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
connection: document the quota limit of kernel notifications

Kernel is able to queue KDBUS_CONN_MAX_MSGS messages to a subscribed
connection. If the connection's queue is full, then no further message
delivery, notifications are lost.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>