Giter Site home page Giter Site logo

kdbus's People

Contributors

alban avatar arndb avatar artisdom avatar audebert avatar govindarajulu avatar gregkh avatar haraldh avatar holtmann avatar hvenev avatar inguin avatar jjanczyk avatar johndela1 avatar kaysievers avatar keruspe avatar ladynamedlaura avatar maciejaszek avatar michelecurti avatar poettering avatar rmsilva avatar rpajak avatar sergeizv avatar shyodx avatar squiddle avatar stefanbeller avatar teg avatar tixxdz avatar torstehu avatar tycho avatar zonque avatar zx2c4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kdbus's Issues

kdbus.txt removed, fix README

In change with sha1:33480053544c99892d63819979b4a520f72e8b55 kdbus.txt was "dissolved". The README file needs updating, although maybe this project is outdated, although if that's the case it would be nice if it was mentioned in the README.

mmap MAP_PRIVATE on sealed memfd message

Hi,

is such a thing supposed to work? I tested it, but mmap doesn't seem to like it and fails. :(

I'm trying to send a large memfd message to multiple receivers. It would be really cool if these receivers could modify their local messages on a copy-on-write basis.

cheers
Dariush

3.12.7 there is NO shmem_get_seals

I built kdbus module under 3.17.x is OK, but failed for 3.12.7, and I checked there is NO shmem_get_seals in 3.12 http://lxr.free-electrons.com/source/include/linux/shmem_fs.h?v=3.12 but exist in 3.17 http://lxr.free-electrons.com/source/include/linux/shmem_fs.h

I am able to fix struct timespec64 for 3.12.7

#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 12, 7)                                  
        struct timespec ts;                                                         
#else                                                                               
        struct timespec64 ts;                                                       
#endif

But I have no idea about shmem_get_seals for 3.12.7, please someone give me some advice, thanks a lot!

Regards,
Leslie Zhai

Final Test attach_flags_mask in kdbus-test

Hello !
I recently install kdbus module along with the 4.0.0-rc5 latest kernel and I can't manage to overcome that error in the final Test attach_flags_mask when executing the test/kdbus-test .
Do you have any clue of what the issue could come from? (below is my term output)
The control node exists and the aaplication bus exists too as long as the test lasts.

Regards,

Paul Croizé

paul@dhcp-15-121:~/dev/gregkh/kdbus$ sudo ./test/kdbus-test
[sudo] password for paul:
Starting tests in the same namespaces
Starting tests with full metadata support
Starting tests with an attach_flags_mask=0xffffffffffffffff
Testing bus make functions (bus-make) .................................. OK
Testing the HELLO command (hello) ...................................... OK
Testing the BYEBYE command (byebye) .................................... OK
Testing a chat pattern (chat) .......................................... OK
Testing a simple daemon (daemon) ....................................... OK
Testing file descriptor passing (fd-passing) ........................... OK
Testing custom endpoint (endpoint) ..................................... OK
Testing monitor functionality (monitor) ................................ OK
Testing basic name registry functions (name-basics) .................... OK
Testing name registry conflict details (name-conflict) ................. OK
Testing queuing of names (name-queue) .................................. OK
Testing basic message handling (message-basic) ......................... OK
Testing handling of messages with priority (message-prio) .............. OK
Testing message quotas are enforced (message-quota) .................... OK
Testing memory access (memory-access) .................................. OK
Testing timeout (timeout) .............................................. OK
Testing synchronous replies vs. BYEBYE (sync-byebye) ................... OK
Testing synchronous replies (sync-reply) ............................... OK
Testing freeing of memory (message-free) ............................... OK
Testing retrieving connection information (connection-info) ............ OK
Testing updating connection information (connection-update) ............ OK
Testing verifying pools are never writable (writable-pool) ............. OK
Testing policy (policy) ................................................ OK
Testing unprivileged bus access (policy-priv) .......................... OK
Testing policy in user namespaces (policy-ns) .......................... OK
Testing metadata in different namespaces (metadata-ns) ................. OK
Testing adding of matches by id (match-id-add) ......................... OK
Testing removing of matches by id (match-id-remove) .................... OK
Testing replace of matches with the same cookie (match-replace) ........ OK
Testing adding of matches by name (match-name-add) ..................... OK
Testing removing of matches by name (match-name-remove) ................ OK
Testing matching for name changes (match-name-change) .................. OK
Testing matching with bloom filters (match-bloom) ...................... OK
Testing activator connections (activator) .............................. OK
Testing benchmark (benchmark) .......................................... OK
Testing benchmark without using memfds (benchmark-nomemfds) ............ OK
Testing benchmark comparison to UDS (benchmark-uds) .................... OK
Assertion 'attach_count == (KDBUS_TEST_ITEMS_SUM - KDBUS_ITEM_OWNED_NAME - KDBUS_ITEM_TIMESTAMP)' failed in kdbus_test_peers_info(), test-attach-flags.c:355
Assertion 'ret == 0' failed in kdbus_test_attach_flags(), test-attach-flags.c:734
Testing attach flags mask (attach-flags) ............................... ERROR

