Skip to content

Commit 7c9a7af

Browse files
committed
Document personality.rs
1 parent e6f01f2 commit 7c9a7af

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

src/sys/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ feature! {
6161
#[cfg(target_os = "linux")]
6262
feature! {
6363
#![feature = "personality"]
64-
#[allow(missing_docs)]
6564
pub mod personality;
6665
}
6766

src/sys/personality.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Process execution domains
12
use crate::Result;
23
use crate::errno::Errno;
34

@@ -7,18 +8,44 @@ libc_bitflags! {
78
/// Flags used and returned by [`get()`](fn.get.html) and
89
/// [`set()`](fn.set.html).
910
pub struct Persona: c_int {
11+
/// Provide the legacy virtual address space layout.
1012
ADDR_COMPAT_LAYOUT;
13+
/// Disable address-space-layout randomization.
1114
ADDR_NO_RANDOMIZE;
15+
/// Limit the address space to 32 bits.
1216
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
1321
ADDR_LIMIT_3GB;
22+
/// User-space function pointers to signal handlers point to descriptors.
1423
#[cfg(not(any(target_env = "musl", target_env = "uclibc")))]
24+
#[cfg_attr(docsrs, doc(cfg(all())))]
1525
FDPIC_FUNCPTRS;
26+
/// Map page 0 as read-only.
1627
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
1731
READ_IMPLIES_EXEC;
32+
/// No effects.
1833
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
1940
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
2045
#[cfg(not(any(target_env = "musl", target_env = "uclibc")))]
46+
#[cfg_attr(docsrs, doc(cfg(all())))]
2147
UNAME26;
48+
/// No effects.
2249
WHOLE_SECONDS;
2350
}
2451
}

0 commit comments

Comments
 (0)