ahash_request_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ahash_request_alloc πŸ’…

okay so bestie, welcome to the kernel crypto corner of the manual pages β€” this one is ahash_request_alloc(9) from the Kernel API Manual and it's literally the lil' allocator that sets your async hash life up πŸŽ€


🌸 NAME 🌸

ahash_request_alloc β€” allocate request data structure

yep that's it, that's the whole gig: it makes you a request data structure 🫢


✨ SYNOPSIS ✨

struct ahash_request * ahash_request_alloc (struct crypto_ahash *tfm ,
gfp_t gfp );

look at her go 😭 returns a struct ahash_request * and takes two args, iconic


πŸ¦‹ ARGUMENTS πŸ¦‹

  • tfm β€” the cipher handle that gets registered with the request. she's the main character of this whole operation πŸ‘‘
  • gfp β€” the memory allocation flag, and it gets handed straight to kmalloc by the API call. so like, that's the vibe you're passing down to the allocator, no cap 🌈

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: this function allocates the request data structure that must be used with the ahash message digest API calls. like, not optional, you need this one fr fr.

and during the allocation, the ahash handle you passed in (tfm) gets registered in the request data structure. so your handle is literally baked in from the start, slay ✨

bestie note: the original says "must be used" β€” so yeah, this isn't a cute suggestion, it's the requirement πŸ’…

⭐ RETURN ⭐

it gives you back the allocated request handle in case of success β€” or NULL if it's out of memory 😭 (that's the sad path, no cap)


πŸ”₯ SEE ALSO πŸ”₯

so many friends, she's got the whole group chat linked up:


and that's the whole page bestie, go forth and allocate responsibly πŸ’œ

mwah πŸ’‹ β€” this lil' beauty lives in ./include/crypto, stamped October 2026, and it's brought to you by the ahash_request_alloc(9) girlies of the Kernel API Manual πŸŽ€βœ¨

πŸ“¦ where this page comes from