Dr Andrew Scott G7VAV

My photo
 
May 2024
Mo Tu We Th Fr Sa Su
29 30 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 1 2
3 4 5 6 7 8 9


prctl.h
001: #ifndef _LINUX_PRCTL_H
002: #define _LINUX_PRCTL_H
003: 
004: /* Values to pass as first argument to prctl() */
005: 
006: #define PR_SET_PDEATHSIG  1  /* Second arg is a signal */
007: #define PR_GET_PDEATHSIG  2  /* Second arg is a ptr to return the signal */
008: 
009: /* Get/set current->mm->dumpable */
010: #define PR_GET_DUMPABLE   3
011: #define PR_SET_DUMPABLE   4
012: 
013: /* Get/set unaligned access control bits (if meaningful) */
014: #define PR_GET_UNALIGN    5
015: #define PR_SET_UNALIGN    6
016: # define PR_UNALIGN_NOPRINT     1       /* silently fix up unaligned user accesses */
017: # define PR_UNALIGN_SIGBUS      2       /* generate SIGBUS on unaligned user access */
018: 
019: /* Get/set whether or not to drop capabilities on setuid() away from
020:  * uid 0 (as per security/commoncap.c) */
021: #define PR_GET_KEEPCAPS   7
022: #define PR_SET_KEEPCAPS   8
023: 
024: /* Get/set floating-point emulation control bits (if meaningful) */
025: #define PR_GET_FPEMU  9
026: #define PR_SET_FPEMU 10
027: # define PR_FPEMU_NOPRINT       1       /* silently emulate fp operations accesses */
028: # define PR_FPEMU_SIGFPE        2       /* don't emulate fp operations, send SIGFPE instead */
029: 
030: /* Get/set floating-point exception mode (if meaningful) */
031: #define PR_GET_FPEXC    11
032: #define PR_SET_FPEXC    12
033: # define PR_FP_EXC_SW_ENABLE    0x80    /* Use FPEXC for FP exception enables */
034: # define PR_FP_EXC_DIV          0x010000        /* floating point divide by zero */
035: # define PR_FP_EXC_OVF          0x020000        /* floating point overflow */
036: # define PR_FP_EXC_UND          0x040000        /* floating point underflow */
037: # define PR_FP_EXC_RES          0x080000        /* floating point inexact result */
038: # define PR_FP_EXC_INV          0x100000        /* floating point invalid operation */
039: # define PR_FP_EXC_DISABLED     0       /* FP exceptions disabled */
040: # define PR_FP_EXC_NONRECOV     1       /* async non-recoverable exc. mode */
041: # define PR_FP_EXC_ASYNC        2       /* async recoverable exception mode */
042: # define PR_FP_EXC_PRECISE      3       /* precise exception mode */
043: 
044: /* Get/set whether we use statistical process timing or accurate timestamp
045:  * based process timing */
046: #define PR_GET_TIMING   13
047: #define PR_SET_TIMING   14
048: # define PR_TIMING_STATISTICAL  0       /* Normal, traditional,
049:                                                    statistical process timing */
050: # define PR_TIMING_TIMESTAMP    1       /* Accurate timestamp based
051:                                                    process timing */
052: 
053: #define PR_SET_NAME    15               /* Set process name */
054: #define PR_GET_NAME    16               /* Get process name */
055: 
056: /* Get/set process endian */
057: #define PR_GET_ENDIAN   19
058: #define PR_SET_ENDIAN   20
059: # define PR_ENDIAN_BIG          0
060: # define PR_ENDIAN_LITTLE       1       /* True little endian mode */
061: # define PR_ENDIAN_PPC_LITTLE   2       /* "PowerPC" pseudo little endian */
062: 
063: /* Get/set process seccomp mode */
064: #define PR_GET_SECCOMP  21
065: #define PR_SET_SECCOMP  22
066: 
067: /* Get/set the capability bounding set (as per security/commoncap.c) */
068: #define PR_CAPBSET_READ 23
069: #define PR_CAPBSET_DROP 24
070: 
071: /* Get/set the process' ability to use the timestamp counter instruction */
072: #define PR_GET_TSC 25
073: #define PR_SET_TSC 26
074: # define PR_TSC_ENABLE          1       /* allow the use of the timestamp counter */
075: # define PR_TSC_SIGSEGV         2       /* throw a SIGSEGV instead of reading the TSC */
076: 
077: /* Get/set securebits (as per security/commoncap.c) */
078: #define PR_GET_SECUREBITS 27
079: #define PR_SET_SECUREBITS 28
080: 
081: /*
082:  * Get/set the timerslack as used by poll/select/nanosleep
083:  * A value of 0 means "use default"
084:  */
085: #define PR_SET_TIMERSLACK 29
086: #define PR_GET_TIMERSLACK 30
087: 
088: #define PR_TASK_PERF_EVENTS_DISABLE             31
089: #define PR_TASK_PERF_EVENTS_ENABLE              32
090: 
091: /*
092:  * Set early/late kill mode for hwpoison memory corruption.
093:  * This influences when the process gets killed on a memory corruption.
094:  */
095: #define PR_MCE_KILL     33
096: # define PR_MCE_KILL_CLEAR   0
097: # define PR_MCE_KILL_SET     1
098: 
099: # define PR_MCE_KILL_LATE    0
100: # define PR_MCE_KILL_EARLY   1
101: # define PR_MCE_KILL_DEFAULT 2
102: 
103: #define PR_MCE_KILL_GET 34
104: 
105: /*
106:  * Tune up process memory map specifics.
107:  */
108: #define PR_SET_MM               35
109: # define PR_SET_MM_START_CODE           1
110: # define PR_SET_MM_END_CODE             2
111: # define PR_SET_MM_START_DATA           3
112: # define PR_SET_MM_END_DATA             4
113: # define PR_SET_MM_START_STACK          5
114: # define PR_SET_MM_START_BRK            6
115: # define PR_SET_MM_BRK                  7
116: 
117: /*
118:  * Set specific pid that is allowed to ptrace the current task.
119:  * A value of 0 mean "no process".
120:  */
121: #define PR_SET_PTRACER 0x59616d61
122: # define PR_SET_PTRACER_ANY ((unsigned long)-1)
123: 
124: /*
125:  * If no_new_privs is set, then operations that grant new privileges (i.e.
126:  * execve) will either fail or not grant them.  This affects suid/sgid,
127:  * file capabilities, and LSMs.
128:  *
129:  * Operations that merely manipulate or drop existing privileges (setresuid,
130:  * capset, etc.) will still work.  Drop those privileges if you want them gone.
131:  *
132:  * Changing LSM security domain is considered a new privilege.  So, for example,
133:  * asking selinux for a specific new context (e.g. with runcon) will result
134:  * in execve returning -EPERM.
135:  */
136: #define PR_SET_NO_NEW_PRIVS 38
137: #define PR_GET_NO_NEW_PRIVS 39
138: 
139: #endif /* _LINUX_PRCTL_H */
140: 


for client 18.225.35.81
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/