aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-31 14:33:26 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-31 14:33:26 +0100
commitf03de5415d4395970c42dfb391101101d169ecfc (patch)
tree6d8bf517a21bea920f920675ea8b85189a86017a
parentfcc80176d0cc8ff81f818db47c27c719ecacc6a5 (diff)
downloadpatches-f03de5415d4395970c42dfb391101101d169ecfc.tar.gz
message fields updated
-rw-r--r--0001-kdbus-interprocess-message-router.patch82
1 files changed, 52 insertions, 30 deletions
diff --git a/0001-kdbus-interprocess-message-router.patch b/0001-kdbus-interprocess-message-router.patch
index b20a24a0c87278..c563642cdf968c 100644
--- a/0001-kdbus-interprocess-message-router.patch
+++ b/0001-kdbus-interprocess-message-router.patch
@@ -8,15 +8,15 @@ Nothing to see here, move along...
drivers/Makefile | 1
drivers/kdbus/Kconfig | 5
drivers/kdbus/Makefile | 4
- drivers/kdbus/bus.c | 122 +++++++++
+ drivers/kdbus/bus.c | 122 ++++++++
drivers/kdbus/ep.c | 200 ++++++++++++++
- drivers/kdbus/kdbus.c | 610 +++++++++++++++++++++++++++++++++++++++++++++
- drivers/kdbus/kdbus.h | 201 ++++++++++++++
- drivers/kdbus/ns.c | 217 ++++++++++++++++
- include/uapi/kdbus/kdbus.h | 86 ++++++
+ drivers/kdbus/kdbus.c | 611 +++++++++++++++++++++++++++++++++++++++++++++
+ drivers/kdbus/kdbus.h | 185 +++++++++++++
+ drivers/kdbus/ns.c | 217 +++++++++++++++
+ include/uapi/kdbus/kdbus.h | 123 +++++++++
include/uapi/linux/major.h | 2
kdbus.c | 77 +++++
- 12 files changed, 1527 insertions(+)
+ 12 files changed, 1549 insertions(+)
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -379,7 +379,7 @@ Nothing to see here, move along...
+
--- /dev/null
+++ b/drivers/kdbus/kdbus.c
-@@ -0,0 +1,610 @@
+@@ -0,0 +1,611 @@
+/*
+ * kdbus - interprocess message routing
+ *
@@ -934,7 +934,7 @@ Nothing to see here, move along...
+ }
+
+ m->src_id = conn->id;
-+ m->id = conn->ep->bus->msg_id_next++;
++ m->msg_id = conn->ep->bus->msg_id_next++;
+ *msg = m;
+ return 0;
+out_err:
@@ -951,7 +951,8 @@ Nothing to see here, move along...
+ return -ENOENT;
+
+ pr_info("sending message %llu from %llu to %llu\n",
-+ (unsigned long long)msg->id, (unsigned long long)msg->src_id,
++ (unsigned long long)msg->msg_id,
++ (unsigned long long)msg->src_id,
+ (unsigned long long)msg->dst_id);
+
+ kdbus_msg_free(msg);
@@ -992,7 +993,7 @@ Nothing to see here, move along...
+MODULE_ALIAS("devname:kdbus/control");
--- /dev/null
+++ b/drivers/kdbus/kdbus.h
-@@ -0,0 +1,201 @@
+@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2013 Kay Sievers
+ * Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@ -1130,22 +1131,6 @@ Nothing to see here, move along...
+ u32 flags;
+};
+
-+struct kdbus_msg {
-+ u64 src_id;
-+ u64 dst_id;
-+ u64 flags;
-+ uid_t src_uid;
-+ gid_t src_gid;
-+ pid_t src_pid;
-+ pid_t src_tid;
-+ u64 ts_nsec;
-+ u64 id;
-+ u64 reserved[8];
-+ u32 data_count;
-+ struct kdbus_msg_data *data;
-+};
-+
-+
+/* To knock around with for now */
+struct kdbus_test_msg {
+ struct kref kref;
@@ -1416,7 +1401,7 @@ Nothing to see here, move along...
+
--- /dev/null
+++ b/include/uapi/kdbus/kdbus.h
-@@ -0,0 +1,86 @@
+@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2013 Kay Sievers
+ * Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@ -1441,10 +1426,47 @@ Nothing to see here, move along...
+ char reserved[256];
+};
+
-+struct kdbus_message {
++struct kdbus_fake_message {
+ char msg[256]; /* FIXME obviously... */
+};
+
++/**
++ * struct kdbus_msg
++ *
++ * set by userspace:
++ * dst_id: destination id
++ * filter: bloom filter for the kernel to use to filter messages
++ * data_count: number of data structures for this message
++ * data: data for the message
++ *
++ * set by kernel:
++ * msg_id: message id, to allow userspace to sort messages
++ * src_id: who sent the message
++ * src_uid: uid of sending process
++ * src_gid: gid of sending process
++ * src_pid: pid of sending process
++ * src_tid: tid of sending process
++ * ts_nsec: timestamp when message was sent to the kernel
++ *
++ */
++struct kdbus_msg {
++ __u64 dst_id;
++ __u64 filter;
++
++ __u64 msg_id;
++ __u64 src_id;
++ __u64 flags;
++ __kernel_uid_t src_uid;
++ __kernel_gid_t src_gid;
++ __kernel_pid_t src_pid;
++ __kernel_pid_t src_tid;
++ __u64 ts_nsec;
++ __u64 reserved[8];
++ __u32 data_count;
++ struct kdbus_msg_data *data;
++};
++
++
+
+#if 0
+/* Old-style dbus had the following message type: */
@@ -1498,8 +1520,8 @@ Nothing to see here, move along...
+ KDBUS_CMD_MATCH_ADD = _IOWR(KDBUS_IOC_MAGIC, 0x60, int),
+ KDBUS_CMD_MATCH_REMOVE = _IOWR(KDBUS_IOC_MAGIC, 0x61, int),
+
-+ KDBUS_CMD_MSG_SEND = _IOWR(KDBUS_IOC_MAGIC, 0x80, struct kdbus_message),
-+ KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOC_MAGIC, 0x81, struct kdbus_message),
++ KDBUS_CMD_MSG_SEND = _IOWR(KDBUS_IOC_MAGIC, 0x80, struct kdbus_fake_message),
++ KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOC_MAGIC, 0x81, struct kdbus_fake_message),
+};
+
+#endif