Re: [PATCH 0/2] binder+rust_binder: use current_euid() for transaction sender identity

From: Alice Ryhl

Date: Mon Feb 16 2026 - 03:16:31 EST


On Fri, Feb 13, 2026 at 10:37:29PM +0100, Jann Horn wrote:
> Based on the discussion on
> <https://lore.kernel.org/all/20260212-rust-uid-v1-1-deff4214c766@xxxxxxxxxx/>,
> here's a proposed change to binder to stop looking at objective EUIDs.
>
> This removes the last remaining users of Task::euid() (in Rust), and the
> only remaining caller to task_euid() is the now-unused Rust wrapper.

Any chance you could include a patch to remove the now-unused method?

> (Sidenote: It might be worth considering whether it really makes sense
> to have functions like current_euid(), task_euid(), and so on in Rust -
> it might be less messy to just expose current_cred() and (if necessary)
> get_task_cred(), and then use the `Credential` abstraction around
> `struct cred` to access the various UID/GID/... fields.)

We could add a cred() method to CurrentTask and do this:

current!().cred().euid()

> Signed-off-by: Jann Horn <jannh@xxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>