| 358 | } |
| 359 | |
| 360 | static uint8_t * |
| 361 | armv8_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 | |
| 379 | static int |
| 380 | armv8_crypto_cipher_process(struct armv8_crypto_session *ses, |
no test coverage detected