fscrypt_add_test_dummy_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ fscrypt_add_test_dummy_key ✨

okay so bestie, this one is straight out of the Kernel API Manual, section 9 β€” the page is literally called fscrypt_add_test_dummy_key(9), yes the title is the function name, the kernel does that, we stan a consistent naming convention πŸ’…


🌸 NAME 🌸

fscrypt_add_test_dummy_key β€” add the test dummy encryption key πŸŽ€


πŸŽ€ SYNOPSIS πŸŽ€

int fscrypt_add_test_dummy_key(struct super_block *sb, struct fscrypt_key_specifier *key_spec);

🫢 ARGUMENTS 🫢

  • sb β€” the filesystem instance you're adding the key to, like the whole vibe container 🌈
  • key_spec β€” the key specifier of the test dummy encryption key πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

So what she does: she adds the key for the test_dummy_encryption mount option to the filesystem. periodt.

But here's the iconique part β€” to prevent misuse of this mount option, a per-boot random key is used instead of a hardcoded one. not me being grateful for that fr fr πŸ”₯

And the way that works out is: this makes it so that any encrypted files created using this option won't be accessible after a reboot. gone. deleted. not coming back 😭 so like, don't get attached to your test files, they're giving fleeting main character energy.

no cap, that's the actual design β€” the key is per-boot and random, so post-reboot access is a no 🚫

⭐ RETURN ⭐

0 on success, -errno on failure. that's the whole report card πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./fs/crypto/keyring.c β€” go read her, she ate πŸ¦‹


mwah πŸ’‹ that's the whole page, sourced from ./fs/crypto and dated October 2026, signed off from the Kernel API Manual by yours truly β€” happy key-adding bestie πŸ“βœ¨

πŸ“¦ where this page comes from