xref: /aosp_15_r20/external/ltp/include/lapi/prctl.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker /*
3*49cdfc7eSAndroid Build Coastguard Worker  * Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
4*49cdfc7eSAndroid Build Coastguard Worker  * Author: Xiao Yang <[email protected]>
5*49cdfc7eSAndroid Build Coastguard Worker  */
6*49cdfc7eSAndroid Build Coastguard Worker 
7*49cdfc7eSAndroid Build Coastguard Worker #ifndef LAPI_PRCTL_H__
8*49cdfc7eSAndroid Build Coastguard Worker #define LAPI_PRCTL_H__
9*49cdfc7eSAndroid Build Coastguard Worker 
10*49cdfc7eSAndroid Build Coastguard Worker #include <sys/prctl.h>
11*49cdfc7eSAndroid Build Coastguard Worker 
12*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_SET_NAME
13*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_NAME 15
14*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_NAME 16
15*49cdfc7eSAndroid Build Coastguard Worker #endif
16*49cdfc7eSAndroid Build Coastguard Worker 
17*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_SET_SECCOMP
18*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_SECCOMP  21
19*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_SECCOMP  22
20*49cdfc7eSAndroid Build Coastguard Worker #endif
21*49cdfc7eSAndroid Build Coastguard Worker 
22*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_SET_TSC
23*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_TSC 25
24*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_TSC 26
25*49cdfc7eSAndroid Build Coastguard Worker # define PR_TSC_ENABLE  1
26*49cdfc7eSAndroid Build Coastguard Worker # define PR_TSC_SIGSEGV 2
27*49cdfc7eSAndroid Build Coastguard Worker #endif
28*49cdfc7eSAndroid Build Coastguard Worker 
29*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_SET_TIMERSLACK
30*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_TIMERSLACK 29
31*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_TIMERSLACK 30
32*49cdfc7eSAndroid Build Coastguard Worker #endif
33*49cdfc7eSAndroid Build Coastguard Worker 
34*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_SET_CHILD_SUBREAPER
35*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_CHILD_SUBREAPER	36
36*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_CHILD_SUBREAPER	37
37*49cdfc7eSAndroid Build Coastguard Worker #endif
38*49cdfc7eSAndroid Build Coastguard Worker 
39*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_SET_NO_NEW_PRIVS
40*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_NO_NEW_PRIVS 38
41*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_NO_NEW_PRIVS 39
42*49cdfc7eSAndroid Build Coastguard Worker #endif
43*49cdfc7eSAndroid Build Coastguard Worker 
44*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_SET_THP_DISABLE
45*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_THP_DISABLE 41
46*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_THP_DISABLE 42
47*49cdfc7eSAndroid Build Coastguard Worker #endif
48*49cdfc7eSAndroid Build Coastguard Worker 
49*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_CAP_AMBIENT
50*49cdfc7eSAndroid Build Coastguard Worker # define PR_CAP_AMBIENT             47
51*49cdfc7eSAndroid Build Coastguard Worker # define PR_CAP_AMBIENT_IS_SET      1
52*49cdfc7eSAndroid Build Coastguard Worker # define PR_CAP_AMBIENT_RAISE       2
53*49cdfc7eSAndroid Build Coastguard Worker # define PR_CAP_AMBIENT_LOWER       3
54*49cdfc7eSAndroid Build Coastguard Worker # define PR_CAP_AMBIENT_CLEAR_ALL   4
55*49cdfc7eSAndroid Build Coastguard Worker #endif
56*49cdfc7eSAndroid Build Coastguard Worker 
57*49cdfc7eSAndroid Build Coastguard Worker #ifndef PR_GET_SPECULATION_CTRL
58*49cdfc7eSAndroid Build Coastguard Worker # define PR_GET_SPECULATION_CTRL 52
59*49cdfc7eSAndroid Build Coastguard Worker # define PR_SET_SPECULATION_CTRL 53
60*49cdfc7eSAndroid Build Coastguard Worker #endif
61*49cdfc7eSAndroid Build Coastguard Worker 
62*49cdfc7eSAndroid Build Coastguard Worker #endif /* LAPI_PRCTL_H__ */
63