diff options
| author | Colin Cross <ccross@android.com> | 2017-08-31 04:04:24 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-01 03:21:12 -0400 |
| commit | abcc61537e3566cae7f1fd225f2dcb82b3595fe3 (patch) | |
| tree | 42bb776af8185321b11aadbc201838347c16d143 /include/uapi/linux/android | |
| parent | 408c68b17aea2f23236cdb49b6c060e0ded846ed (diff) | |
ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl
The BINDER_GET_NODE_DEBUG_INFO ioctl will return debug info on
a node. Each successive call reusing the previous return value
will return the next node. The data will be used by
libmemunreachable to mark the pointers with kernel references
as reachable.
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Martijn Coenen <maco@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/android')
| -rw-r--r-- | include/uapi/linux/android/binder.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h index 7668b5791c91..84a9a0944e13 100644 --- a/include/uapi/linux/android/binder.h +++ b/include/uapi/linux/android/binder.h | |||
| @@ -186,6 +186,19 @@ struct binder_version { | |||
| 186 | #define BINDER_CURRENT_PROTOCOL_VERSION 8 | 186 | #define BINDER_CURRENT_PROTOCOL_VERSION 8 |
| 187 | #endif | 187 | #endif |
| 188 | 188 | ||
| 189 | /* | ||
| 190 | * Use with BINDER_GET_NODE_DEBUG_INFO, driver reads ptr, writes to all fields. | ||
| 191 | * Set ptr to NULL for the first call to get the info for the first node, and | ||
| 192 | * then repeat the call passing the previously returned value to get the next | ||
| 193 | * nodes. ptr will be 0 when there are no more nodes. | ||
| 194 | */ | ||
| 195 | struct binder_node_debug_info { | ||
| 196 | binder_uintptr_t ptr; | ||
| 197 | binder_uintptr_t cookie; | ||
| 198 | __u32 has_strong_ref; | ||
| 199 | __u32 has_weak_ref; | ||
| 200 | }; | ||
| 201 | |||
| 189 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) | 202 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) |
| 190 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) | 203 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) |
| 191 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) | 204 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) |
| @@ -193,6 +206,7 @@ struct binder_version { | |||
| 193 | #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) | 206 | #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) |
| 194 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) | 207 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) |
| 195 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) | 208 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) |
| 209 | #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) | ||
| 196 | 210 | ||
| 197 | /* | 211 | /* |
| 198 | * NOTE: Two special error codes you should check for when calling | 212 | * NOTE: Two special error codes you should check for when calling |
