MCPcopy Create free account
hub / github.com/F-Stack/f-stack / armv8_crypto_cipher_alloc

Function armv8_crypto_cipher_alloc

freebsd/crypto/armv8/armv8_crypto.c:360–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360static uint8_t *
361armv8_crypto_cipher_alloc(struct cryptop *crp, int start, int length, int *allocated)
362{
363 uint8_t *addr;
364
365 addr = crypto_contiguous_subsegment(crp, start, length);
366 if (addr != NULL) {
367 *allocated = 0;
368 return (addr);
369 }
370 addr = malloc(crp->crp_payload_length, M_ARMV8_CRYPTO, M_NOWAIT);
371 if (addr != NULL) {
372 *allocated = 1;
373 crypto_copydata(crp, start, length, addr);
374 } else
375 *allocated = 0;
376 return (addr);
377}
378
379static int
380armv8_crypto_cipher_process(struct armv8_crypto_session *ses,

Callers 1

Calls 3

mallocFunction · 0.85
crypto_copydataFunction · 0.85

Tested by

no test coverage detected