[PATCH v4] rust: add PidNamespace

Miguel Ojeda miguel.ojeda.sandonis at gmail.com
Wed Oct 2 11:12:08 UTC 2024


On Wed, Oct 2, 2024 at 1:00 PM Christian Brauner <brauner at kernel.org> wrote:
>
> +        let pidns = unsafe { bindings::task_active_pid_ns(Task::current_raw()) };

Missing `// SAFETY` -- I mention it since this will be a warning (thus
error in `WERROR`) soon.

> +        let ptr = unsafe { bindings::task_get_pid_ns(self.0.get()) };

Ditto.

> +            Some(pidns) => unsafe { bindings::task_tgid_nr_ns(self.0.get(), pidns.as_ptr()) },
> +            None => unsafe { bindings::task_tgid_nr_ns(self.0.get(), ptr::null_mut()) },

Ditto.

Cheers,
Miguel



More information about the Linux-security-module-archive mailing list