SUMMARY: 37 tests passed, 0 skipped, 1 failed

Crash when bloom parameter is missing

When calling KDBUS_CMD_BUS_MAKE with a message that does not contain a bloom parameter item the kernel will dereference a NULL pointer in kdbus_bus_make_user(). The function should probably return -EBADMSG when bl == NULL.

build issue in tests

bryan@fuzzy:~/kdbus$ make
make -C /lib/modules/3.17.0-rc4+/build M=/home/bryan/kdbus                                                                   
make[1]: Entering directory '/home/bryan/build/linux'
  LD      /home/bryan/kdbus/built-in.o
  CC [M]  /home/bryan/kdbus/bus.o
  CC [M]  /home/bryan/kdbus/connection.o
  CC [M]  /home/bryan/kdbus/endpoint.o
  CC [M]  /home/bryan/kdbus/handle.o
  CC [M]  /home/bryan/kdbus/main.o
  CC [M]  /home/bryan/kdbus/match.o
  CC [M]  /home/bryan/kdbus/message.o
  CC [M]  /home/bryan/kdbus/metadata.o
  CC [M]  /home/bryan/kdbus/names.o
  CC [M]  /home/bryan/kdbus/notify.o
  CC [M]  /home/bryan/kdbus/domain.o
  CC [M]  /home/bryan/kdbus/policy.o
  CC [M]  /home/bryan/kdbus/pool.o
  CC [M]  /home/bryan/kdbus/queue.o
  CC [M]  /home/bryan/kdbus/util.o
  LD [M]  /home/bryan/kdbus/kdbus.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/bryan/kdbus/kdbus.mod.o
  LD [M]  /home/bryan/kdbus/kdbus.ko
make[1]: Leaving directory '/home/bryan/build/linux'
make -C test KERNELDIR=/home/bryan/build/linux KBUILD_MODNAME=kdbus
make[1]: Entering directory '/home/bryan/kdbus/test'
  TARGET_CC kdbus-enum.o
In file included from ../kdbus.h:23:0,
                 from kdbus-util.h:13,
                 from kdbus-enum.c:20:
/home/bryan/build/linux/include/uapi/linux/types.h:9:2: warning: #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" [-Wcpp]
 #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
  ^
In file included from /home/bryan/build/linux/include/uapi/linux/posix_types.h:4:0,
                 from /home/bryan/build/linux/include/uapi/linux/types.h:13,
                 from ../kdbus.h:23,
                 from kdbus-util.h:13,
                 from kdbus-enum.c:20:
/home/bryan/build/linux/include/uapi/linux/stddef.h:1:28: fatal error: linux/compiler.h: No such file or directory
 #include <linux/compiler.h>
                            ^
compilation terminated.
Makefile:32: recipe for target 'kdbus-enum.o' failed
make[1]: *** [kdbus-enum.o] Error 1
make[1]: Leaving directory '/home/bryan/kdbus/test'
Makefile:27: recipe for target 'test' failed
make: *** [test] Error 2

With linus's tree at: 5874cfed0b04f53146f70a519a2371cea5f39178
And kdbus at: fa32cbd

Minor typo "receveiver" in walk-through example comment

Hi, while reading the kdbus walk-through example, I stumbled upon a typo in a comment in https://git.kernel.org/cgit/linux/kernel/git/gregkh/char-misc.git/tree/samples/kdbus/kdbus-workers.c?h=kdbus&id=2d41f81385089e16aa7ab260ce6819febbee5830#n790 (=

