platform/core/system/kdbus-bus.git
11 years agopool: use own lock to protect the slices lists
Kay Sievers [Wed, 8 Jan 2014 23:37:22 +0000 (07:37 +0800)]
pool: use own lock to protect the slices lists

11 years agoMerge pull request #12 from michelecurti/patch-1
Greg Kroah-Hartman [Wed, 8 Jan 2014 14:22:14 +0000 (06:22 -0800)]
Merge pull request #12 from michelecurti/patch-1

kdbus.txt: fix typo

11 years agofix typo
michelecurti [Wed, 8 Jan 2014 14:02:08 +0000 (15:02 +0100)]
fix typo

11 years agoTODO: update
Kay Sievers [Mon, 6 Jan 2014 16:31:48 +0000 (00:31 +0800)]
TODO: update

11 years agopolicy: require privileges for seeting the endpoint's policy
Kay Sievers [Sun, 5 Jan 2014 20:53:12 +0000 (00:53 +0400)]
policy: require privileges for seeting the endpoint's policy

11 years agotest: return error from loop
Kay Sievers [Sun, 5 Jan 2014 15:10:35 +0000 (19:10 +0400)]
test: return error from loop

11 years agotest: silence a Wmaybe-uninitialized report on ret variable
Djalal Harouni [Sat, 4 Jan 2014 19:46:46 +0000 (20:46 +0100)]
test: silence a Wmaybe-uninitialized report on ret variable

Silence the gcc Wmaybe-uninitialized report on ret variable, and avoid
an extra check since run_tests() already returns EXIT_FAILURE or
EXIT_SUCCESS

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
11 years agoendpoint: don't kfree a PTR_ERR
Djalal Harouni [Sat, 4 Jan 2014 21:21:51 +0000 (22:21 +0100)]
endpoint: don't kfree a PTR_ERR

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
11 years agoTODO: update
Kay Sievers [Sat, 4 Jan 2014 05:44:06 +0000 (09:44 +0400)]
TODO: update

11 years agomove devname validation to util.c
Kay Sievers [Sat, 4 Jan 2014 05:21:57 +0000 (09:21 +0400)]
move devname validation to util.c

11 years agosplit internal.h into defaults.h and util.h
Kay Sievers [Sat, 4 Jan 2014 05:05:04 +0000 (09:05 +0400)]
split internal.h into defaults.h and util.h

11 years agofix whitespace and comments
Kay Sievers [Sat, 4 Jan 2014 04:55:09 +0000 (08:55 +0400)]
fix whitespace and comments

11 years agoTODO: update
Kay Sievers [Sat, 4 Jan 2014 04:54:55 +0000 (08:54 +0400)]
TODO: update

11 years agovalidate incoming names for buses, namespaces, endpoints
Kay Sievers [Fri, 3 Jan 2014 23:13:52 +0000 (00:13 +0100)]
validate incoming names for buses, namespaces, endpoints

11 years agorequire privileges to activate or monitor
Kay Sievers [Fri, 3 Jan 2014 22:52:12 +0000 (23:52 +0100)]
require privileges to activate or monitor

11 years agoTODO: update
Kay Sievers [Fri, 3 Jan 2014 22:51:59 +0000 (23:51 +0100)]
TODO: update

11 years agoMerge pull request #7 from Keruspe/master
Greg Kroah-Hartman [Fri, 3 Jan 2014 17:46:41 +0000 (09:46 -0800)]
Merge pull request #7 from Keruspe/master

Makefile: fix typo

11 years agoMakefile: s/name/uname/
Greg Kroah-Hartman [Fri, 3 Jan 2014 17:46:02 +0000 (09:46 -0800)]
Makefile: s/name/uname/

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoTODO: update
Kay Sievers [Fri, 3 Jan 2014 02:25:31 +0000 (03:25 +0100)]
TODO: update

