| ... | @@ -0,0 +1,158 @@ |
| 1 | // SPDX-License-Identifier: MIT |
| 2 | // Copyright (c) 2015-2020 Zig Contributors |
| 3 | // This file is part of [zig](https://ziglang.org/), which is MIT licensed. |
| 4 | // The MIT license requires this copyright notice to be included in all copies |
| 5 | // and substantial portions of the software. |
| 6 | |
| 7 | pub const PR_SET_PDEATHSIG = 1; |
| 8 | pub const PR_GET_PDEATHSIG = 2; |
| 9 | |
| 10 | pub const PR_GET_DUMPABLE = 3; |
| 11 | pub const PR_SET_DUMPABLE = 4; |
| 12 | |
| 13 | pub const PR_GET_UNALIGN = 5; |
| 14 | pub const PR_SET_UNALIGN = 6; |
| 15 | pub const PR_UNALIGN_NOPRINT = 1; |
| 16 | pub const PR_UNALIGN_SIGBUS = 2; |
| 17 | |
| 18 | pub const PR_GET_KEEPCAPS = 7; |
| 19 | pub const PR_SET_KEEPCAPS = 8; |
| 20 | |
| 21 | pub const PR_GET_FPEMU = 9; |
| 22 | pub const PR_SET_FPEMU = 10; |
| 23 | pub const PR_FPEMU_NOPRINT = 1; |
| 24 | pub const PR_FPEMU_SIGFPE = 2; |
| 25 | |
| 26 | pub const PR_GET_FPEXC = 11; |
| 27 | pub const PR_SET_FPEXC = 12; |
| 28 | pub const PR_FP_EXC_SW_ENABLE = 0x80; |
| 29 | pub const PR_FP_EXC_DIV = 0x010000; |
| 30 | pub const PR_FP_EXC_OVF = 0x020000; |
| 31 | pub const PR_FP_EXC_UND = 0x040000; |
| 32 | pub const PR_FP_EXC_RES = 0x080000; |
| 33 | pub const PR_FP_EXC_INV = 0x100000; |
| 34 | pub const PR_FP_EXC_DISABLED = 0; |
| 35 | pub const PR_FP_EXC_NONRECOV = 1; |
| 36 | pub const PR_FP_EXC_ASYNC = 2; |
| 37 | pub const PR_FP_EXC_PRECISE = 3; |
| 38 | |
| 39 | pub const PR_GET_TIMING = 13; |
| 40 | pub const PR_SET_TIMING = 14; |
| 41 | pub const PR_TIMING_STATISTICAL = 0; |
| 42 | pub const PR_TIMING_TIMESTAMP = 1; |
| 43 | |
| 44 | pub const PR_SET_NAME = 15; |
| 45 | pub const PR_GET_NAME = 16; |
| 46 | |
| 47 | pub const PR_GET_ENDIAN = 19; |
| 48 | pub const PR_SET_ENDIAN = 20; |
| 49 | pub const PR_ENDIAN_BIG = 0; |
| 50 | pub const PR_ENDIAN_LITTLE = 1; |
| 51 | pub const PR_ENDIAN_PPC_LITTLE = 2; |
| 52 | |
| 53 | pub const PR_GET_SECCOMP = 21; |
| 54 | pub const PR_SET_SECCOMP = 22; |
| 55 | |
| 56 | pub const PR_CAPBSET_READ = 23; |
| 57 | pub const PR_CAPBSET_DROP = 24; |
| 58 | |
| 59 | pub const PR_GET_TSC = 25; |
| 60 | pub const PR_SET_TSC = 26; |
| 61 | pub const PR_TSC_ENABLE = 1; |
| 62 | pub const PR_TSC_SIGSEGV = 2; |
| 63 | |
| 64 | pub const PR_GET_SECUREBITS = 27; |
| 65 | pub const PR_SET_SECUREBITS = 28; |
| 66 | |
| 67 | pub const PR_SET_TIMERSLACK = 29; |
| 68 | pub const PR_GET_TIMERSLACK = 30; |
| 69 | |
| 70 | pub const PR_TASK_PERF_EVENTS_DISABLE = 31; |
| 71 | pub const PR_TASK_PERF_EVENTS_ENABLE = 32; |
| 72 | |
| 73 | pub const PR_MCE_KILL = 33; |
| 74 | pub const PR_MCE_KILL_CLEAR = 0; |
| 75 | pub const PR_MCE_KILL_SET = 1; |
| 76 | |
| 77 | pub const PR_MCE_KILL_LATE = 0; |
| 78 | pub const PR_MCE_KILL_EARLY = 1; |
| 79 | pub const PR_MCE_KILL_DEFAULT = 2; |
| 80 | |
| 81 | pub const PR_MCE_KILL_GET = 34; |
| 82 | |
| 83 | pub const PR_SET_MM = 35; |
| 84 | pub const PR_SET_MM_START_CODE = 1; |
| 85 | pub const PR_SET_MM_END_CODE = 2; |
| 86 | pub const PR_SET_MM_START_DATA = 3; |
| 87 | pub const PR_SET_MM_END_DATA = 4; |
| 88 | pub const PR_SET_MM_START_STACK = 5; |
| 89 | pub const PR_SET_MM_START_BRK = 6; |
| 90 | pub const PR_SET_MM_BRK = 7; |
| 91 | pub const PR_SET_MM_ARG_START = 8; |
| 92 | pub const PR_SET_MM_ARG_END = 9; |
| 93 | pub const PR_SET_MM_ENV_START = 10; |
| 94 | pub const PR_SET_MM_ENV_END = 11; |
| 95 | pub const PR_SET_MM_AUXV = 12; |
| 96 | pub const PR_SET_MM_EXE_FILE = 13; |
| 97 | pub const PR_SET_MM_MAP = 14; |
| 98 | pub const PR_SET_MM_MAP_SIZE = 15; |
| 99 | |
| 100 | pub const prctl_mm_map = extern struct { |
| 101 | start_code: u64, |
| 102 | end_code: u64, |
| 103 | start_data: u64, |
| 104 | end_data: u64, |
| 105 | start_brk: u64, |
| 106 | brk: u64, |
| 107 | start_stack: u64, |
| 108 | arg_start: u64, |
| 109 | arg_end: u64, |
| 110 | env_start: u64, |
| 111 | env_end: u64, |
| 112 | auxv: *u64, |
| 113 | auxv_size: u32, |
| 114 | exe_fd: u32, |
| 115 | }; |
| 116 | |
| 117 | pub const PR_SET_PTRACER = 0x59616d61; |
| 118 | pub const PR_SET_PTRACER_ANY = std.math.maxInt(c_ulong); |
| 119 | |
| 120 | pub const PR_SET_CHILD_SUBREAPER = 36; |
| 121 | pub const PR_GET_CHILD_SUBREAPER = 37; |
| 122 | |
| 123 | pub const PR_SET_NO_NEW_PRIVS = 38; |
| 124 | pub const PR_GET_NO_NEW_PRIVS = 39; |
| 125 | |
| 126 | pub const PR_GET_TID_ADDRESS = 40; |
| 127 | |
| 128 | pub const PR_SET_THP_DISABLE = 41; |
| 129 | pub const PR_GET_THP_DISABLE = 42; |
| 130 | |
| 131 | pub const PR_MPX_ENABLE_MANAGEMENT = 43; |
| 132 | pub const PR_MPX_DISABLE_MANAGEMENT = 44; |
| 133 | |
| 134 | pub const PR_SET_FP_MODE = 45; |
| 135 | pub const PR_GET_FP_MODE = 46; |
| 136 | pub const PR_FP_MODE_FR = 1 << 0; |
| 137 | pub const PR_FP_MODE_FRE = 1 << 1; |
| 138 | |
| 139 | pub const PR_CAP_AMBIENT = 47; |
| 140 | pub const PR_CAP_AMBIENT_IS_SET = 1; |
| 141 | pub const PR_CAP_AMBIENT_RAISE = 2; |
| 142 | pub const PR_CAP_AMBIENT_LOWER = 3; |
| 143 | pub const PR_CAP_AMBIENT_CLEAR_ALL = 4; |
| 144 | |
| 145 | pub const PR_SVE_SET_VL = 50; |
| 146 | pub const PR_SVE_SET_VL_ONEXEC = 1 << 18; |
| 147 | pub const PR_SVE_GET_VL = 51; |
| 148 | pub const PR_SVE_VL_LEN_MASK = 0xffff; |
| 149 | pub const PR_SVE_VL_INHERIT = 1 << 17; |
| 150 | |
| 151 | pub const PR_GET_SPECULATION_CTRL = 52; |
| 152 | pub const PR_SET_SPECULATION_CTRL = 53; |
| 153 | pub const PR_SPEC_STORE_BYPASS = 0; |
| 154 | pub const PR_SPEC_NOT_AFFECTED = 0; |
| 155 | pub const PR_SPEC_PRCTL = 1 << 0; |
| 156 | pub const PR_SPEC_ENABLE = 1 << 1; |
| 157 | pub const PR_SPEC_DISABLE = 1 << 2; |
| 158 | pub const PR_SPEC_FORCE_DISABLE = 1 << 3; |