[RFC PATCH v2 25/41] uidgid: parse and print ids in their text form

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 22 03:17:50 UTC 2026


> Add helpers for interfaces that pass ids as text:
> 
> - make_kuid_str()/make_kgid_str() parse what kuid_str() writes: a
>   decimal number, a UUID, or a GUID in braces,
> - kuid_str_munged()/kgid_str_munged() write an id as seen from a user
>   namespace, the overflow id if it has no mapping there,
> - kuid_str_signed()/kgid_str_signed() write a legacy id as a signed
>   number, for output that used "%d",
> - KUID_STR() and friends wrap them as expressions with a buffer of the
>   enclosing block, so that printf-like calls can replace
>   "%u", from_kuid(&init_user_ns, uid) by "%s", KUID_STR(uid) and print
>   legacy ids exactly as before.
> 
> Assisted-by: Claude:claude-opus-5-5
> 
> Signed-off-by: Jan Koester <jan.koester at tuxist.de>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1792552161.git.jan.koester@tuxist.de?part=25




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