11 years agovarious 80 column warnings fixed up
Greg Kroah-Hartman [Wed, 1 Jan 2014 22:00:06 +0000 (14:00 -0800)]
various 80 column warnings fixed up

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopolicy.c: use linux/uaccess.h not asm/uaccess.h
Greg Kroah-Hartman [Wed, 1 Jan 2014 21:59:36 +0000 (13:59 -0800)]
policy.c: use linux/uaccess.h not asm/uaccess.h

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomore checkpatch space "fixes"
Greg Kroah-Hartman [Wed, 1 Jan 2014 21:54:38 +0000 (13:54 -0800)]
more checkpatch space "fixes"

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agonamespace.c: fix bug with trailing ; on an if statement
Greg Kroah-Hartman [Wed, 1 Jan 2014 21:54:20 +0000 (13:54 -0800)]
namespace.c: fix bug with trailing ; on an if statement

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agonotify.c: switch/case statement alignment.
Greg Kroah-Hartman [Wed, 1 Jan 2014 21:50:50 +0000 (13:50 -0800)]
notify.c: switch/case statement alignment.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agonotify.c: space checkpatch "fixes"
Greg Kroah-Hartman [Wed, 1 Jan 2014 21:49:58 +0000 (13:49 -0800)]
notify.c: space checkpatch "fixes"

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agokdbus.h: fix stupid checkpatch warnings about spaces in comments.
Greg Kroah-Hartman [Wed, 1 Jan 2014 21:47:00 +0000 (13:47 -0800)]
kdbus.h: fix stupid checkpatch warnings about spaces in comments.

ugh, trivial crud...

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agofix semicolon in if statement
Govindarajulu Varadarajan [Mon, 30 Dec 2013 12:57:33 +0000 (18:27 +0530)]
fix semicolon in if statement

Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com>
11 years agoFix some stupid checkpatch warnings in connection.h and names.h
Greg Kroah-Hartman [Mon, 30 Dec 2013 00:54:07 +0000 (16:54 -0800)]
Fix some stupid checkpatch warnings in connection.h and names.h

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agolimit the amount of request for a reply a connection can issue
Kay Sievers [Sat, 28 Dec 2013 17:29:05 +0000 (18:29 +0100)]
limit the amount of request for a reply a connection can issue

11 years agotest: benchmark - use sizeof(struct timeval)
Kay Sievers [Fri, 27 Dec 2013 12:02:26 +0000 (13:02 +0100)]
test: benchmark - use sizeof(struct timeval)

Simon Peeters 12:41 PM:
I am happy to let you all know that the error is not in the kdbus
code, but in the test code which has 16 hardcoded as the size of struct
timeval.

11 years agotest: cast addr to uintptr_t
Kay Sievers [Fri, 27 Dec 2013 11:58:24 +0000 (12:58 +0100)]
test: cast addr to uintptr_t

11 years agoMakefile: fix typo
Marc-Antoine Perennou [Thu, 26 Dec 2013 17:20:33 +0000 (02:20 +0900)]
Makefile: fix typo

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
11 years agogrant CAP_IPC_OWNER-like access to the owner of the bus
Kay Sievers [Fri, 27 Dec 2013 04:00:37 +0000 (05:00 +0100)]
grant CAP_IPC_OWNER-like access to the owner of the bus

11 years agodo not accept "kernel messages" from userspace
Kay Sievers [Fri, 27 Dec 2013 02:50:39 +0000 (03:50 +0100)]
do not accept "kernel messages" from userspace

11 years agokdbus.h: fix kernel doc
Kay Sievers [Thu, 26 Dec 2013 23:48:45 +0000 (00:48 +0100)]
kdbus.h: fix kernel doc

11 years agokdbus.h: KDBUS_ITEM_PRIORITY is not implemented and probably not even a good idea...
Lennart Poettering [Thu, 26 Dec 2013 20:43:11 +0000 (21:43 +0100)]
kdbus.h: KDBUS_ITEM_PRIORITY is not implemented and probably not even a good idea, let's remove it

11 years agouse module name for printk
Kay Sievers [Thu, 26 Dec 2013 12:19:31 +0000 (13:19 +0100)]
use module name for printk

11 years agoprint better error message
Kay Sievers [Thu, 26 Dec 2013 03:12:54 +0000 (04:12 +0100)]
print better error message

11 years agoTODO: update
Kay Sievers [Wed, 25 Dec 2013 23:09:48 +0000 (00:09 +0100)]
TODO: update

11 years agomemfd: use KBUILD_MODNAME
Kay Sievers [Wed, 25 Dec 2013 23:09:33 +0000 (00:09 +0100)]
memfd: use KBUILD_MODNAME

11 years agoallow to compile a separate kernel module with a named extension
Kay Sievers [Wed, 25 Dec 2013 22:37:44 +0000 (23:37 +0100)]
allow to compile a separate kernel module with a named extension

