blob: 29a9457bd1b657eb637affe11eff17674566b525 [file] [log] [blame]
Colin Cross07a58322022-02-08 19:45:27 -08001/****************************************************************************
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;
Jordan Demeulenaere2d505822022-08-11 17:20:14 +020050 __u64 rseq_cs;
Colin Cross07a58322022-02-08 19:45:27 -080051 __u32 flags;
52} __attribute__((aligned(4 * sizeof(__u64))));
53#endif