+ * Embedded in:
+ * struct kdbus_policy
+ */
+struct kdbus_policy_access {
+ __u64 type; /* USER, GROUP, WORLD */
+ __u64 bits; /* RECV, SEND, OWN */
+ __u64 id; /* uid, gid, 0 */
+};
+
+/**
+ * struct kdbus_policy - a policy item
+ * @access: Policy access details
+ * @name: Well-known name to grant access to
+ *
+ * Attached to:
+ * KDBUS_POLICY_ACCESS
+ * KDBUS_ITEM_POLICY_NAME
+ */
+struct kdbus_policy {
+ union {
+ struct kdbus_policy_access access;
+ char name[0];
+ };
+};
+
+/**
+ * enum kdbus_item_type - item types to chain data in a list
+ * @KDBUS_ITEM_PAYLOAD_VEC: Vevtor to data
+ * @KDBUS_ITEM_PAYLOAD_OFF: Data at returned offset in the pool
+ * @KDBUS_ITEM_PAYLOAD_MEMFD: Data as sealed memfd
+ * @KDBUS_ITEM_FDS: Attached file descriptors
+ * @KDBUS_ITEM_BLOOM: For broadcasts, carries bloom filter
+ * @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_NAME: Policy in struct kdbus_policy
+ * @KDBUS_ITEM_POLICY_ACCESS: Policy in struct kdbus_policy
+ * @KDBUS_ITEM_NAME: Well-know name with flags
+ * @KDBUS_ITEM_STARTER_NAME: Well-known name for the starter
+ * @KDBUS_ITEM_TIMESTAMP: Timestamp
+ * @KDBUS_ITEM_CREDS: Process credential
+ * @KDBUS_ITEM_PID_COMM: Process ID "comm" identifier
+ * @KDBUS_ITEM_TID_COMM: Thread ID "comm" identifier
+ * @KDBUS_ITEM_EXE: The path of the executable
+ * @KDBUS_ITEM_CMDLINE: The process command line
+ * @KDBUS_ITEM_CGROUP: The croup membership
+ * @KDBUS_ITEM_CAPS: The process capabilities
+ * @KDBUS_ITEM_SECLABEL: The security label
+ * @KDBUS_ITEM_AUDIT: The audit IDs
+ * @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
+ * @KDBUS_ITEM_ID_ADD: Notify in struct kdbus_notify_id_change
+ * @KDBUS_ITEM_ID_REMOVE: Notify in struct kdbus_notify_id_change
+ * @KDBUS_ITEM_REPLY_TIMEOUT: Timeout has been reached
+ * @KDBUS_ITEM_REPLY_DEAD: Destiantion died
+ */
+enum kdbus_item_type {
+ _KDBUS_ITEM_NULL,
+ _KDBUS_ITEM_USER_BASE,
+ KDBUS_ITEM_PAYLOAD_VEC = _KDBUS_ITEM_USER_BASE,
+ KDBUS_ITEM_PAYLOAD_OFF,
+ KDBUS_ITEM_PAYLOAD_MEMFD,
+ KDBUS_ITEM_FDS,
+ KDBUS_ITEM_BLOOM,
+ KDBUS_ITEM_DST_NAME,
+ KDBUS_ITEM_PRIORITY,
+ KDBUS_ITEM_MAKE_NAME,
+
+ _KDBUS_ITEM_POLICY_BASE = 0x400,
+ KDBUS_ITEM_POLICY_NAME = _KDBUS_ITEM_POLICY_BASE,
+ KDBUS_ITEM_POLICY_ACCESS,
+
+ _KDBUS_ITEM_ATTACH_BASE = 0x600,
+ KDBUS_ITEM_NAME = _KDBUS_ITEM_ATTACH_BASE,
+ KDBUS_ITEM_STARTER_NAME,
+ KDBUS_ITEM_TIMESTAMP,
+ KDBUS_ITEM_CREDS,
+ KDBUS_ITEM_PID_COMM,
+ KDBUS_ITEM_TID_COMM,
+ KDBUS_ITEM_EXE,
+ KDBUS_ITEM_CMDLINE,
+ KDBUS_ITEM_CGROUP,
+ KDBUS_ITEM_CAPS,
+ KDBUS_ITEM_SECLABEL,
+ KDBUS_ITEM_AUDIT,
+
+ _KDBUS_ITEM_KERNEL_BASE = 0x800,
+ KDBUS_ITEM_NAME_ADD = _KDBUS_ITEM_KERNEL_BASE,
+ KDBUS_ITEM_NAME_REMOVE,
+ KDBUS_ITEM_NAME_CHANGE,
+ KDBUS_ITEM_ID_ADD,
+ KDBUS_ITEM_ID_REMOVE,
+ KDBUS_ITEM_REPLY_TIMEOUT,
+ KDBUS_ITEM_REPLY_DEAD,
+};
+
+/**
+ * struct kdbus_item - chain of data blocks
+ * @size: Overall data record size
+ * @type: Kdbus_item type of data
+ * @data: Generic bytes
+ * @data32: Generic 32 bit array
+ * @data64: Generic 64 bit array
+ * @str: Generic string
+ * @id: Connection ID
+ * @vec: KDBUS_ITEM_PAYLOAD_VEC
+ * @creds: KDBUS_ITEM_CREDS
+ * @audit: KDBUS_ITEM_AUDIT
+ * @timestamp: KDBUS_ITEM_TIMESTAMP
+ * @name: KDBUS_ITEM_NAME
+ * @memfd: KDBUS_ITEM_PAYLOAD_MEMFD
+ * @name_change: KDBUS_ITEM_NAME_ADD
+ * KDBUS_ITEM_NAME_REMOVE
+ * KDBUS_ITEM_NAME_CHANGE
+ * @id_change: KDBUS_ITEM_ID_ADD
+ * KDBUS_ITEM_ID_REMOVE
+ * @policy: KDBUS_ITEM_POLICY_NAME
+ * KDBUS_ITEM_POLICY_ACCESS