STRUCT FMP_SG_ENTRY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct fmp_sg_entry(9) ✨

okay bestie so this is a page from the Kernel API Manual, and it's literally all about struct fmp_sg_entry β€” iykyk πŸŽ€


πŸ’… NAME

struct fmp_sg_entry β€” the nonstandard format of PRDT entries when FMP is enabled πŸ¦‹

like, when FMP is on, these PRDT entries stop being normal and become main character entries, periodt.


🌸 SYNOPSIS

struct fmp_sg_entry {
    struct ufshcd_sg_entry base;
    __be64 file_iv[2];
    __be64 file_enckey[4];
    __be64 file_twkey[4];
    __be64 disk_iv[2];
    __be64 reserved[2];
 };

(and yes, the closing brace in the original has a lil extra space before it β€” we're keeping it exactly as it is, no touchy πŸ™ˆ)


🫢 Members

  • base β€” this is the standard PRDT entry, but plot twist: it's got nonstandard bitfields chillin' in the high bits of the 'size' field, i.e. the last 32-bit word. When those nonstandard bitfields are zero, the data segment won't be encrypted or decrypted, simple as that. But when they're not zero, they specify the algorithm and key length that the data segment will be encrypted or decrypted with. no cap, that's the whole vibe check πŸ’…
  • file_iv β€” the initialization vector (IV), with all bytes reversed πŸ”„
  • file_enckey β€” the first half of the AES-XTS key, with all bytes reserved
  • file_twkey β€” the second half of the AES-XTS key, with all bytes reserved
  • disk_iv β€” Unused 😴 literally just sitting there
  • reserved β€” Unused 😴 same energy, not doing anything

🌈 SEE ALSO

Kernel file ./drivers/ufs/host/ufs-exynos.c β€” go read it if you're feeling curious, bestie 🧚


okay that's the whole page, you ate that πŸ’– this was brought to you by the ./drivers/ufs/host crew, October 2026 edition β€” slay, bye! πŸ‘‘βœ¨

πŸ“¦ where this page comes from