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