* the pool of the receveiver connection, and does not need to be
in GitHub): receveiver is written instead of receiver.

As this is a minor typo, I don't know if it should wait for kdbus to be merged into the kernel tree and then go through a patch to [email protected] or if it can be fixed before the merge.

Thanks

9 test cases failing

I want to start playing with kdbus. I upgraded the my kernel to 3.17-rc7 and cloned down kdbus landing on version:
5e747bd - connection: broadcast: do not lock conn_dst if kernel is the sender
The kernel module builds cleanly and installs without issue but "make check" gives the following:

~/zoidberg/oss/kdbus ± make check
test/kdbus-test
Testing bus make functions (bus-make) .................................. OK
Testing the HELLO command (hello) ...................................... OK
Testing the BYEBYBE command (byebye) ................................... OK
Assertion 'ret == 0' failed in kdbus_test_chat(), line 96
Testing a chat pattern (chat) .......................................... ERROR
Testing a simple dameon (daemon) ....................................... OK
Testing file descriptor passing (fd-passing) ........................... OK
Assertion 'ret == 0' failed in kdbus_test_monitor(), line 44
Testing monitor functionality (monitor) ................................ ERROR
Testing basic name registry functions (name-basics) .................... OK
Testing name registry conflict details (name-conflict) ................. OK
Testing queuing of names (name-queue) .................................. OK
Testing basic message handling (message-basic) ......................... OK
Assertion 'kdbus_msg_send(b, ((void *)0), ++cookie, 0, 0, 25, a->id) == 0' failed in kdbus_test_message_prio(), line 107
Testing handling of messages with priority (message-prio) .............. ERROR
Assertion 'kdbus_msg_send(conn_b, ((void *)0), i, KDBUS_MSG_FLAGS_EXPECT_REPLY, (i + 1) * 100ULL * 1000000ULL, 0, conn_a->id) == 0' failed in kdbus_test_timeout(), line 70
Testing timeout (timeout) .............................................. ERROR
Assertion 'ret == -104' failed in kdbus_test_sync_byebye(), line 132
Testing synchronous replies vs. BYEBYE (sync-byebye) ................... ERROR
Assertion 'ret == 0' failed in kdbus_test_sync_reply(), line 64
Testing synchronous replies (sync-reply) ............................... ERROR
Testing freeing of memory (message-free) ............................... OK
Testing retrieving connection information (connection-info) ............ OK
Assertion 'ret == 0' failed in kdbus_test_conn_update(), line 247
Testing updating connection information (connection-update) ............ ERROR
Testing verifying pools are never writable (writable-pool) ............. OK
Testing policy (policy) ................................................ OK
Testing unprivileged bus access (policy-priv) .......................... SKIPPED
Testing policy in user namespaces (policy-ns) .......................... SKIPPED
Testing metadata in user namespaces (metadata-ns) ...................... SKIPPED
Testing adding of matches by id (match-id-add) ......................... OK
Testing removing of matches by id (match-id-remove) .................... OK
Testing adding of matches by name (match-name-add) ..................... OK
Testing removing of matches by name (match-name-remove) ................ OK
Testing matching for name changes (match-name-change) .................. OK
Testing matching with bloom filters (match-bloom) ...................... OK
Assertion 'ret == 0' failed in kdbus_test_activator(), line 49
Testing activator connections (activator) .............................. ERROR
Testing creating a domain (domain-make) ................................ SKIPPED
Assertion 'memfd >= 0' failed in send_echo_request(), line 98
Assertion 'ret == 0' failed in kdbus_test_benchmark(), line 213
Testing benchmark (benchmark) .......................................... ERROR
Testing race multiple byebyes (race-byebye) ............................ OK
Testing race byebye vs match removal (race-byebye-match) ............... OK

SUMMARY: 21 tests passed, 4 skipped, 9 failed

This is running on archlinux with a .config based off the 3.16.3 kernel with a 'make oldconfig' ran so I may not have turned on critical components needed for kdbus. Before I start diving head-first into it I was wondering if this is a known issue or not? Or is my configuration whacky?

Thanks,
Barry

null deference

