Re: [PATCH v3 2/9] rust: cred: add Rust abstraction for `struct cred`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 19, 2024 at 10:37 AM Benno Lossin <benno.lossin@xxxxxxxxx> wrote:
> On 1/18/24 15:36, Alice Ryhl wrote:
> > +    /// Returns the effective UID of the given credential.
> > +    pub fn euid(&self) -> bindings::kuid_t {
> > +        // SAFETY: By the type invariant, we know that `self.0` is valid.
>
> Is `euid` an immutable property, or why does this memory access not race
> with something?

Yes. These properties are changed by replacing the credential, so the
credentials themselves are immutable.

Alice





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux