proc_uint_u2k_conv_uop(9)
π proc_uint_u2k_conv_uop(9) β the kernel API manual, bestie edition π
okay so real talk, this one lives in the Kernel API Manual and it's literally the cutest little helper: it takes a value a user typed at you and yeets it into a kernel variable. π«Ά
β¨ NAME β¨
proc_uint_u2k_conv_uop β assign a user value to a kernel pointer. that's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
int proc_uint_u2k_conv_uop (const ulong *u_ptr , uint *k_ptr , ulong
(*u_ptr_op)(const ulong) );
look at her. three args, one function pointer, zero chill. π
π¦ ARGUMENTS π¦
u_ptrβ pointer to the user space variable. like, the source of truth from userspace land πk_ptrβ pointer to the kernel variable. where the value is gonna live its best kernel life πu_ptr_opβ run this function before assigning tok_ptr. she's the pre-game, the vibe check, the "hold on lemme transform this first" step β¨
π DESCRIPTION π
so what she does is: she uses WRITE_ONCE to assign the value to k_ptr. no cap, that's the actual mechanism, WRITE_ONCE, not me being dramatic. π₯
and if u_ptr_op is not NULL, she executes it first. icon behaviour. π
then β and this is the important part, bestie, do not skip this β she checks that the values are less than UINT_MAX, so you don't have to support wrap around from userspace. it's giving preventative self-care. π§ββοΈ
β RETURN β
0 on success. that's the only one listed. slay. π
π SEE ALSO π
the whole friend group, fr fr:
Kernel file ./kernel/sysctl.cenum sysctl_writes_mode(9)proc_first_pos_non_zero_ignore(9)proc_dostring(9)strtoul_lenient(9)proc_get_long(9)proc_put_long(9)proc_uint_k2u_conv(9)proc_uint_conv(9)proc_int_k2u_conv_kop(9)proc_int_u2k_conv_uop(9)proc_int_conv(9)proc_douintvec_conv(9)proc_dobool(9)proc_dointvec(9)proc_douintvec(9)proc_dointvec_minmax(9)proc_douintvec_minmax(9)proc_dou8vec_minmax(9)proc_ulong_conv(9)proc_ulong_u2k_conv_uop(9)proc_ulong_k2u_conv_kop(9)proc_doulongvec_conv(9)proc_doulongvec_minmax(9)proc_dointvec_conv(9)proc_do_large_bitmap(9)
like, the entire sysctl cinematic universe. iykyk π
aaaand that's the page!! sourced from ./kernel, dated October 2026, page proc_uint_u2k_conv_uop(9) β go forth and convert your uints, bestie, mwah ππ§ββοΈπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms