Re: [PATCH] task: delete task_euid()

From: Gary Guo

Date: Thu Feb 19 2026 - 09:46:10 EST


On 2026-02-19 12:14, Alice Ryhl wrote:
task_euid() is a very weird operation. You can see how weird it is by
grepping for task_euid() - binder is its only user. task_euid() obtains
the objective effective UID - it looks at the credentials of the task
for purposes of acting on it as an object, but then accesses the
effective UID (which the credentials.7 man page describes as "[...] used
by the kernel to determine the permissions that the process will have
when accessing shared resources [...]").

Since usage in Binder has now been removed, get rid of the resulting
dead code.

Changes to the zh_CN translation was carried out with the help of
Gemini and Google Translate.

Suggested-by: Jann Horn <jannh@xxxxxxxxxx>
Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

With Alex's translation suggestion applied.

Thanks,
Gary

---
Depends on these two changes:
https://lore.kernel.org/all/20260212-rust-uid-v1-1-deff4214c766@xxxxxxxxxx/
https://lore.kernel.org/all/20260213-binder-uid-v1-0-7b795ae05523@xxxxxxxxxx/
---
Documentation/security/credentials.rst | 6 ++----
Documentation/translations/zh_CN/security/credentials.rst | 6 ++----
include/linux/cred.h | 1 -
rust/helpers/task.c | 5 -----
rust/kernel/task.rs | 10 ----------
5 files changed, 4 insertions(+), 24 deletions(-)