handle: copy ioctl struct sizes back to user

Signed-off-by: Daniel Mack <daniel@zonque.org>
pool: clean up kdbus_pool_copy()

Fold kdbus_pool_copy_file() into kdbus_pool_copy() and rename some
variables to the code becomes more readable.

Signed-off-by: Daniel Mack <daniel@zonque.org>
pool: move kdbus_pool_copy()

kdbus_pool_copy() only has a single user now, so move it down to it.

Signed-off-by: Daniel Mack <daniel@zonque.org>
pool: fix kerneldoc

Signed-off-by: Daniel Mack <daniel@zonque.org>
pool: drop kdbus_pool_slice_flush()

With the new iov iter functions, VFS does the dcache page flushing for
us, so there's no need to do it manually.

The only situation in which we have to flush pages ourselves is in the
open-coded pool-to-pool copy loop, but it becomes much easier there as
well, as we're operating on a page basis already.

Signed-off-by: Daniel Mack <daniel@zonque.org>
kdbus.h: remove starttime from struct kdbus_pids (ABI break)

Recording the starttie in order to protect against PID overflows is a
hack. Remove it for now, and wait for a better solution to land in
mainline.

Signed-off-by: Daniel Mack <daniel@zonque.org>
test: fix the CONFIG_SECURITY and SELINUX seclabel check

This fixes the attach-flags test that was failing on kernels with
CONFIG_SECURITY=y set but all other LSMs are disabled

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
test: add kdbus_bus_creator_info() and use it

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
test: fix that CONFIG_SECURITY detection function

Sorry previous patch just mixed the return values... This one should
work now.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
test: rename kdbus_info() into kdbus_conn_info()

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
bus: introduce KDBUS_ITEM_ATTACH_FLAGS_SEND the attach flags of bus owner

We want the bus owner to have its attach flags send item that will
contain a set of KDBUS_ATTACH_* items that other connections may see
when they do a KDBUS_CMD_BUS_CREATOR_INFO ioctl. This allows the bus
creator to hide some of its metadata

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
test: add the kdbus_test_bus_creator_info test

This test will be used to query the metadata of the bus owner.

Currently the KDBUS_CMD_BUS_CREATOR_INFO ioctl is broken, no metadata
is returned, next patch will fix it.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
bus: fix KDBUS_CMD_BUS_CREATOR_INFO ioctl

The iov count in kdbus_cmd_bus_creator_info() is broken some iov will
overwrite others, so fix the count and while we are it re-order some
logic. This way the function will be able later to use the bus owner
attach mask to hide some of its metadata. It will be added later.

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

s/dameon/daemon/