[systemd-commits] 4 commits - TODO src/libsystemd src/shared
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Nov 25 10:26:10 PST 2014
TODO | 2 +
src/libsystemd/sd-bus/bus-kernel.c | 3 -
src/libsystemd/sd-bus/kdbus.h | 56 ++++++++++++++++++++-----------------
src/shared/util.h | 2 -
4 files changed, 35 insertions(+), 28 deletions(-)
New commits:
commit 48eaba354e45942796c9c54617ff332d010a0404
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Nov 25 19:25:33 2014 +0100
kdbus: update header file to current upstream version
diff --git a/src/libsystemd/sd-bus/kdbus.h b/src/libsystemd/sd-bus/kdbus.h
index 65266ee..ae900c2 100644
--- a/src/libsystemd/sd-bus/kdbus.h
+++ b/src/libsystemd/sd-bus/kdbus.h
@@ -71,13 +71,13 @@ struct kdbus_notify_name_change {
*/
struct kdbus_creds {
__u64 uid;
- __u64 euid;
- __u64 suid;
- __u64 fsuid;
+ __u64 euid;
+ __u64 suid;
+ __u64 fsuid;
__u64 gid;
- __u64 egid;
- __u64 sgid;
- __u64 fsgid;
+ __u64 egid;
+ __u64 sgid;
+ __u64 fsgid;
};
/**
@@ -307,7 +307,7 @@ enum kdbus_item_type {
_KDBUS_ITEM_ATTACH_BASE = 0x1000,
KDBUS_ITEM_TIMESTAMP = _KDBUS_ITEM_ATTACH_BASE,
KDBUS_ITEM_CREDS,
- KDBUS_ITEM_PIDS,
+ KDBUS_ITEM_PIDS,
KDBUS_ITEM_AUXGROUPS,
KDBUS_ITEM_OWNED_NAME,
KDBUS_ITEM_TID_COMM,
@@ -369,7 +369,7 @@ struct kdbus_item {
__u64 id;
struct kdbus_vec vec;
struct kdbus_creds creds;
- struct kdbus_pids pids;
+ struct kdbus_pids pids;
struct kdbus_audit audit;
struct kdbus_caps caps;
struct kdbus_timestamp timestamp;
@@ -493,6 +493,11 @@ enum kdbus_recv_flags {
* -EOVERFLOW, this field will contain the number of
* broadcast messages that have been lost since the
* last call.
+ * @msg_size: Filled by the kernel with the actual message size. This
+ * mirrors the 'size' member of the message stored at
+ * @offset, but allows callers to access it without mapping
+ * their pool. By using @msg_size and @offset, you can map
+ * only the message itself, not the whole pool.
*
* This struct is used with the KDBUS_CMD_MSG_RECV ioctl.
*/
@@ -500,10 +505,11 @@ struct kdbus_cmd_recv {
__u64 flags;
__u64 kernel_flags;
__s64 priority;
- union {
- __u64 offset;
- __u64 dropped_msgs;
- };
+ union {
+ __u64 offset;
+ __u64 dropped_msgs;
+ };
+ __u64 msg_size;
} __attribute__((aligned(8)));
/**
@@ -607,19 +613,19 @@ enum kdbus_hello_flags {
enum kdbus_attach_flags {
KDBUS_ATTACH_TIMESTAMP = 1ULL << 0,
KDBUS_ATTACH_CREDS = 1ULL << 1,
- KDBUS_ATTACH_PIDS = 1ULL << 2,
- KDBUS_ATTACH_AUXGROUPS = 1ULL << 3,
- KDBUS_ATTACH_NAMES = 1ULL << 4,
- KDBUS_ATTACH_TID_COMM = 1ULL << 5,
- KDBUS_ATTACH_PID_COMM = 1ULL << 6,
- KDBUS_ATTACH_EXE = 1ULL << 7,
- KDBUS_ATTACH_CMDLINE = 1ULL << 8,
- KDBUS_ATTACH_CGROUP = 1ULL << 9,
- KDBUS_ATTACH_CAPS = 1ULL << 10,
- KDBUS_ATTACH_SECLABEL = 1ULL << 11,
- KDBUS_ATTACH_AUDIT = 1ULL << 12,
- KDBUS_ATTACH_CONN_DESCRIPTION = 1ULL << 13,
- _KDBUS_ATTACH_ALL = (1ULL << 14) - 1,
+ KDBUS_ATTACH_PIDS = 1ULL << 2,
+ KDBUS_ATTACH_AUXGROUPS = 1ULL << 3,
+ KDBUS_ATTACH_NAMES = 1ULL << 4,
+ KDBUS_ATTACH_TID_COMM = 1ULL << 5,
+ KDBUS_ATTACH_PID_COMM = 1ULL << 6,
+ KDBUS_ATTACH_EXE = 1ULL << 7,
+ KDBUS_ATTACH_CMDLINE = 1ULL << 8,
+ KDBUS_ATTACH_CGROUP = 1ULL << 9,
+ KDBUS_ATTACH_CAPS = 1ULL << 10,
+ KDBUS_ATTACH_SECLABEL = 1ULL << 11,
+ KDBUS_ATTACH_AUDIT = 1ULL << 12,
+ KDBUS_ATTACH_CONN_DESCRIPTION = 1ULL << 13,
+ _KDBUS_ATTACH_ALL = (1ULL << 14) - 1,
_KDBUS_ATTACH_ANY = ~0ULL
};
commit 0a9f1fd79b95cc88b27915f709c9ec4df0b3f891
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Nov 25 19:25:19 2014 +0100
kdbus: minor simplification
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 27a5910..0927d82 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -911,13 +911,12 @@ int bus_kernel_connect(sd_bus *b) {
}
static void close_kdbus_msg(sd_bus *bus, struct kdbus_msg *k) {
- struct kdbus_cmd_free cmd;
+ struct kdbus_cmd_free cmd = {};
struct kdbus_item *d;
assert(bus);
assert(k);
- cmd.flags = 0;
cmd.offset = (uint8_t *)k - (uint8_t *)bus->kdbus_buffer;
KDBUS_ITEM_FOREACH(d, k, items) {
commit 54e2e63dd28879587bc653f48520beb2956c0f16
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Nov 25 19:25:03 2014 +0100
update TODO
diff --git a/TODO b/TODO
index 0b705c1..25fbdaa 100644
--- a/TODO
+++ b/TODO
@@ -35,6 +35,8 @@ External:
Features:
+* kdbus: for some reason "busctl monitor" only shows metadata for signal msgs, never method call or method reply msgs
+
* add "systemctl start -v foobar.service" that shows logs of a service
while the start command runs. This is non-trivial to do without
races though, since we should flush out all journal messages before
commit 2e8574290d36801acffaf51a9a00a77b972a255b
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Nov 25 19:24:45 2014 +0100
util: mark page_size() as pure
diff --git a/src/shared/util.h b/src/shared/util.h
index fc59481..13a0b96 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -112,7 +112,7 @@
#define ANSI_HIGHLIGHT_OFF "\x1B[0m"
#define ANSI_ERASE_TO_END_OF_LINE "\x1B[K"
-size_t page_size(void);
+size_t page_size(void) _pure_;
#define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
#define streq(a,b) (strcmp((a),(b)) == 0)
More information about the systemd-commits
mailing list