blob: f83772075ddc64603e0ee74038683f154defd3e6 [file] [log] [blame]
Christopher Ferris9ce28842018-10-25 12:11:39 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_RSEQ_H
20#define _UAPI_LINUX_RSEQ_H
21#include <linux/types.h>
22#include <asm/byteorder.h>
23enum rseq_cpu_id_state {
24 RSEQ_CPU_ID_UNINITIALIZED = - 1,
25 RSEQ_CPU_ID_REGISTRATION_FAILED = - 2,
26};
27enum rseq_flags {
28 RSEQ_FLAG_UNREGISTER = (1 << 0),
29};
30enum rseq_cs_flags_bit {
31 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,
32 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,
33 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2,
34};
35enum rseq_cs_flags {
36 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT),
37 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT),
38 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE = (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT),
39};
40struct rseq_cs {
41 __u32 version;
42 __u32 flags;
43 __u64 start_ip;
44 __u64 post_commit_offset;
45 __u64 abort_ip;
46} __attribute__((aligned(4 * sizeof(__u64))));
47struct rseq {
48 __u32 cpu_id_start;
49 __u32 cpu_id;
Christopher Ferris10a76e62022-06-08 13:31:52 -070050 __u64 rseq_cs;
Christopher Ferris9ce28842018-10-25 12:11:39 -070051 __u32 flags;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000052 __u32 node_id;
53 __u32 mm_cid;
54 char end[];
Christopher Ferris9ce28842018-10-25 12:11:39 -070055} __attribute__((aligned(4 * sizeof(__u64))));
56#endif