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