2015-06-03 18:51:24

by David Herrmann

[permalink] [raw]
Subject: [GIT PULL] kdbus cleanups for 4.2

Hi Greg

This contains a bunch of fixes, optimizations and cleanups since v4.0. It is
based on your 'kdbus' branch and was tested for several weeks.
I have some more patches pending, mainly metadata rework for 4.2. However, this
breaks backwards compat so I want to get everything else out first.

Thanks
David

The following changes since commit 384ede7c5f52ff89d90bf3008360c5f7c0d6fcbf:

kdbus: pool: use __vfs_read() (2015-06-02 21:37:22 +0900)

are available in the git repository at:

https://github.com/systemd/linux.git tags/for-greg

for you to fetch changes up to 9efa7187a1522f57d4022b943378703b09db6c1b:

kdbus: no need to ref current->mm (2015-06-03 18:50:21 +0200)

----------------------------------------------------------------
kdbus cleanups since 4.1 for Greg

* Several cleanups to reduce locking in metadata collection and connection
management.

* Translate CAPS between namespaces just like ./security/commoncaps.c does.
Previously we just dropped CAPS on namespace borders, now we translate them
according to the upstream translation rules.

* IdAdd / IdRemove notifications are now forwarded to everyone. This fixes
issues with sandboxes which want to track API users, but cant if they don't
get those notifications.

* Drop kdbus_meta_attach_mask module parameter. It was a workaround which was
never used by anyone. Drop it and lets figure out the remaining issues
people disagree on properly, without any hacks.

* Miscellaneous build fixes.

----------------------------------------------------------------
Daniel Mack (2):
samples/kdbus: stub out code for glibc < 2.7
kdbus: use rcu to access exe file in metadata

David Herrmann (16):
kdbus: skip mandatory items on negotiation
kdbus: turn kdbus_node_idr into an ida
kdbus: reduce scope of handle locking
kdbus: skip acquiring an active reference in poll()
kdbus: optimize auxgroup collector
kdbus: drop obsolete WARN_ON
kdbus: copy small ioctl payloads to stack
kdbus: drop kdbus_meta_attach_mask modparam
kdbus: fix typo
kdbus: forward ID notifications to everyone
kdbus: provide helper to collect metadata
kdbus: make metadata on broadcasts reliable
kdbus: fix up documentation of ioctl handlers
kdbus: translate capabilities between namespaces
kdbus/selftests: add build-dependencies on headers
kdbus: no need to ref current->mm

Wei Yongjun (1):
kdbus: remove unused linux/version.h include

ipc/kdbus/bus.c | 46 +-
ipc/kdbus/connection.c | 59 +-
ipc/kdbus/endpoint.c | 4 +-
ipc/kdbus/handle.c | 171 +++--
ipc/kdbus/handle.h | 5 +
ipc/kdbus/main.c | 13 +-
ipc/kdbus/match.c | 4 +-
ipc/kdbus/message.c | 24 +
ipc/kdbus/message.h | 2 +
ipc/kdbus/metadata.c | 167 +++--
ipc/kdbus/metadata.h | 2 -
ipc/kdbus/names.c | 6 +-
ipc/kdbus/node.c | 23 +-
ipc/kdbus/node.h | 2 +
ipc/kdbus/queue.c | 2 +-
ipc/kdbus/util.c | 45 --
ipc/kdbus/util.h | 1 -
samples/kdbus/kdbus-workers.c | 23 +-
tools/testing/selftests/kdbus/Makefile | 3 +-
tools/testing/selftests/kdbus/kdbus-test.c | 25 +-
tools/testing/selftests/kdbus/kdbus-test.h | 2 -
tools/testing/selftests/kdbus/test-attach-flags.c | 750 ----------------------
tools/testing/selftests/kdbus/test-connection.c | 34 +-
tools/testing/selftests/kdbus/test-endpoint.c | 13 +-
24 files changed, 347 insertions(+), 1079 deletions(-)
delete mode 100644 tools/testing/selftests/kdbus/test-attach-flags.c


2015-06-03 20:29:08

by Djalal Harouni

[permalink] [raw]
Subject: Re: [GIT PULL] kdbus cleanups for 4.2

Hi David,

On Wed, Jun 03, 2015 at 08:51:14PM +0200, David Herrmann wrote:
> Hi Greg
>
> This contains a bunch of fixes, optimizations and cleanups since v4.0. It is
> based on your 'kdbus' branch and was tested for several weeks.
> I have some more patches pending, mainly metadata rework for 4.2. However, this
> breaks backwards compat so I want to get everything else out first.
>
> Thanks
> David
Thanks, do you have some numbers ?

Btw I still have my own patches didn't have the time to clean them, will
try next week, last time they gave me ~7% speedup.


I also have a question is someone of you guys planning to submit a talk
to future Linux events about kdbus and sdbus ? I have a presentation not
finished about kdbus, sd-bus coupled with GCC plugins to construct kdbus
sandbox profiles during compilation thanks to sd-bus semantics, but
never had the time to finish it :-D


> The following changes since commit 384ede7c5f52ff89d90bf3008360c5f7c0d6fcbf:
>
> kdbus: pool: use __vfs_read() (2015-06-02 21:37:22 +0900)
>
> are available in the git repository at:
>
> https://github.com/systemd/linux.git tags/for-greg
>
> for you to fetch changes up to 9efa7187a1522f57d4022b943378703b09db6c1b:
>
> kdbus: no need to ref current->mm (2015-06-03 18:50:21 +0200)
>
> ----------------------------------------------------------------
> kdbus cleanups since 4.1 for Greg
>
> * Several cleanups to reduce locking in metadata collection and connection
> management.
>
> * Translate CAPS between namespaces just like ./security/commoncaps.c does.
> Previously we just dropped CAPS on namespace borders, now we translate them
> according to the upstream translation rules.
>
> * IdAdd / IdRemove notifications are now forwarded to everyone. This fixes
> issues with sandboxes which want to track API users, but cant if they don't
> get those notifications.
>
> * Drop kdbus_meta_attach_mask module parameter. It was a workaround which was
> never used by anyone. Drop it and lets figure out the remaining issues
> people disagree on properly, without any hacks.
>
> * Miscellaneous build fixes.
>
> ----------------------------------------------------------------
> Daniel Mack (2):
> samples/kdbus: stub out code for glibc < 2.7
> kdbus: use rcu to access exe file in metadata
>
> David Herrmann (16):
> kdbus: skip mandatory items on negotiation
> kdbus: turn kdbus_node_idr into an ida
> kdbus: reduce scope of handle locking
> kdbus: skip acquiring an active reference in poll()
> kdbus: optimize auxgroup collector
> kdbus: drop obsolete WARN_ON
> kdbus: copy small ioctl payloads to stack
> kdbus: drop kdbus_meta_attach_mask modparam
> kdbus: fix typo
> kdbus: forward ID notifications to everyone
> kdbus: provide helper to collect metadata
> kdbus: make metadata on broadcasts reliable
> kdbus: fix up documentation of ioctl handlers
> kdbus: translate capabilities between namespaces
> kdbus/selftests: add build-dependencies on headers
> kdbus: no need to ref current->mm
>
> Wei Yongjun (1):
> kdbus: remove unused linux/version.h include
>
> ipc/kdbus/bus.c | 46 +-
> ipc/kdbus/connection.c | 59 +-
> ipc/kdbus/endpoint.c | 4 +-
> ipc/kdbus/handle.c | 171 +++--
> ipc/kdbus/handle.h | 5 +
> ipc/kdbus/main.c | 13 +-
> ipc/kdbus/match.c | 4 +-
> ipc/kdbus/message.c | 24 +
> ipc/kdbus/message.h | 2 +
> ipc/kdbus/metadata.c | 167 +++--
> ipc/kdbus/metadata.h | 2 -
> ipc/kdbus/names.c | 6 +-
> ipc/kdbus/node.c | 23 +-
> ipc/kdbus/node.h | 2 +
> ipc/kdbus/queue.c | 2 +-
> ipc/kdbus/util.c | 45 --
> ipc/kdbus/util.h | 1 -
> samples/kdbus/kdbus-workers.c | 23 +-
> tools/testing/selftests/kdbus/Makefile | 3 +-
> tools/testing/selftests/kdbus/kdbus-test.c | 25 +-
> tools/testing/selftests/kdbus/kdbus-test.h | 2 -
> tools/testing/selftests/kdbus/test-attach-flags.c | 750 ----------------------
> tools/testing/selftests/kdbus/test-connection.c | 34 +-
> tools/testing/selftests/kdbus/test-endpoint.c | 13 +-
> 24 files changed, 347 insertions(+), 1079 deletions(-)
> delete mode 100644 tools/testing/selftests/kdbus/test-attach-flags.c

--
Djalal Harouni
http://opendz.org

2015-06-03 20:45:20

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [GIT PULL] kdbus cleanups for 4.2

On Wed, Jun 03, 2015 at 09:28:56PM +0100, Djalal Harouni wrote:
>
> I also have a question is someone of you guys planning to submit a talk
> to future Linux events about kdbus and sdbus ? I have a presentation not
> finished about kdbus, sd-bus coupled with GCC plugins to construct kdbus
> sandbox profiles during compilation thanks to sd-bus semantics, but
> never had the time to finish it :-D

I have no plans, submit away!

greg k-h

2015-06-03 21:00:42

by Djalal Harouni

[permalink] [raw]
Subject: Re: [GIT PULL] kdbus cleanups for 4.2

On Thu, Jun 04, 2015 at 05:45:11AM +0900, Greg Kroah-Hartman wrote:
> On Wed, Jun 03, 2015 at 09:28:56PM +0100, Djalal Harouni wrote:
> >
> > I also have a question is someone of you guys planning to submit a talk
> > to future Linux events about kdbus and sdbus ? I have a presentation not
> > finished about kdbus, sd-bus coupled with GCC plugins to construct kdbus
> > sandbox profiles during compilation thanks to sd-bus semantics, but
> > never had the time to finish it :-D
>
> I have no plans, submit away!
Ok Greg, thank you!

> greg k-h

--
Djalal Harouni
http://opendz.org

2015-06-04 05:59:33

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [GIT PULL] kdbus cleanups for 4.2

On Wed, Jun 03, 2015 at 08:51:14PM +0200, David Herrmann wrote:
> Hi Greg
>
> This contains a bunch of fixes, optimizations and cleanups since v4.0. It is
> based on your 'kdbus' branch and was tested for several weeks.
> I have some more patches pending, mainly metadata rework for 4.2. However, this
> breaks backwards compat so I want to get everything else out first.
>
> Thanks
> David
>
> The following changes since commit 384ede7c5f52ff89d90bf3008360c5f7c0d6fcbf:
>
> kdbus: pool: use __vfs_read() (2015-06-02 21:37:22 +0900)
>
> are available in the git repository at:
>
> https://github.com/systemd/linux.git tags/for-greg

Thanks, pulled and pushed out.

greg k-h