fix kernel doc
authorKay Sievers <kay@vrfy.org>
Wed, 25 Dec 2013 16:59:07 +0000 (17:59 +0100)
committerKay Sievers <kay@vrfy.org>
Wed, 25 Dec 2013 17:02:37 +0000 (18:02 +0100)
TODO
bus.c
connection.c
handle.c
kdbus.h
match.c
message.c
message.h

diff --git a/TODO b/TODO
index aacaef5988729c551af4b83df7103eb4aff61b18..5f206bbe2f5ef10e8b1c353f3b08adca64c3c653 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,20 +1,27 @@
 Features:
+  - account and limit number of messages a connection can have in-flight
+    for another connection, like a connection can have a maximum of 100
+    messages in-flight, but only 10 of them to the same connection
+
   - make kdbus.ko loadable a second time with a different:
       /dev/kdbus/, /sys/bus/kdbus/ name
     to be able to run test environments while the first one
     is in use by the system
+
   - allow to update the metadata subscription bit mask
+
   - support the creation of anonymous buses
-  - implement the EP_MAKE logic
 
-External API:
+  - limit the number of connections per uid
+
+  - memfd's file pos is shared, document pread/pwrite
+
   - actually return compatible/incompatible flags to users
+
+External API:
   - rules for:
       -unknown items to ignore in userspace lib?
       -unknown items to ignore if SEND sees them?
-  - review all different structures of custom ioctls and items if they
-    can be somehow unified
 
-Internal:
-  - limit the number of connections per uid
-  - memfd's file pos is shared, document pread/pwrite
+  - review all different structures of custom ioctls and items if they
+    can be further unified
diff --git a/bus.c b/bus.c
index c8fba7179f7009f4c7a121c45b0f653d347d263e..0b859eaccdbdd5257dca1ad7e38961636bc79123 100644 (file)
--- a/bus.c
+++ b/bus.c
@@ -163,6 +163,7 @@ static struct kdbus_bus *kdbus_bus_find(struct kdbus_ns *ns, const char *name)
  * @make:              Pointer to a struct kdbus_cmd_make containing the
  *                     details for the bus creation
  * @name:              Name of the bus
+ * @bloom_size:                Size of the bloom filter on this bus
  * @mode:              The access mode for the device node
  * @uid:               The uid of the device node
  * @gid:               The gid of the device node
index 08f8905f996c34ec169e0ab1bb6c698b3aa6a218..f62a95998fe9bae233221d2857d3ba6875d36cb2 100644 (file)
@@ -52,7 +52,7 @@
  * @fds_count:         Number of files
  * @src_id:            The ID of the sender
  * @cookie:            Message cookie, used for replies
