spum_create_request(9)
π
spum_create_request(9) β aka the Kernel API Manual glow-up π
okay so bestie, welcome to the spum_create_request page from the Kernel API Manual, section 9 (that's the kernel-API girlies only, no syscall peasants here π
). We're building SPU request messages and we're gonna do it correctly.
β¨ NAME β¨
spum_create_request β build a SPU request message header, all the way up to and including the BD header. Like, the whole thing.
The message gets constructed starting at spu_hdr. And listen β the caller is the one who has to allocate this buffer, okay? And it must be in DMA-able memory and at least SPU_HEADER_ALLOC_LEN bytes long. No cap, if you skimp on the buffer it's not gonna be cute. π
πΈ SYNOPSIS πΈ
u32 spum_create_request (u8 *spu_hdr , struct spu_request_opts *req_opts
, struct spu_cipher_parms *cipher_parms , struct spu_hash_parms
*hash_parms , struct spu_aead_parms *aead_parms , unsigned int data_size
);
look at her. six arguments. main character energy fr fr. π
π¦ ARGUMENTS π¦
spu_hdrβ the start of the buffer where the SPU request header is gonna be written. This is your canvas, bestie. π¨req_optsβ the SPU request message options. the vibe check for your request.cipher_parmsβ everything having to do with the cipher algorithm.hash_parmsβ everything having to do with the hash algorithm.aead_parmsβ everything having to do with the AEAD operation. AEAD girlies stay winning. πdata_sizeβ length of the data to be encrypted or authenticated. β οΈ and if it's AEAD, this does not include the length of the AAD. do not come for me on this, it's literally in the spec.
π«Ά RETURN π«Ά
returns the length of the SPU header, in bytes. and if something goes wrong? returns 0. that's the error signal, so if you see a 0 don't just celebrate, check yourself. π
π SEE ALSO π
the whole friend group, and yes we're tagging everyone:
- Kernel file
./drivers/crypto/bcm/spu.c spum_ns2_ctx_max_payload(9)spum_nsp_ctx_max_payload(9)spum_response_hdr_len(9)spum_hash_pad_len(9)spum_gcm_ccm_pad_len(9)spum_assoc_resp_len(9)spum_aead_ivlen(9)spum_hash_type(9)spum_digest_size(9)spum_cipher_req_init(9)spum_cipher_req_finish(9)spum_request_pad(9)spum_xts_tweak_in_payload(9)spum_tx_status_len(9)spum_rx_status_len(9)spum_status_process(9)spum_ccm_update_iv(9)spum_wordalign_padlen(9)
π reminder bestie: DMA-able memory. at least SPU_HEADER_ALLOC_LEN bytes. that's the whole assignment. slay it.
and that's the page!! brought to you by ./drivers/crypto/bcm, dated October 2026, filed under spum_create_request(9) β mwah, go build some headers, ily π§ββοΈβ
π¦ 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