[PATCH v3 1/2] rust: task: clarify comments on task UID accessors
Alice Ryhl
aliceryhl at google.com
Thu May 7 12:03:59 UTC 2026
On Thu, May 07, 2026 at 12:08:35PM +0100, Gary Guo wrote:
> On Thu May 7, 2026 at 10:48 AM BST, Alice Ryhl wrote:
> > - /// Returns the UID of the given task.
> > + /// Returns the objective real UID of the given task.
> > #[inline]
> > pub fn uid(&self) -> Kuid {
> > // SAFETY: It's always safe to call `task_uid` on a valid task.
> > Kuid::from_raw(unsafe { bindings::task_uid(self.as_ptr()) })
> > }
> >
> > - /// Returns the effective UID of the given task.
> > + /// Returns the objective effective UID of the given task.
> > + ///
> > + /// You should probably not be using this; the effective UID is normally
> > + /// only relevant in subjective credentials.
> > #[inline]
> > pub fn euid(&self) -> Kuid {
> > // SAFETY: It's always safe to call `task_euid` on a valid task.
> > @@ -371,7 +374,7 @@ fn eq(&self, other: &Self) -> bool {
> > impl Eq for Task {}
> >
> > impl Kuid {
> > - /// Get the current euid.
> > + /// Get the current subjective euid.
>
> For consistency this should be "subjective effective UID".
I can update this for the next version.
Alice
More information about the Linux-security-module-archive
mailing list