blob: 54190b611b14edba29317403594a5c57cd34ed2f [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Ferris9ce28842018-10-25 12:11:39 -07007#ifndef _UAPI_LINUX_RSEQ_H
8#define _UAPI_LINUX_RSEQ_H
9#include <linux/types.h>
10#include <asm/byteorder.h>
11enum rseq_cpu_id_state {
12 RSEQ_CPU_ID_UNINITIALIZED = - 1,
13 RSEQ_CPU_ID_REGISTRATION_FAILED = - 2,
14};
15enum rseq_flags {
16 RSEQ_FLAG_UNREGISTER = (1 << 0),
17};
18enum 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};
23enum 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};
28struct 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))));
35struct rseq {
36 __u32 cpu_id_start;
37 __u32 cpu_id;
Christopher Ferris10a76e62022-06-08 13:31:52 -070038 __u64 rseq_cs;
Christopher Ferris9ce28842018-10-25 12:11:39 -070039 __u32 flags;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000040 __u32 node_id;
41 __u32 mm_cid;
42 char end[];
Christopher Ferris9ce28842018-10-25 12:11:39 -070043} __attribute__((aligned(4 * sizeof(__u64))));
44#endif