- * @src_name_id:       The sequence number of the name this message is
+ * @dst_name_id:       The sequence number of the name this message is
  *                     addressed to, 0 for messages sent to an ID
  */
 struct kdbus_conn_queue {
index d80af93224253ccdf083087328c2809e82be488b..e2e6c10b2d451f5ec0f82a69a964c042d225c835 100644 (file)
--- a/handle.c
+++ b/handle.c
 
 /**
  * enum kdbus_handle_type - type a handle can be of
- * @_KDBUS_HANDLE_NULL:                        internal null marker
- * @KDBUS_HANDLE_CONTROL:              new fd of a control node
- * @KDBUS_HANDLE_CONTROL_NS_OWNER:     fd to hold a namespace
- * @KDBUS_HANDLE_CONTROL_BUS_OWNER:    fd to hold a bus
- * @KDBUS_HANDLE_EP:                   new fd of a bus node
- * @KDBUS_HANDLE_EP_CONNECTED:         connection after HELLO
- * @KDBUS_HANDLE_EP_OWNER:             fd to hold an endpoint
- * @KDBUS_HANDLE_DISCONNECTED:         handle is disconnected
+ * @_KDBUS_HANDLE_NULL:                        Uninitialized/invalid
+ * @KDBUS_HANDLE_CONTROL:              New file descriptor of a control node
+ * @KDBUS_HANDLE_CONTROL_NS_OWNER:     File descriptor to hold a namespace
+ * @KDBUS_HANDLE_CONTROL_BUS_OWNER:    File descriptor to hold a bus
+ * @KDBUS_HANDLE_EP:                   New file descriptor of a bus node
+ * @KDBUS_HANDLE_EP_CONNECTED:         A bus connection after HELLO
+ * @KDBUS_HANDLE_EP_OWNER:             File descriptor to hold an endpoint
+ * @KDBUS_HANDLE_DISCONNECTED:         Handle is disconnected
  */
 enum kdbus_handle_type {
        _KDBUS_HANDLE_NULL,
@@ -63,7 +63,7 @@ enum kdbus_handle_type {
  * @type:      Type of this handle (KDBUS_HANDLE_*)
  * @ns:                Namespace for this handle
  * @meta:      Cached connection creator's metadata/credentials
- * @ep         The endpoint this handle owns, in case @type
+ * @ep:                The endpoint this handle owns, in case @type
  *             is KDBUS_HANDLE_EP
  * @ns_owner:  The namespace this handle owns, in case @type
  *             is KDBUS_HANDLE_CONTROL_NS_OWNER
@@ -344,7 +344,6 @@ static long kdbus_handle_ioctl_ep(struct file *file, unsigned int cmd,
                        gid = current_fsgid();
                }
 
-               //FIXME: what to do with the holder connection now?
                ret = kdbus_ep_new(handle->ep->bus, handle->ep->bus->ns, n,
                                   mode, current_fsuid(), gid,
                                   make->flags & KDBUS_MAKE_POLICY_OPEN);
@@ -617,7 +616,7 @@ static unsigned int kdbus_handle_poll(struct file *file,
        unsigned int mask = 0;
        bool disconnected;
 
-       /* Only an endpoint can read/write data */
+       /* Only a connected endpoint can read/write data */
        if (handle->type != KDBUS_HANDLE_EP_CONNECTED)
                return POLLERR | POLLHUP;
 
diff --git a/kdbus.h b/kdbus.h
index 71cfe06eac1b37eace0f0b65ae8b8f05cf751087..e1ef1a3078bac730c96c0c90cd8fe59b8420ad7e 100644 (file)
--- a/kdbus.h
+++ b/kdbus.h
@@ -193,6 +193,8 @@ struct kdbus_policy {
 
 /**
  * enum kdbus_item_type - item types to chain data in a list
+ * @_KDBUS_ITEM_NULL:          Uninitialized/invalid
+ * @_KDBUS_ITEM_USER_BASE:     Start of user items
  * @KDBUS_ITEM_PAYLOAD_VEC:    Vector to data
  * @KDBUS_ITEM_PAYLOAD_OFF:    Data at returned offset to message head
  * @KDBUS_ITEM_PAYLOAD_MEMFD:  Data as sealed memfd
@@ -202,8 +204,10 @@ struct kdbus_policy {
  * @KDBUS_ITEM_DST_NAME:       Destination's well-known name
  * @KDBUS_ITEM_PRIORITY:       Queue priority for message
  * @KDBUS_ITEM_MAKE_NAME:      Name of namespace, bus, endpoint
+ * @_KDBUS_ITEM_POLICY_BASE:   Start of policy items
  * @KDBUS_ITEM_POLICY_NAME:    Policy in struct kdbus_policy
  * @KDBUS_ITEM_POLICY_ACCESS:  Policy in struct kdbus_policy
+ * @_KDBUS_ITEM_ATTACH_BASE:   Start of metadata attach items
  * @KDBUS_ITEM_NAME:           Well-know name with flags
  * @KDBUS_ITEM_ID:             Connection ID
  * @KDBUS_ITEM_TIMESTAMP:      Timestamp
@@ -216,6 +220,7 @@ struct kdbus_policy {
  * @KDBUS_ITEM_CAPS:           The process capabilities
  * @KDBUS_ITEM_SECLABEL:       The security label
  * @KDBUS_ITEM_AUDIT:          The audit IDs
+ * @_KDBUS_ITEM_KERNEL_BASE:   Start of kernel-generated message items
  * @KDBUS_ITEM_NAME_ADD:       Notify in struct kdbus_notify_name_change
  * @KDBUS_ITEM_NAME_REMOVE:    Notify in struct kdbus_notify_name_change
  * @KDBUS_ITEM_NAME_CHANGE:    Notify in struct kdbus_notify_name_change
@@ -329,11 +334,11 @@ enum kdbus_msg_flags {
 /**
  * enum kdbus_payload_type - type of payload carried by message
  * @KDBUS_PAYLOAD_KERNEL:      Kernel-generated simple message
- * @KDBUS_PAYLOAD_DBUS:                D-Bus marshalling
+ * @KDBUS_PAYLOAD_DBUS:                D-Bus marshalling "DBusDBus"
  */
 enum kdbus_payload_type {
        KDBUS_PAYLOAD_KERNEL,
-       KDBUS_PAYLOAD_DBUS      = 0x4442757344427573ULL, /* 'DBusDBus' */
+       KDBUS_PAYLOAD_DBUS      = 0x4442757344427573ULL,
 };
 
 /**
@@ -370,6 +375,7 @@ struct kdbus_msg {
 
 /**
  * enum kdbus_policy_access_type - permissions of a policy record
+ * @_KDBUS_POLICY_ACCESS_NULL: Uninitialized/invalid
  * @KDBUS_POLICY_ACCESS_USER:  Grant access to a uid
  * @KDBUS_POLICY_ACCESS_GROUP: Grant access to gid
  * @KDBUS_POLICY_ACCESS_WORLD: World-accessible
diff --git a/match.c b/match.c
index 482acbba2049d75356c5f58dfe4a3237540a48cf..03e10371f6332214f0e46b7d71e5bda7eadafb50 100644 (file)
--- a/match.c
+++ b/match.c
@@ -247,11 +247,11 @@ static bool kdbus_match_rules(const struct kdbus_match_entry *entry,
  * @conn_src:          The connection object originating the message
  * @kmsg:              The kmsg to perform the match on
  *
- * Returns true in if there was a matching database entry, false otherwise.
-
  * This function will walk through all the database entries previously uploaded
  * with kdbus_match_db_add(). As soon as any of them has an all-satisfied rule
  * set, this function will return true.
+ *
+ * Returns true in if there was a matching database entry, false otherwise.
  */
 bool kdbus_match_db_match_kmsg(struct kdbus_match_db *db,
                               struct kdbus_conn *conn_src,
index 2bbcc40a934471b7216542ee4c5b1679bce00091..16db583768eef879290f4becc1657a17f7c66adb 100644 (file)
--- a/message.c
+++ b/message.c
@@ -46,7 +46,7 @@ void kdbus_kmsg_free(struct kdbus_kmsg *kmsg)
 /**
  * kdbus_kmsg_new() - allocate message
  * @extra_size:                additional size to reserve for data
- * @m:                 Returned Message
+ * @kmsg:                      Returned Message
  *
  * Returns: 0 on success, negative errno on failure.
  */
@@ -234,7 +234,7 @@ static int kdbus_msg_scan_items(struct kdbus_conn *conn,
  * kdbus_kmsg_new_from_user() - copy message from user memory
  * @conn:              Connection
  * @msg:               User-provided message
- * @m:                 Copy of message
+ * @kmsg:              Copy of message
  *
  * Returns: 0 on success, negative errno on failure.
  */
index d49a7645c7e17e4ee545cad10c9ad8e441c7d09c..1fc6f2efa05671f8ab7562e0edca73f12c2178a0 100644 (file)
--- a/message.h
+++ b/message.h
@@ -19,7 +19,8 @@
 /**
  * struct kdbus_kmsg - internal message handling data
  * @notify_type:       Short-cut for faster lookup
- * @notify_id:         Short-cut for faster lookup
+ * @notify_old_id:     Short-cut for faster lookup
+ * @notify_new_id:     Short-cut for faster lookup
  * @notify_name:       Short-cut for faster lookup
  * @dst_name:          Short-cut to msg for faster lookup
  * @dst_name_id:       Short-cut to msg for faster lookup