spu_ahash_rx_sg_create(9)
π spu_ahash_rx_sg_create(9) β the Kernel API Manual, bestie edition π
okay so real talk, this is a page from the Kernel API Manual (spu_ahash_rx_sg_create(9), section 9, kernel-flavoured) and it's literally about building the scatterlist that catches SPU response messages for an ahash request. it's giving β¨plumbingβ¨ but honestly? iconic plumbing.
πΈ NAME πΈ
spu_ahash_rx_sg_create β bestie, this is the function that builds up the scatterlist of buffers used to receive a SPU response message for an ahash request. that's it, that's the whole gig. π«Ά
β SYNOPSIS β
int spu_ahash_rx_sg_create (struct brcm_message *mssg , struct
iproc_reqctx_s *rctx , u8 rx_frag_num , unsigned int digestsize , u32
stat_pad_len );
like, yes, it returns an int. we love a return type that tells you how it's feeling. π
π¦ ARGUMENTS π¦
mssgβ the mailbox message that's carrying the receive sg. it's the ride, the sg is the passenger. πrctxβ the crypto request context. the emotional support struct of this whole operation.rx_frag_numβ how many scatterlist elements you need to hold the SPU response message. count 'em, bestie,u8says there's only so many. π’digestsizeβ length of the hash digest, in bytes. (unsigned int, no games.)stat_pad_lenβ number of bytes required to pad the STAT field to a 4-byte boundary. yes this is a real job that someone has to do. alignment queen behavior. π
π DESCRIPTION π
so here's the tea β: the scatterlist that gets allocated here is freed in spu_chunk_cleanup when the request completes β and the way that it does not care whether the request was handled successfully or there was an error is honestly so brave of it. success or flop, spu_chunk_cleanup cleans up. no cap. π§Ήβ¨
π₯ RETURN π₯
0if successful π< 0if an error π
that's the whole vibe check. negative means bad news.
π SEE ALSO π
literally the entire friend group, in the order the page lists them β don't make me tap the sign:
kernel file ./drivers/crypto/bcm/cipher.c plus select_channel(9), spu_skcipher_rx_sg_create(9), spu_skcipher_tx_sg_create(9), handle_skcipher_req(9), handle_skcipher_resp(9), spu_ahash_tx_sg_create(9), handle_ahash_req(9), spu_hmac_outer_hash(9), ahash_req_done(9), handle_ahash_resp(9), spu_aead_rx_sg_create(9), spu_aead_tx_sg_create(9), handle_aead_req(9), handle_aead_resp(9), spu_chunk_cleanup(9), finish_req(9), spu_rx_callback(9), skcipher_enqueue(9), spu_no_incr_hash(9), aead_gcm_esp_setkey(9), rfc4543_gcm_esp_setkey(9), aead_ccm_esp_setkey(9), spu_functions_register(9), spu_mb_init(9).
and that's the page, bestie!! π§π this little beauty lives in ./drivers/crypto/bcm, and the version vibes are dated October 2026 β so go forth, build your rx scatterlist, and remember: it always gets freed in spu_chunk_cleanup. mwah ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms