dent_key_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dent_key_init(9) β€” like, the UBIFS key girlies' origin story

okay so bestie, welcome to the Kernel API Manual, section 9 πŸŽ€ this is dent_key_init, and she lives in the UBIFS corner of the kernel and she is literally the first step of every directory entry key. no cap.


✨ NAME ✨

dent_key_init β€” initialize directory entry key. that's it. that's the whole job. she sets up a dirent key and she does it flawlessly πŸ’–


🌸 SYNOPSIS 🌸

void dent_key_init (const struct ubifs_info *c , union ubifs_key *key ,
ino_t inum , const struct fscrypt_name *nm );

note the spacing, bestie β€” copied character for character, i don't play about that 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the UBIFS file-system description object. literally the whole vibe of the filesystem in one struct πŸ‘‘
  • key β€” the key you're initializing. this is the main character, she's getting set up right here ✨
  • inum β€” the parent inode number. yes, parent. not the direntry's own inode. don't get it twisted πŸ™ˆ
  • nm β€” the direntry name and length. warning tho: not a string when encrypted! 😭 like, do not go printing that thing with %s, i'm begging you. it's giving raw encrypted bytes, not a cute little char array πŸ’€
fr fr, that last one is the trap. encrypted names are not C strings. treat them as name + length and nothing else 🚩

πŸ”₯ SEE ALSO πŸ”₯

okay this is the part where she tags the whole group chat in. every single one, no skipping:

Kernel file ./fs/ubifs/key.h β€” key_mask_hash(9), key_r5_hash(9), key_test_hash(9), ino_key_init(9), ino_key_init_flash(9), lowest_ino_key(9), highest_ino_key(9), dent_key_init_hash(9), dent_key_init_flash(9), lowest_dent_key(9), xent_key_init(9), xent_key_init_flash(9), lowest_xent_key(9), data_key_init(9), highest_data_key(9), trun_key_init(9), invalid_key_init(9), key_type(9), key_type_flash(9), key_inum(9), key_inum_flash(9), key_hash(9), key_hash_flash(9), key_block(9), key_block_flash(9), key_read(9), key_write(9), key_write_idx(9), key_copy(9), keys_cmp(9), keys_eq(9), is_hash_key(9), key_max_inode_size(9)

like, that's the entire key.h ensemble cast and she knows every one of them πŸ’œ go read them, they ate πŸ‘‘


πŸ’– and that's the page, bestie πŸ’– sourced from ./fs/ubifs, dated October 2026, and filed under dent_key_init(9) in the Kernel API Manual. mwah, go initialize some dirent keys responsibly πŸŒˆβœ¨πŸŽ€

πŸ“¦ where this page comes from