diff options
Diffstat (limited to 'include/uapi/linux/android/binder.h')
-rw-r--r-- | include/uapi/linux/android/binder.h | 60 |
1 files changed, 16 insertions, 44 deletions
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h index 4a1c285b97b1..2832134e5397 100644 --- a/include/uapi/linux/android/binder.h +++ b/include/uapi/linux/android/binder.h @@ -38,56 +38,17 @@ enum { BINDER_TYPE_PTR = B_PACK_CHARS('p', 't', '*', B_TYPE_LARGE), }; -/** - * enum flat_binder_object_shifts: shift values for flat_binder_object_flags - * @FLAT_BINDER_FLAG_SCHED_POLICY_SHIFT: shift for getting scheduler policy. - * - */ -enum flat_binder_object_shifts { - FLAT_BINDER_FLAG_SCHED_POLICY_SHIFT = 9, -}; - -/** - * enum flat_binder_object_flags - flags for use in flat_binder_object.flags - */ -enum flat_binder_object_flags { - /** - * @FLAT_BINDER_FLAG_PRIORITY_MASK: bit-mask for min scheduler priority - * - * These bits can be used to set the minimum scheduler priority - * at which transactions into this node should run. Valid values - * in these bits depend on the scheduler policy encoded in - * @FLAT_BINDER_FLAG_SCHED_POLICY_MASK. - * - * For SCHED_NORMAL/SCHED_BATCH, the valid range is between [-20..19] - * For SCHED_FIFO/SCHED_RR, the value can run between [1..99] - */ +enum { FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff, - /** - * @FLAT_BINDER_FLAG_ACCEPTS_FDS: whether the node accepts fds. - */ FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100, - /** - * @FLAT_BINDER_FLAG_SCHED_POLICY_MASK: bit-mask for scheduling policy - * - * These two bits can be used to set the min scheduling policy at which - * transactions on this node should run. These match the UAPI - * scheduler policy values, eg: - * 00b: SCHED_NORMAL - * 01b: SCHED_FIFO - * 10b: SCHED_RR - * 11b: SCHED_BATCH - */ - FLAT_BINDER_FLAG_SCHED_POLICY_MASK = - 3U << FLAT_BINDER_FLAG_SCHED_POLICY_SHIFT, /** - * @FLAT_BINDER_FLAG_INHERIT_RT: whether the node inherits RT policy + * @FLAT_BINDER_FLAG_TXN_SECURITY_CTX: request security contexts * - * Only when set, calls into this node will inherit a real-time - * scheduling policy from the caller (for synchronous transactions). + * Only when set, causes senders to include their security + * context */ - FLAT_BINDER_FLAG_INHERIT_RT = 0x800, + FLAT_BINDER_FLAG_TXN_SECURITY_CTX = 0x1000, }; #ifdef BINDER_IPC_32BIT @@ -265,6 +226,7 @@ struct binder_node_info_for_ref { #define BINDER_VERSION _IOWR('b', 9, struct binder_version) #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) #define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref) +#define BINDER_SET_CONTEXT_MGR_EXT _IOW('b', 13, struct flat_binder_object) /* * NOTE: Two special error codes you should check for when calling @@ -323,6 +285,11 @@ struct binder_transaction_data { } data; }; +struct binder_transaction_data_secctx { + struct binder_transaction_data transaction_data; + binder_uintptr_t secctx; +}; + struct binder_transaction_data_sg { struct binder_transaction_data transaction_data; binder_size_t buffers_size; @@ -358,6 +325,11 @@ enum binder_driver_return_protocol { BR_OK = _IO('r', 1), /* No parameters! */ + BR_TRANSACTION_SEC_CTX = _IOR('r', 2, + struct binder_transaction_data_secctx), + /* + * binder_transaction_data_secctx: the received command. + */ BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data), BR_REPLY = _IOR('r', 3, struct binder_transaction_data), /* |