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 | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_RSEQ_H |
| 8 | #define _UAPI_LINUX_RSEQ_H |
| 9 | #include <linux/types.h> |
| 10 | #include <asm/byteorder.h> |
| 11 | enum rseq_cpu_id_state { |
| 12 | RSEQ_CPU_ID_UNINITIALIZED = - 1, |
| 13 | RSEQ_CPU_ID_REGISTRATION_FAILED = - 2, |
| 14 | }; |
| 15 | enum rseq_flags { |
| 16 | RSEQ_FLAG_UNREGISTER = (1 << 0), |
| 17 | }; |
| 18 | enum rseq_cs_flags_bit { |
| 19 | RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0, |
| 20 | RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1, |
| 21 | RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2, |
| 22 | }; |
| 23 | enum rseq_cs_flags { |
| 24 | RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT), |
| 25 | RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT), |
| 26 | RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT), |
| 27 | }; |
| 28 | struct rseq_cs { |
| 29 | __u32 version; |
| 30 | __u32 flags; |
| 31 | __u64 start_ip; |
| 32 | __u64 post_commit_offset; |
| 33 | __u64 abort_ip; |
| 34 | } __attribute__((aligned(4 * sizeof(__u64)))); |
| 35 | struct rseq { |
| 36 | __u32 cpu_id_start; |
| 37 | __u32 cpu_id; |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame] | 38 | __u64 rseq_cs; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 39 | __u32 flags; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 40 | __u32 node_id; |
| 41 | __u32 mm_cid; |
| 42 | char end[]; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 43 | } __attribute__((aligned(4 * sizeof(__u64)))); |
| 44 | #endif |