spu_skcipher_rx_sg_create(9)
π 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. au8, so keep it cute and small πchunksizeβ number of bytes of response data you're expecting. anunsigned int, bestie, plan accordingly πΈstat_pad_lenβ number of bytes required to pad the STAT field to a 4-byte boundary. yes it's au32. 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 β
0if successful π< 0if 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:
select_channel(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_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)
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
- 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