Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 7 | #ifndef _LINUX_KCOV_IOCTLS_H |
| 8 | #define _LINUX_KCOV_IOCTLS_H |
| 9 | #include <linux/types.h> |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 10 | struct kcov_remote_arg { |
| 11 | __u32 trace_mode; |
| 12 | __u32 area_size; |
| 13 | __u32 num_handles; |
| 14 | __aligned_u64 common_handle; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 15 | __aligned_u64 handles[]; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 16 | }; |
| 17 | #define KCOV_REMOTE_MAX_HANDLES 0x100 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 18 | #define KCOV_INIT_TRACE _IOR('c', 1, unsigned long) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 19 | #define KCOV_ENABLE _IO('c', 100) |
| 20 | #define KCOV_DISABLE _IO('c', 101) |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 21 | #define KCOV_REMOTE_ENABLE _IOW('c', 102, struct kcov_remote_arg) |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 22 | enum { |
| 23 | KCOV_TRACE_PC = 0, |
| 24 | KCOV_TRACE_CMP = 1, |
| 25 | }; |
| 26 | #define KCOV_CMP_CONST (1 << 0) |
| 27 | #define KCOV_CMP_SIZE(n) ((n) << 1) |
| 28 | #define KCOV_CMP_MASK KCOV_CMP_SIZE(3) |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 29 | #define KCOV_SUBSYSTEM_COMMON (0x00ull << 56) |
| 30 | #define KCOV_SUBSYSTEM_USB (0x01ull << 56) |
| 31 | #define KCOV_SUBSYSTEM_MASK (0xffull << 56) |
| 32 | #define KCOV_INSTANCE_MASK (0xffffffffull) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 33 | #endif |