summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-31 22:23:10 -0600
committerRyan Zoeller <rtzoeller@rtzoeller.com>2022-02-02 17:53:52 -0600
commit7c9a7af4fce3ab4c958996b23e4e409b2eb0ddf9 (patch)
tree2b6afdfea7949e8a3f5512d114e96e9223f7434e
parente6f01f20e1e1d1ebd4c8685c742c9381f3967252 (diff)
downloadnix-7c9a7af4fce3ab4c958996b23e4e409b2eb0ddf9.zip
Document personality.rs
-rw-r--r--src/sys/mod.rs1
-rw-r--r--src/sys/personality.rs27
2 files changed, 27 insertions, 1 deletions
diff --git a/src/sys/mod.rs b/src/sys/mod.rs
index 2e9ca226..63d1a181 100644
--- a/src/sys/mod.rs
+++ b/src/sys/mod.rs
@@ -61,7 +61,6 @@ feature! {
#[cfg(target_os = "linux")]
feature! {
#![feature = "personality"]
- #[allow(missing_docs)]
pub mod personality;
}
diff --git a/src/sys/personality.rs b/src/sys/personality.rs
index e64c906d..2af66878 100644
--- a/src/sys/personality.rs
+++ b/src/sys/personality.rs
@@ -1,3 +1,4 @@
+//! Process execution domains
use crate::Result;
use crate::errno::Errno;
@@ -7,18 +8,44 @@ libc_bitflags! {
/// Flags used and returned by [`get()`](fn.get.html) and
/// [`set()`](fn.set.html).
pub struct Persona: c_int {
+ /// Provide the legacy virtual address space layout.
ADDR_COMPAT_LAYOUT;
+ /// Disable address-space-layout randomization.
ADDR_NO_RANDOMIZE;
+ /// Limit the address space to 32 bits.
ADDR_LIMIT_32BIT;
+ /// Use `0xc0000000` as the offset at which to search a virtual memory
+ /// chunk on [`mmap(2)`], otherwise use `0xffffe000`.
+ ///
+ /// [`mmap(2)`]: https://man7.org/linux/man-pages/man2/mmap.2.html
ADDR_LIMIT_3GB;
+ /// User-space function pointers to signal handlers point to descriptors.
#[cfg(not(any(target_env = "musl", target_env = "uclibc")))]
+ #[cfg_attr(docsrs, doc(cfg(all())))]
FDPIC_FUNCPTRS;
+ /// Map page 0 as read-only.
MMAP_PAGE_ZERO;
+ /// `PROT_READ` implies `PROT_EXEC` for [`mmap(2)`].
+ ///
+ /// [`mmap(2)`]: https://man7.org/linux/man-pages/man2/mmap.2.html
READ_IMPLIES_EXEC;
+ /// No effects.
SHORT_INODE;
+ /// [`select(2)`], [`pselect(2)`], and [`ppoll(2)`] do not modify the
+ /// returned timeout argument when interrupted by a signal handler.
+ ///
+ /// [`select(2)`]: https://man7.org/linux/man-pages/man2/select.2.html
+ /// [`pselect(2)`]: https://man7.org/linux/man-pages/man2/pselect.2.html
+ /// [`ppoll(2)`]: https://man7.org/linux/man-pages/man2/ppoll.2.html
STICKY_TIMEOUTS;
+ /// Have [`uname(2)`] report a 2.6.40+ version number rather than a 3.x
+ /// version number.
+ ///
+ /// [`uname(2)`]: https://man7.org/linux/man-pages/man2/uname.2.html
#[cfg(not(any(target_env = "musl", target_env = "uclibc")))]
+ #[cfg_attr(docsrs, doc(cfg(all())))]
UNAME26;
+ /// No effects.
WHOLE_SECONDS;
}
}