Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_crypto.c Create Date:2022-07-28 19:58:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:calc_buffer_ahash_atfm

Proto:static int calc_buffer_ahash_atfm(const void *buf, loff_t len, struct ima_digest_data *hash, struct crypto_ahash *tfm)

Type:int

Parameter:

TypeParameterName
const void *buf
loff_tlen
struct ima_digest_data *hash
struct crypto_ahash *tfm
538  ahash_rc = 0
540  length = rypto_ahash_digestsize() - obtain message digest size*@tfm: cipher handle* The size for the message digest created by the message digest cipher* referenced with the cipher handle is returned.* Return: message digest size of cipher
542  req = ahash_request_alloc() - allocate request data structure*@tfm: cipher handle to be registered with the request*@gfp: memory allocation flag that is handed to kmalloc by the API call.* Allocate the request data structure that must be used with the ahash
543  If Not req Then Return -ENOMEM
546  crypto_init_wait( & wait)
547  ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP, Async ops completion helper functioons, & wait)
551  rc = ahash_wait(rypto_ahash_init() - (re)initialize message digest handle*@req: ahash_request handle that already is initialized with all necessary* data using the ahash_request_* API functions* The call (re-)initializes the message digest referenced by the ahash_request, & wait)
552  If rc Then Go to out
555  sg_init_one - Initialize a single entry sg list*@sg: SG entry*@buf: Virtual address for IO*@buflen: IO length
556  ahash_request_set_crypt() - set data buffers*@req: ahash_request handle to be updated*@src: source scatter/gather list*@result: buffer that is filled with the message digest -- the caller must* ensure that the buffer has sufficient space by, for example,
558  ahash_rc = rypto_ahash_update() - add data to message digest for processing*@req: ahash_request handle that was previously initialized with the* crypto_ahash_init call
561  rc = ahash_wait(ahash_rc, & wait)
562  If Not rc Then
563  ahash_request_set_crypt() - set data buffers*@req: ahash_request handle to be updated*@src: source scatter/gather list*@result: buffer that is filled with the message digest -- the caller must* ensure that the buffer has sufficient space by, for example,
564  rc = ahash_wait(rypto_ahash_final() - calculate message digest*@req: reference to the ahash_request handle that holds all information* needed to perform the cipher operation* Finalize the message digest operation and create the message digest, & wait)
566  out :
567  ahash_request_free() - zeroize and free the request data structure*@req: request data structure cipher handle to be freed
568  Return rc
Caller
NameDescribe
calc_buffer_ahash