nx_build_sg_lists(9)
β¨ NAME β¨
nx_build_sg_lists β okay so picture this: it walks the input scatterlists and builds arrays of NX scatterlists based on them π
like it literally strolls through your scatterlists and constructs the NX glow-up versions, no cap.
This is the Kernel API Manual page for it, bestie, and yes we're getting into it π
πΈ SYNOPSIS πΈ
int nx_build_sg_lists (struct nx_crypto_ctx *nx_ctx , const u8 *iv ,
struct scatterlist *dst , struct scatterlist *src , unsigned int *nbytes
, unsigned int offset , u8 *oiv );
Seven params, one int return, main character energy π₯
π¦ ARGUMENTS π¦
nx_ctxβ the NX crypto context for the lists we're building π it's giving "this is the context, the whole context, nothing but the context."ivβ iv data, if the algorithm requires it π so like, only sometimes, okay?dstβ destination scatterlist β¨ the place things are going.srcβ source scatterlist π the place things are coming from. iconic duo honestly.nbytesβ length of data described in the scatterlists π the actual count, and it's a pointer, so pay attention.offsetβ number of bytes to fast-forward past at the beginning of scatterlists β© like skipping the intro of a song, but make it bytes.oivβ destination for the iv data, if the algorithm requires it π the "o" is for output, the vibe is for slay.
π DESCRIPTION π
So here's the tea: this is common code shared by all the AES algorithms π«Ά like every single one, no favorites.
It uses the crypto scatterlist walk routines to traverse input and output scatterlists, building corresponding NX scatterlists π that's the whole bit β walk in, build out, repeat, periodt.
ngl bestie it really is that simple, this one's a helper through and through π
π§ SEE ALSO π§
Kernel file ./drivers/crypto/nx/nx.c β plus the whole friend group, go say hi:
nx_hcall_sync(9)nx_build_sg_list(9)nx_walk_and_build(9)trim_sg_list(9)nx_ctx_init(9)nx_of_init(9)nx_register_algs(9)nx_crypto_ctx_init(9)nx_crypto_ctx_exit(9)
okay that's the page, mwah π
Signed off from ./drivers/crypto/nx, dated October 2026, page nx_build_sg_lists(9) β go build those scatterlists bestie, you got this βπ
π¦ 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