From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/thread/prctl.rs | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'vendor/rustix/src/thread/prctl.rs') diff --git a/vendor/rustix/src/thread/prctl.rs b/vendor/rustix/src/thread/prctl.rs index b2d40d65c..999764cb1 100644 --- a/vendor/rustix/src/thread/prctl.rs +++ b/vendor/rustix/src/thread/prctl.rs @@ -205,8 +205,8 @@ pub enum Capability { /// cleared on successful return from `chown` (not implemented). FileSetID = linux_raw_sys::general::CAP_FSETID, /// Overrides the restriction that the real or effective user ID of a - /// process sending a signal must match the real or effective user ID - /// of the process receiving the signal. + /// process sending a signal must match the real or effective user ID of + /// the process receiving the signal. Kill = linux_raw_sys::general::CAP_KILL, /// Allows `setgid` manipulation. Allows `setgroups`. Allows forged gids on /// socket credentials passing. @@ -366,8 +366,9 @@ pub enum Capability { /// /// [`Capability::SystemAdmin`] is required to use bpf_probe_write_user. /// - /// [`Capability::SystemAdmin`] is required to iterate system wide loaded - /// programs, maps, links, BTFs and convert their IDs to file descriptors. + /// [`Capability::SystemAdmin`] is required to iterate system-wide loaded + /// programs, maps, links, and BTFs, and convert their IDs to file + /// descriptors. /// /// [`Capability::PerformanceMonitoring`] and /// [`Capability::BerkeleyPacketFilters`] are required to load tracing @@ -443,7 +444,7 @@ bitflags! { /// Set [`NO_CAP_AMBIENT_RAISE`] irreversibly. const NO_CAP_AMBIENT_RAISE_LOCKED = 1_u32 << 7; - /// + /// const _ = !0; } } @@ -742,18 +743,20 @@ const PR_MTE_TAG_SHIFT: u32 = 3; const PR_MTE_TAG_MASK: u32 = 0xffff_u32 << PR_MTE_TAG_SHIFT; bitflags! { - /// Zero means addresses that are passed for the purpose of being dereferenced by the kernel must be untagged. + /// Zero means addresses that are passed for the purpose of being + /// dereferenced by the kernel must be untagged. #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct TaggedAddressMode: u32 { - /// Addresses that are passed for the purpose of being dereferenced by the kernel may be tagged. + /// Addresses that are passed for the purpose of being dereferenced by + /// the kernel may be tagged. const ENABLED = 1_u32 << 0; /// Synchronous tag check fault mode. const TCF_SYNC = 1_u32 << 1; /// Asynchronous tag check fault mode. const TCF_ASYNC = 1_u32 << 2; - /// + /// const _ = !0; } } @@ -781,8 +784,8 @@ const PR_SET_TAGGED_ADDR_CTRL: c_int = 55; /// /// # Safety /// -/// Please ensure the conditions necessary to safely call this function, -/// as detailed in the references above. +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. /// /// [`prctl(PR_SET_TAGGED_ADDR_CTRL,...)`]: https://man7.org/linux/man-pages/man2/prctl.2.html #[inline] @@ -810,8 +813,8 @@ const PR_SYS_DISPATCH_OFF: usize = 0; /// /// # Safety /// -/// Please ensure the conditions necessary to safely call this function, -/// as detailed in the references above. +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. /// /// [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_OFF,...)`]: https://man7.org/linux/man-pages/man2/prctl.2.html #[inline] @@ -856,8 +859,8 @@ impl TryFrom for SysCallUserDispatchFastSwitch { /// /// # Safety /// -/// Please ensure the conditions necessary to safely call this function, -/// as detailed in the references above. +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. /// /// [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_ON,...)`]: https://man7.org/linux/man-pages/man2/prctl.2.html #[inline] -- cgit v1.2.3