spu2_ctx_max_payload(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ spu2_ctx_max_payload(9) β€” a Kernel API Manual moment

okay so bestie, welcome to the Kernel API Manual, where today's main character is spu2_ctx_max_payload πŸ’… like yes we're doing kernel crypto documentation and yes it's iconic.


✨ NAME ✨

spu2_ctx_max_payload β€” literally just figures out the maximum length of the payload for a SPU message, for a given cipher and hash alg context πŸŽ€


🌸 SYNOPSIS 🌸

u32 spu2_ctx_max_payload (enum spu_cipher_alg cipher_alg , enum
spu_cipher_mode cipher_mode , unsigned int blocksize );

πŸ’– ARGUMENTS πŸ’–

  • cipher_alg β€” the cipher algorithm, the vibe of the cipher basically πŸ”₯
  • cipher_mode β€” the cipher mode, like which mode it's in
  • blocksize β€” the size of a block of data for this algo, no cap

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea for SPU2 β˜• the hardware generally ignores the PayloadLen field in ctrl3 of FMD and just keeps computing until it receives a DMA descriptor with the EOF flag set. it's giving "I'll stop when I feel like it" energy honestly 😭

so because of that, we consider the max payload to be infinite 🌈 like, boundless, no ceiling, infinite scroll but make it hardware.

but wait β€” AES CCM is an exception 🚨 don't forget the exception bestie, it's the one that breaks the pattern.

⭐ RETURN ⭐

Max payload length in bytes πŸ’– that's the whole answer, she said what she said.


πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./drivers/crypto/bcm/spu2.c β€” and honestly the whole friend group is here, say hi to everyone 🫢


that's the page bestie, go read your kernel source πŸ’œ

sign-off szn πŸŽ€ this one lives in ./drivers/crypto/bcm, dated October 2026, and it's the spu2_ctx_max_payload(9) page from the Kernel API Manual β€” slay, mwah πŸ’‹

πŸ“¦ where this page comes from