ahash_request_set_callback(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ahash_request_set_callback ✨

okay so bestie, we're in the Kernel API Manual today and the star of the show is ahash_request_set_callback β€” the little function that decides who gets called when your async hash finishes doing its thing. literally the "text me when you're done" of the crypto API 🫢


πŸŽ€ NAME πŸŽ€

ahash_request_set_callback β€” set asynchronous callback function πŸ’–


✨ SYNOPSIS ✨

void ahash_request_set_callback (struct ahash_request *req , u32 flags ,
crypto_completion_t compl , void *data );

🌸 ARGUMENTS 🌸

  • req β€” the request handle. your main character. the thing the callback gets registered on πŸ’…
  • flags β€” specify zero or an ORing of the flags πŸ‘‘ so like, either zero, or you OR these bad boys together:
    • CRYPTO_TFM_REQ_MAY_BACKLOG β€” the request queue may back log and increase the wait queue beyond the initial maximum size
    • CRYPTO_TFM_REQ_MAY_SLEEP β€” the request processing may sleep 😴
  • compl β€” callback function pointer to be registered with the request handle. this is the "you up?" function πŸ“ž
  • data β€” The data pointer refers to memory that is not used by the kernel crypto API, but provided to the callback function for it to use. Here, the caller can provide a reference to memory the callback function can operate on. As the callback function is invoked asynchronously to the related functionality, it may need to access data structures of the related functionality which can be referenced using this pointer. The callback function can access the memory via the "data" field in the crypto_async_request data structure provided to the callback function. 🧚 basically it's your lil bag of stuff that the kernel is like "not mine, not touching it, but here, your callback can have it" no cap

πŸ¦‹ DESCRIPTION πŸ¦‹

This function allows setting the callback function that is triggered once the cipher operation completes. ⭐

The callback function is registered with the ahash_request handle and must comply with the following template β€” like, this is the vibe check it has to pass, fr fr:

void callback_function(struct crypto_async_request *req, int error)
bestie please do not freestyle the signature. it must comply. the kernel is not flexible about this one 😭

🌈 SEE ALSO 🌈


and that's the whole page, bestie, you ate that πŸ’…βœ¨

this lil gem lives over in ./include/crypto, dated October 2026, and it's filed under ahash_request_set_callback(9) β€” go forth and register those callbacks responsibly πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from