STRUCT CCP_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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