__ubifs_node_check_hash(9)
π
__ubifs_node_check_hash β Kernel API Manual moment
okay so bestie, welcome to the glamorous world of UBIFS authentication β¨ this little function lives in the Kernel API Manual and it is literally the vibe check for your nodes π
π NAME π
__ubifs_node_check_hash β check the hash of a node against given hash
no cap, that's the whole gig: you got a node, you got a hash, and we're gonna find out if they're actually matching π
β¨ SYNOPSIS β¨
int __ubifs_node_check_hash (const struct ubifs_info *c , const void *node , const u8 *expected );
three args, one int, zero drama π«Ά
πΈ ARGUMENTS πΈ
cβ the UBIFS file-system description object π« your whole filesystem's little identity cardnodeβ literally the node π¦ the thing we're hashing, bestieexpectedβ the expected hash π― the one we're comparing against,u8pointer and all
π¦ DESCRIPTION π¦
so the way this works π this function calculates a hash over a node and compares it to the given hash.
Returns 0 if both hashes are equal or authentication is disabled π otherwise a negative error code is returned π like, it's giving "nope, not today."
fr fr,0is the green flag here β equal hashes or auth being off both get you the0. Anything else? negative error code, and you already know what that means π
π SEE ALSO π
Kernel file ./fs/ubifs/auth.c β and the whole friend group π
__ubifs_node_calc_hash(9)ubifs_hash_calc_hmac(9)ubifs_prepare_auth_node(9)__ubifs_hash_get_desc(9)ubifs_bad_hash(9)ubifs_sb_verify_signature(9)ubifs_init_authentication(9)__ubifs_exit_authentication(9)ubifs_node_calc_hmac(9)__ubifs_node_insert_hmac(9)__ubifs_node_verify_hmac(9)ubifs_hmac_wkm(9)
like, the entire auth.c cinematic universe π iykyk
lowkey obsessed with how tidy this whole thing is π ./fs/ubifs brought us this gem back in October 2026, and honestly? iconic. slay, periodt, go check those hashes bestie π
π₯
π¦ 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