spu_skcipher_rx_sg_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spu_skcipher_rx_sg_create(9) β€” bestie edition

okay so this is a page from the Kernel API Manual and honestly? it's giving "underrated little helper energy." pull up a chair πŸŽ€


✨ NAME ✨

spu_skcipher_rx_sg_create β€” literally builds up the scatterlist of buffers you use to receive a SPU response message for an skcipher request. and yes, it's thorough: it includes buffers to catch the SPU message headers and the response data. no crumbs left behind, periodt. πŸ’…


🌸 SYNOPSIS 🌸

int spu_skcipher_rx_sg_create (struct brcm_message *mssg , struct
        iproc_reqctx_s *rctx , u8 rx_frag_num , unsigned int chunksize , u32
        stat_pad_len );

like, look at her signature. five params. all mains. πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • mssg β€” the mailbox message that's holding the receive sg. she's the one carrying the goods 🫢
  • rctx β€” the crypto request context. the vibe context, if you will ✨
  • rx_frag_num β€” how many scatterlist elements you need to hold the SPU response message. a u8, so keep it cute and small πŸ’€
  • chunksize β€” number of bytes of response data you're expecting. an unsigned int, bestie, plan accordingly 🌸
  • stat_pad_len β€” number of bytes required to pad the STAT field to a 4-byte boundary. yes it's a u32. yes it's doing exactly what it says 😭

🧚 DESCRIPTION 🧚

so here's the tea πŸ”₯: the scatterlist that gets allocated right here is freed in spu_chunk_cleanup when the request completes. and when does it complete? whether the request is handled successfully or there's an error. both paths. no leaks, no drama, no "oops I forgot to free it." iconic behavior honestly πŸ‘‘

ngl, the cleanup contract is the whole point β€” you allocate here, someone else (specifically spu_chunk_cleanup) handles the goodbye. don't double-free, bestie. πŸ™ˆ

⭐ RETURN ⭐

  • 0 if successful πŸŽ‰
  • < 0 if an error πŸ’€

that's it. that's the whole vibe check.


🌈 SEE ALSO 🌈

the whole friend group 🫢 β€” all from the kernel file ./drivers/crypto/bcm/cipher.c:

like, the whole roster. iykyk πŸ’œ


and that's the page, bestie πŸŽ€ this one lives in ./drivers/crypto/bcm, dated October 2026, filed under spu_skcipher_rx_sg_create(9). mwah, go build some scatterlists πŸ’‹βœ¨

πŸ“¦ where this page comes from