[ 91.920486] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 91.920570] IP: [] rb_erase+0x19b/0x360
[ 91.920622] PGD 8f067 PUD 53c69067 PMD 0
[ 91.920658] Oops: 0000 [#1] SMP
[ 91.920685] CPU: 0 PID: 1957 Comm: systemd-bus-dri Not tainted 3.12.6-mptcp-r1 #1
[ 91.920746] Hardware name: TOSHIBA Satellite A210/SB600, BIOS 1.80 08/04/2008
[ 91.920804] task: ffff880055cd4a40 ti: ffff880054e3c000 task.ti: ffff880054e3c000
[ 91.920865] RIP: 0010:[] [] rb_erase+0x19b/0x360
[ 91.920932] RSP: 0018:ffff880054e3de20 EFLAGS: 00010246
[ 91.920971] RAX: ffff880038c2c7e0 RBX: ffff880038c2c7e0 RCX: 0000000000000000
[ 91.921021] RDX: 0000000000000000 RSI: ffff880053cc9670 RDI: 0000000000000001
[ 91.921021] RBP: ffff880054e3de20 R08: ffff880038c52760 R09: 0000000000000000
[ 91.921021] R10: ffff88003eff6da0 R11: 0000000000000246 R12: ffff880053cc9640
[ 91.921021] R13: ffff880038c2c790 R14: ffff880038c2c780 R15: 0000000000000000
[ 91.921021] FS: 00007fab6f748780(0000) GS:ffff880057c00000(0000) knlGS:0000000000000000
[ 91.921021] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 91.921021] CR2: 0000000000000000 CR3: 0000000053c2e000 CR4: 00000000000007f0
[ 91.921021] Stack:
[ 91.921021] ffff880054e3de58 ffffffff8159f882 ffff880054feae28 00007fff77e85eb8
[ 91.921021] ffff880054feae00 00007fff77e85eb8 0000000000000000 ffff880054e3dec8
[ 91.921021] ffffffff8159a7e4 ffff880054e3de90 ffffffff81065fed ffff880057c12100
[ 91.921021] Call Trace:
[ 91.921021] [] kdbus_pool_free_range+0x132/0x190
[ 91.921021] [] kdbus_handle_ioctl+0x754/0x860
[ 91.921021] [] ? sched_clock_local+0x1d/0x80
[ 91.921021] [] do_vfs_ioctl+0x2d5/0x4b0
[ 91.921021] [] ? vtime_account_user+0x3a/0x50
[ 91.921021] [] SyS_ioctl+0x4b/0x90
[ 91.921021] [] tracesys+0xdd/0xe2
[ 91.921021] Code: 10 f6 c2 01 0f 84 4e 01 00 00 48 83 e2 fc 0f 84 17 ff ff ff 48 89 c1 48 89 d0 48 8b 50 08 48 39 ca 0f 85 71 ff ff ff 48 8b 50 10 02 01 75 3a 48 8b 7a 08 48 89 c1 48 83 c9 01 48 89 78 10 48
[ 91.921021] RIP [] rb_erase+0x19b/0x360
[ 91.921021] RSP
[ 91.921021] CR2: 0000000000000000
[ 91.934897] ---[ end trace 216ebbe14be12885 ]---

#includes need updating due to kernel 4.6+ changes (bus.c: generate_random_uuid = lib/uuid.c)

drivers/kdbus/bus.c: In function ‘kdbus_bus_new’:
drivers/kdbus/bus.c:116:2: error: implicit declaration of function ‘generate_random_uuid’ [-Werror=implicit-function-declaration]
  generate_random_uuid(b->id128);
  ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target 'drivers/kdbus/bus.o' failed
make[2]: *** [drivers/kdbus/bus.o] Error 1
scripts/Makefile.build:440: recipe for target 'drivers/kdbus' failed
make[1]: *** [drivers/kdbus] Error 2
Makefile:985: recipe for target 'drivers' failed
make: *** [drivers] Error 2
...
Andy Shevchenko (11):
...
lib/uuid.c: move generate_random_uuid() to uuid.c
...

*https://lkml.org/lkml/2016/5/24/201

Install issues

make install is failing on the doc/man page
The change below seems to fix it...

diff --git a/Makefile b/Makefile
index a00de3e..ad2fd98 100644
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,7 @@ install-lib:

