STRUCT CCP_CMD(9)
π struct ccp_cmd(9) β like, the whole kernel API manual page, bestie
okay so bestie, welcome to struct ccp_cmd(9) π β straight out of the Kernel API Manual, and honestly? it's giving "the little request struct that could". this is the CCP operation request, aka the thing you fill out and hand over when you want the Crypto Coprocessor to actually do something for you. sit down, grab a strawberry π, we're gonna go through it field by field, no cap.
β¨ NAME β¨
struct ccp_cmd β literally just "CCP operation request". that's her. that's the whole vibe. π
π¦ SYNOPSIS π¦
here's the whole shape of her, exactly as she is, don't touch:
struct ccp_cmd {
struct list_head entry;
struct work_struct work;
struct ccp_device *ccp;
int ret;
u32 flags;
enum ccp_engine engine;
u32 engine_error;
union {
struct ccp_aes_engine aes;
struct ccp_xts_aes_engine xts;
struct ccp_des3_engine des3;
struct ccp_sha_engine sha;
struct ccp_rsa_engine rsa;
struct ccp_passthru_engine passthru;
struct ccp_passthru_nomap_engine passthru_nomap;
struct ccp_ecc_engine ecc;
} u;
void (*callback)(void *data, int err);
void *data;
};
likeβ¦ look at that union. eight little engine structs all sharing one vibe. iconic. π
πΈ Members πΈ
time for the roll call, bestie β every single one of them, i'm not skipping anybody:
entryβ the list element. ccp driver use only, so hands off unless you are the driver, iykyk. πworkβ the work element used for callbacks. also ccp driver use only. not yours, bestie. πccpβ the CCP device to be run on. this is the one who's gonna do the work. main character energy fr.retβ the operation return code. ccp driver use only, so don't go poking at it. πflagsβ the cmd processing flags. little switches, big consequences, we love a flag moment.engineβ the CCP operation to perform. this is the one β the whole "what am i even doing here" field.engine_errorβ the CCP engine return code. when things go sideways, this one's got the receipts. πuβ the engine-specific structures β refer to the specific engine struct below, because she's a union and she changes shape depending on what you need, shapeshifter queen π§callbackβ the operation completion callback function. gets called when the job's done, like a little "you're welcome" text. π«Άdataβ the parameter value to be supplied to the callback function. it's the little gift you tuck in there for later. π
π₯ Description π₯
okay so here's the actual tea β β these are the variables you have to set when you call ccp_enqueue_cmd:
engine,callback- and honestly, also peep the operation structures below for what's required for each individual operation, because every engine wants something different and you will get caught out if you don't check. β
no cap on this one: this is a "you must set these" situation, not a "whatever feels right" situation. do the homework. π
π SEE ALSO π
go read these next, bestie, they're all in the kernel file ./include/linux/ccp.h and they're all lowkey essential:
ccp_present(9)ccp_version(9)ccp_enqueue_cmd(9)struct ccp_aes_engine(9)struct ccp_xts_aes_engine(9)struct ccp_sha_engine(9)struct ccp_des3_engine(9)struct ccp_rsa_engine(9)struct ccp_passthru_engine(9)struct ccp_passthru_nomap_engine(9)struct ccp_ecc_modular_math(9)struct ccp_ecc_point(9)struct ccp_ecc_point_math(9)struct ccp_ecc_engine(9)
like, that's the whole friend group right there. go say hi. πβ¨
and that's the page!! mwah π this little manual lives over in ./include/linux and it's dated October 2026 β so yeah, she's from the future, she's booked, she's busy, she's struct ccp_cmd(9) ππ bye bestie, go enqueue something iconic!! π¦
π¦ 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