running:
  make EXT=2

will create a:
  kdbus2.ko

and the tests will run against:
  /dev/kdbus2/control

This allows us to run a new and separated kernel modules while the original
kdbus.ko is in use in the booted system.

11 years agofix kernel doc
Kay Sievers [Wed, 25 Dec 2013 16:59:07 +0000 (17:59 +0100)]
fix kernel doc

11 years agohandle timeouts only handled for expected replies, not for queued messages
Kay Sievers [Wed, 25 Dec 2013 15:33:21 +0000 (16:33 +0100)]
handle timeouts only handled for expected replies, not for queued messages

11 years agoTODO: update
Kay Sievers [Wed, 25 Dec 2013 04:43:38 +0000 (05:43 +0100)]
TODO: update

11 years agoconnection: fix access-after-free
Kay Sievers [Wed, 25 Dec 2013 04:16:36 +0000 (05:16 +0100)]
connection: fix access-after-free

11 years agoupdate cookie and cookie_reply logic
Kay Sievers [Wed, 25 Dec 2013 03:14:05 +0000 (04:14 +0100)]
update cookie and cookie_reply logic

11 years agoreturn error in kdbus_name_release()
Kay Sievers [Tue, 24 Dec 2013 23:20:06 +0000 (00:20 +0100)]
return error in kdbus_name_release()

11 years agodo not deny writing messages to an activator connection
Kay Sievers [Tue, 24 Dec 2013 21:44:07 +0000 (22:44 +0100)]
do not deny writing messages to an activator connection

11 years agohandle: do not put "ep" and "conn" in a union
Kay Sievers [Tue, 24 Dec 2013 17:57:17 +0000 (18:57 +0100)]
handle: do not put "ep" and "conn" in a union

11 years agometadata: always allocate and don't embed meta object
Kay Sievers [Tue, 24 Dec 2013 16:47:57 +0000 (17:47 +0100)]
metadata: always allocate and don't embed meta object

11 years agoconnection: move messages addressed to a name back to the activator
Kay Sievers [Tue, 24 Dec 2013 04:59:42 +0000 (05:59 +0100)]
connection: move messages addressed to a name back to the activator

11 years agometadata: use append_data for credentials
Kay Sievers [Tue, 24 Dec 2013 02:22:13 +0000 (03:22 +0100)]
metadata: use append_data for credentials

11 years agometadata: re-initialize meta object, we might re-use it
Kay Sievers [Tue, 24 Dec 2013 02:14:25 +0000 (03:14 +0100)]
metadata: re-initialize meta object, we might re-use it

11 years agoallow HELLO to impersonate somebody else
Kay Sievers [Tue, 24 Dec 2013 02:09:13 +0000 (03:09 +0100)]
allow HELLO to impersonate somebody else

11 years agomatch: check for currently owned names
Kay Sievers [Mon, 23 Dec 2013 23:13:41 +0000 (00:13 +0100)]
match: check for currently owned names

11 years agopolicy: remove inline declaration, it's the compiler's decision
Kay Sievers [Mon, 23 Dec 2013 22:35:36 +0000 (23:35 +0100)]
policy: remove inline declaration, it's the compiler's decision

11 years agoconnection: do not guess-check for target connection without ref'ing it
Kay Sievers [Mon, 23 Dec 2013 22:33:11 +0000 (23:33 +0100)]
connection: do not guess-check for target connection without ref'ing it

11 years agorename "id" to "owner_id" for all actions on behalf of other connections
Kay Sievers [Mon, 23 Dec 2013 18:04:35 +0000 (19:04 +0100)]
rename "id" to "owner_id" for all actions on behalf of other connections

11 years agoTODO: update
Kay Sievers [Mon, 23 Dec 2013 02:17:44 +0000 (03:17 +0100)]
TODO: update

11 years agodo not filter directed messages sent to monitor connections
Kay Sievers [Mon, 23 Dec 2013 01:21:44 +0000 (02:21 +0100)]
do not filter directed messages sent to monitor connections

11 years agonames: cosmetics
Daniel Mack [Sun, 22 Dec 2013 00:06:45 +0000 (01:06 +0100)]
names: cosmetics

11 years agonames: fix 'added' assignment
Daniel Mack [Sat, 21 Dec 2013 23:59:47 +0000 (00:59 +0100)]
names: fix 'added' assignment