install-doc:
install -C -d -m 0755 $(INSTALL_MAN)

  •   install -C -m 0644 doc/$(NAME).1 $(INSTALL_MAN)
    
  •   install -C -m 0644 man/man1/$(NAME).1 $(INSTALL_MAN)
    

kdbus and zeroMQ mechanism

Hi,

I'm working on a project which needs to use IPC mechanism like dbus in PREEMPT-RT context.
Thus, I was interested in dbus optimisation and reading this url http://blogs.gnome.org/rodrigo/2012/03/07/d-bus-optimizations-ii/, it seems zeroMQ was another candidate than kdbus to optimize dbus mechanism.

I'm pretty convinced about futur of kdbus concerning good performance but I was wondering if you have already compared kdbus with zeroMQ mechanism ?

Do you think zeroMQ is better than kdbus concerning IPC mechanism ?
Maybe kdbus is more flexible or easy-to-use ? Concerning monitoring tools ?

Fabien

build tests issue

  CC [M]  /home/archetipo/devel/kdbus/queue.o
  CC [M]  /home/archetipo/devel/kdbus/util.o
  LD [M]  /home/archetipo/devel/kdbus/kdbus.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC      /home/archetipo/devel/kdbus/kdbus.mod.o
    LD [M]  /home/archetipo/devel/kdbus/kdbus.ko
  make[1]: Leaving directory `/usr/src/linux-headers-3.17.1-031701-generic'
  make -C tools KERNELDIR=/usr/src/linux-headers-3.17.1-031701-generic                       KBUILD_MODNAME=kdbus
  make[1]: Entering directory `/home/archetipo/devel/kdbus/tools'
  make[1]: Nothing to be done for `all'.
  make[1]: Leaving directory `/home/archetipo/devel/kdbus/tools'
  make -C test KERNELDIR=/usr/src/linux-headers-3.17.1-031701-generic             KBUILD_MODNAME=kdbus
  make[1]: Entering directory `/home/archetipo/devel/kdbus/test'
    TARGET_CC kdbus-enum.o
    TARGET_CC kdbus-util.o
    TARGET_CC kdbus-test.o
    TARGET_CC test-activator.o
    TARGET_CC test-attach-flags.o
    TARGET_CC test-benchmark.o
    TARGET_CC test-bus.o
    TARGET_CC test-chat.o
    TARGET_CC test-connection.o
    TARGET_CC test-daemon.o
    TARGET_CC test-endpoint.o
    TARGET_CC test-fd.o
    TARGET_CC test-free.o
    TARGET_CC test-match.o
    TARGET_CC test-message.o
    TARGET_CC test-metadata-ns.o
    TARGET_CC test-monitor.o
    TARGET_CC test-names.o
    TARGET_CC test-policy.o
    TARGET_CC test-policy-ns.o
    TARGET_CC test-policy-priv.o
    TARGET_CC test-race.o
    TARGET_CC test-sync.o
    TARGET_CC test-timeout.o
    TARGET_LD kdbus-test
  kdbus-util.o: In function `do_cap_get_flag':
  /home/archetipo/devel/kdbus/test/kdbus-util.c:1495: undefined reference to `cap_get_flag'
  kdbus-util.o: In function `test_is_capable':
  /home/archetipo/devel/kdbus/test/kdbus-util.c:1520: undefined reference to `cap_get_proc'
  /home/archetipo/devel/kdbus/test/kdbus-util.c:1540: undefined reference to `cap_free'
  collect2: error: ld returned 1 exit status
  make[1]: *** [kdbus-test] Error 1
  make[1]: Leaving directory `/home/archetipo/devel/kdbus/test'
  make: *** [test] Error 2

kdbus : @7f121b18a359dd453409dd94708680cf6720fb81

Adonadi doesn't work with kdbus

Hi,

I'm trying to test kdbus. Everything works OK except Adonadi, which reports that its control process isn't registered at DBus.

I'm Using Arch Linux with systemd 209 and the latest kdbus-git, akonadi 1.11.0.

My friend is facing the same problem, so maybe it's a common problem.

missing rationale / mission statement

title says it all - there is absolutely no easy-to-find mission statement or rationale why this project exists and what it wants to achieve. I know I read something somewhere about less context-switches and bla but cant find it again -> if this was in the README it would greatly help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.