1
+ //! Process execution domains
1
2
use crate :: Result ;
2
3
use crate :: errno:: Errno ;
3
4
@@ -7,18 +8,44 @@ libc_bitflags! {
7
8
/// Flags used and returned by [`get()`](fn.get.html) and
8
9
/// [`set()`](fn.set.html).
9
10
pub struct Persona : c_int {
11
+ /// Provide the legacy virtual address space layout.
10
12
ADDR_COMPAT_LAYOUT ;
13
+ /// Disable address-space-layout randomization.
11
14
ADDR_NO_RANDOMIZE ;
15
+ /// Limit the address space to 32 bits.
12
16
ADDR_LIMIT_32BIT ;
17
+ /// Use `0xc0000000` as the offset at which to search a virtual memory
18
+ /// chunk on [`mmap(2)`], otherwise use `0xffffe000`.
19
+ ///
20
+ /// [`mmap(2)`]: https://man7.org/linux/man-pages/man2/mmap.2.html
13
21
ADDR_LIMIT_3GB ;
22
+ /// User-space function pointers to signal handlers point to descriptors.
14
23
#[ cfg( not( any( target_env = "musl" , target_env = "uclibc" ) ) ) ]
24
+ #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
15
25
FDPIC_FUNCPTRS ;
26
+ /// Map page 0 as read-only.
16
27
MMAP_PAGE_ZERO ;
28
+ /// `PROT_READ` implies `PROT_EXEC` for [`mmap(2)`].
29
+ ///
30
+ /// [`mmap(2)`]: https://man7.org/linux/man-pages/man2/mmap.2.html
17
31
READ_IMPLIES_EXEC ;
32
+ /// No effects.
18
33
SHORT_INODE ;
34
+ /// [`select(2)`], [`pselect(2)`], and [`ppoll(2)`] do not modify the
35
+ /// returned timeout argument when interrupted by a signal handler.
36
+ ///
37
+ /// [`select(2)`]: https://man7.org/linux/man-pages/man2/select.2.html
38
+ /// [`pselect(2)`]: https://man7.org/linux/man-pages/man2/pselect.2.html
39
+ /// [`ppoll(2)`]: https://man7.org/linux/man-pages/man2/ppoll.2.html
19
40
STICKY_TIMEOUTS ;
41
+ /// Have [`uname(2)`] report a 2.6.40+ version number rather than a 3.x
42
+ /// version number.
43
+ ///
44
+ /// [`uname(2)`]: https://man7.org/linux/man-pages/man2/uname.2.html
20
45
#[ cfg( not( any( target_env = "musl" , target_env = "uclibc" ) ) ) ]
46
+ #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
21
47
UNAME26 ;
48
+ /// No effects.
22
49
WHOLE_SECONDS ;
23
50
}
24
51
}
0 commit comments