Merge tag 'microblaze-4.15-rc2' of git://git.monstr.eu/linux-2.6-microblaze
[platform/kernel/linux-starfive.git] / include / uapi / linux / personality.h
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI_LINUX_PERSONALITY_H
3 #define _UAPI_LINUX_PERSONALITY_H
4
5
6 /*
7  * Flags for bug emulation.
8  *
9  * These occupy the top three bytes.
10  */
11 enum {
12         UNAME26 =               0x0020000,
13         ADDR_NO_RANDOMIZE =     0x0040000,      /* disable randomization of VA space */
14         FDPIC_FUNCPTRS =        0x0080000,      /* userspace function ptrs point to descriptors
15                                                  * (signal handling)
16                                                  */
17         MMAP_PAGE_ZERO =        0x0100000,
18         ADDR_COMPAT_LAYOUT =    0x0200000,
19         READ_IMPLIES_EXEC =     0x0400000,
20         ADDR_LIMIT_32BIT =      0x0800000,
21         SHORT_INODE =           0x1000000,
22         WHOLE_SECONDS =         0x2000000,
23         STICKY_TIMEOUTS =       0x4000000,
24         ADDR_LIMIT_3GB =        0x8000000,
25 };
26
27 /*
28  * Security-relevant compatibility flags that must be
29  * cleared upon setuid or setgid exec:
30  */
31 #define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC  | \
32                             ADDR_NO_RANDOMIZE  | \
33                             ADDR_COMPAT_LAYOUT | \
34                             MMAP_PAGE_ZERO)
35
36 /*
37  * Personality types.
38  *
39  * These go in the low byte.  Avoid using the top bit, it will
40  * conflict with error returns.
41  */
42 enum {
43         PER_LINUX =             0x0000,
44         PER_LINUX_32BIT =       0x0000 | ADDR_LIMIT_32BIT,
45         PER_LINUX_FDPIC =       0x0000 | FDPIC_FUNCPTRS,
46         PER_SVR4 =              0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
47         PER_SVR3 =              0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
48         PER_SCOSVR3 =           0x0003 | STICKY_TIMEOUTS |
49                                          WHOLE_SECONDS | SHORT_INODE,
50         PER_OSR5 =              0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,
51         PER_WYSEV386 =          0x0004 | STICKY_TIMEOUTS | SHORT_INODE,
52         PER_ISCR4 =             0x0005 | STICKY_TIMEOUTS,
53         PER_BSD =               0x0006,
54         PER_SUNOS =             0x0006 | STICKY_TIMEOUTS,
55         PER_XENIX =             0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
56         PER_LINUX32 =           0x0008,
57         PER_LINUX32_3GB =       0x0008 | ADDR_LIMIT_3GB,
58         PER_IRIX32 =            0x0009 | STICKY_TIMEOUTS,/* IRIX5 32-bit */
59         PER_IRIXN32 =           0x000a | STICKY_TIMEOUTS,/* IRIX6 new 32-bit */
60         PER_IRIX64 =            0x000b | STICKY_TIMEOUTS,/* IRIX6 64-bit */
61         PER_RISCOS =            0x000c,
62         PER_SOLARIS =           0x000d | STICKY_TIMEOUTS,
63         PER_UW7 =               0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
64         PER_OSF4 =              0x000f,                  /* OSF/1 v4 */
65         PER_HPUX =              0x0010,
66         PER_MASK =              0x00ff,
67 };
68
69
70 #endif /* _UAPI_LINUX_PERSONALITY_H */