11 years agonames: rework list logic once more
Daniel Mack [Sat, 21 Dec 2013 23:46:37 +0000 (00:46 +0100)]
names: rework list logic once more

now, KDBUS_NAME_LIST_ACTIVATORS will list name entries regardless
whether they have been activated or not.

11 years agokdbus.h: document ENOENT error
Lennart Poettering [Sat, 21 Dec 2013 23:16:34 +0000 (00:16 +0100)]
kdbus.h: document ENOENT error

11 years agonames: fix condition for activator listing
Daniel Mack [Sat, 21 Dec 2013 23:06:37 +0000 (00:06 +0100)]
names: fix condition for activator listing

11 years agonames: add the activator connection itself to the list of of activator names
Daniel Mack [Sat, 21 Dec 2013 22:58:29 +0000 (23:58 +0100)]
names: add the activator connection itself to the list of of activator names

11 years agoadd KDBUS_ITEM_DST_NAME to outgoing messages
Kay Sievers [Sat, 21 Dec 2013 03:21:26 +0000 (04:21 +0100)]
add KDBUS_ITEM_DST_NAME to outgoing messages

11 years agometadata: set every bit only once, also bits for unknown attach requests
Kay Sievers [Sat, 21 Dec 2013 02:13:28 +0000 (03:13 +0100)]
metadata: set every bit only once, also bits for unknown attach requests

11 years agomatch: make kdbus_match_entry_free static
Daniel Mack [Fri, 20 Dec 2013 23:29:47 +0000 (00:29 +0100)]
match: make kdbus_match_entry_free static

11 years agonotify: assign kmsg's notify_{new,old}_id
Daniel Mack [Fri, 20 Dec 2013 23:00:20 +0000 (00:00 +0100)]
notify: assign kmsg's notify_{new,old}_id

11 years agochange error message of BYEBYE to -EBUSY
Daniel Mack [Fri, 20 Dec 2013 22:25:16 +0000 (23:25 +0100)]
change error message of BYEBYE to -EBUSY

11 years agotest-kdbus: add tests for match logic
Daniel Mack [Fri, 20 Dec 2013 11:09:28 +0000 (12:09 +0100)]
test-kdbus: add tests for match logic

11 years agomatch: rework code
Daniel Mack [Fri, 20 Dec 2013 11:03:45 +0000 (12:03 +0100)]
match: rework code

This is a rework of the match code logic. This also changes the external
API in multiple ways. In particular,

 * the item types of kdbus_cmd_match are now of type KDBUS_ITEM_*
 * existing kdbus_item structs are used as attachment to kdbus_cmd_match
 * the KDBUS_MATCH definitions have been removed entirely
 * introduce KDBUS_ITEM_ID to store a connection ID
 * src_id in kdbus_cmd_match has been removed, the information lives in
   an item attachment now.

Internally, the code was completely reworked.

11 years agokdbus-test: start monitor tests
Daniel Mack [Thu, 19 Dec 2013 12:34:28 +0000 (13:34 +0100)]
kdbus-test: start monitor tests

11 years agomatch: add name matching, match kernel notifications
Kay Sievers [Thu, 19 Dec 2013 05:39:50 +0000 (06:39 +0100)]
match: add name matching, match kernel notifications

11 years agomatch: read the name from the right structure
Kay Sievers [Thu, 19 Dec 2013 05:34:17 +0000 (06:34 +0100)]
match: read the name from the right structure

11 years agodo not allow monitor connections to own names
Daniel Mack [Wed, 18 Dec 2013 20:10:46 +0000 (21:10 +0100)]
do not allow monitor connections to own names

11 years agoconnection: make KDBUS_ITEM_PAYLOAD_VEC's offset relative to the message start
Daniel Mack [Wed, 18 Dec 2013 20:02:18 +0000 (21:02 +0100)]
connection: make KDBUS_ITEM_PAYLOAD_VEC's offset relative to the message start

This way, we don't have to modify the content of such items when copying
around messages from one pool to another, as done when activator names
are taken over.

11 years agonotify: always use memcpy
Kay Sievers [Wed, 18 Dec 2013 19:58:13 +0000 (20:58 +0100)]
notify: always use memcpy

11 years agonotify: make sure we send NUL terminate name strings in name_change messages to userspace
Lennart Poettering [Wed, 18 Dec 2013 18:48:50 +0000 (19:48 +0100)]
notify: make sure we send NUL terminate name strings in name_change messages to userspace

