spu_aead_rx_sg_create(9)
π« spu_aead_rx_sg_create β the Kernel API Manual moment β¨
okay so bestie, we're in the Kernel API Manual (spu_aead_rx_sg_create(9), section 9, kernel-space teas) and this function is literally the person who builds the scatterlist of buffers used to receive a SPU response message for an AEAD request π and yes, it also includes buffers to catch SPU message headers and the response data. iykyk π
πΈ NAME πΈ
spu_aead_rx_sg_create β build up the scatterlist of buffers used to receive a SPU response message for an AEAD request π includes buffers to catch SPU message headers and the response data, no cap.
β¨ SYNOPSIS β¨
int spu_aead_rx_sg_create (struct brcm_message *mssg , struct
aead_request *req , struct iproc_reqctx_s *rctx , u8 rx_frag_num ,
unsigned int assoc_len , u32 ret_iv_len , unsigned int resp_len ,
unsigned int digestsize , u32 stat_pad_len );
like, that's nine whole arguments bestie, she's highkey doing the most and we love her for it π«Ά
π¦ ARGUMENTS π¦
mssgβ the mailbox message containing the receive sg π¬ that's her whole ride.reqβ the Crypto API request, main character energy fr.rctxβ the crypto request context, the little sidekick carrying the details.rx_frag_numβ number of scatterlist elements required to hold the SPU response message. count 'em, bestie.assoc_lenβ length of associated data included in the crypto request.ret_iv_lenβ length of IV returned in response πresp_lenβ number of bytes of response data expected to be written todstbuffer from crypto API.digestsizeβ length of hash digest, in bytes βstat_pad_lenβ number of bytes required to pad the STAT field to a 4-byte boundary. yes she's padding, she's aligned, she's iconic π
π DESCRIPTION π
so the scatterlist that gets allocated here is freed in spu_chunk_cleanup when the request completes β and it happens whether the request is handled successfully or there is an error π so no leaks, she cleans up after herself either way. periodt.
π₯ RETURN π₯
0 if successful, < 0 if an error. that's it, that's the vibe check π
πΌ SEE ALSO πΌ
kernel file ./drivers/crypto/bcm/cipher.c and the whole friend group:
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_rx_sg_create(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_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)
bestie reminder: that scatterlist is freed in spu_chunk_cleanup on completion, success or error π don't go holding onto it.
and that's the page! π§ from ./drivers/crypto/bcm, dated October 2026 β stay hydrated, keep your buffers aligned, and slay πβ¨π
π¦ 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