11 years agotest: chat - dump all names
Kay Sievers [Wed, 18 Dec 2013 17:08:33 +0000 (18:08 +0100)]
test: chat - dump all names

11 years agonames: use the correct list entry when iterating over queued names
Kay Sievers [Wed, 18 Dec 2013 17:08:24 +0000 (18:08 +0100)]
names: use the correct list entry when iterating over queued names

11 years agonames: remember entry when queueing up a connection for a name
Kay Sievers [Wed, 18 Dec 2013 16:26:06 +0000 (17:26 +0100)]
names: remember entry when queueing up a connection for a name

11 years agonames: clean up flag handling when taking over names
Kay Sievers [Wed, 18 Dec 2013 15:19:02 +0000 (16:19 +0100)]
names: clean up flag handling when taking over names

11 years agonames: set incoming/outgoing queueing flags in one place
Kay Sievers [Wed, 18 Dec 2013 13:36:21 +0000 (14:36 +0100)]
names: set incoming/outgoing queueing flags in one place

11 years agonames: directly pass KDBUS_NAME_ACTIVATOR for activator requests
Kay Sievers [Wed, 18 Dec 2013 13:15:49 +0000 (14:15 +0100)]
names: directly pass KDBUS_NAME_ACTIVATOR for activator requests

11 years agonames: strict filter of incoming KDBUS_NAME_* flags
Kay Sievers [Wed, 18 Dec 2013 13:15:01 +0000 (14:15 +0100)]
names: strict filter of incoming KDBUS_NAME_* flags

11 years agodo not return improper idr failure codes to userspace
Kay Sievers [Wed, 18 Dec 2013 01:31:49 +0000 (02:31 +0100)]
do not return improper idr failure codes to userspace

11 years agoendpoint: fix idr_alloc return value check
Daniel Mack [Wed, 18 Dec 2013 00:57:20 +0000 (01:57 +0100)]
endpoint: fix idr_alloc return value check

11 years agoRevert "move kdbus_subsys from namespace.c to main.c"
Daniel Mack [Wed, 18 Dec 2013 00:48:52 +0000 (01:48 +0100)]
Revert "move kdbus_subsys from namespace.c to main.c"

This reverts commit 1ca27c6e7e95d505f6bee190b8dd30dea6f415d1.

11 years agomatch: plug memory leak
Daniel Mack [Wed, 18 Dec 2013 00:45:20 +0000 (01:45 +0100)]
match: plug memory leak

11 years agobus: don't try to free an ERR_PTR
Daniel Mack [Wed, 18 Dec 2013 00:39:16 +0000 (01:39 +0100)]
bus: don't try to free an ERR_PTR

11 years agobus: fix memory leak on malformed messages
Daniel Mack [Wed, 18 Dec 2013 00:38:43 +0000 (01:38 +0100)]
bus: fix memory leak on malformed messages

11 years agoendpoint: fix memory leak on malformed input
Daniel Mack [Wed, 18 Dec 2013 00:36:36 +0000 (01:36 +0100)]
endpoint: fix memory leak on malformed input

11 years agoendpoint: save an extra variable for idr_alloc()
Daniel Mack [Wed, 18 Dec 2013 00:33:41 +0000 (01:33 +0100)]
endpoint: save an extra variable for idr_alloc()

11 years agoendpoint: plug mem leak if kstrdup() fails
Daniel Mack [Wed, 18 Dec 2013 00:32:19 +0000 (01:32 +0100)]
endpoint: plug mem leak if kstrdup() fails

11 years agonamespace: don't try to free an ERR_PTR
Daniel Mack [Wed, 18 Dec 2013 00:26:46 +0000 (01:26 +0100)]
namespace: don't try to free an ERR_PTR

11 years agoindent
Daniel Mack [Wed, 18 Dec 2013 00:23:34 +0000 (01:23 +0100)]
indent

11 years agomove kdbus_subsys from namespace.c to main.c
Daniel Mack [Wed, 18 Dec 2013 00:23:28 +0000 (01:23 +0100)]
move kdbus_subsys from namespace.c to main.c

11 years agopool: fix include
Daniel Mack [Wed, 18 Dec 2013 00:22:54 +0000 (01:22 +0100)]
pool: fix include