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

Function crypto_copydata

freebsd/opencrypto/criov.c:629–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629void
630crypto_copydata(struct cryptop *crp, int off, int size, void *dst)
631{
632
633 switch (crp->crp_buf.cb_type) {
634 case CRYPTO_BUF_MBUF:
635 m_copydata(crp->crp_buf.cb_mbuf, off, size, dst);
636 break;
637#if CRYPTO_MAY_HAVE_VMPAGE
638 case CRYPTO_BUF_VMPAGE:
639 MPASS(size <= crp->crp_buf.cb_vm_page_len);
640 MPASS(size + off <= crp->crp_buf.cb_vm_page_len +
641 crp->crp_buf.cb_vm_page_offset);
642 cvm_page_copydata(crp->crp_buf.cb_vm_page,
643 off + crp->crp_buf.cb_vm_page_offset, size, dst);
644 break;
645#endif /* CRYPTO_MAY_HAVE_VMPAGE */
646 case CRYPTO_BUF_UIO:
647 cuio_copydata(crp->crp_buf.cb_uio, off, size, dst);
648 break;
649 case CRYPTO_BUF_CONTIG:
650 MPASS(off + size <= crp->crp_buf.cb_buf_len);
651 bcopy(crp->crp_buf.cb_buf + off, dst, size);
652 break;
653 default:
654#ifdef INVARIANTS
655 panic("invalid crp buf type %d", crp->crp_buf.cb_type);
656#endif
657 break;
658 }
659}
660
661int
662crypto_apply_buf(struct crypto_buffer *cb, int off, int len,

Callers 15

ossl_processFunction · 0.85
blake2_cipher_processFunction · 0.85
aesni_cipher_allocFunction · 0.85
aesni_cipher_cryptFunction · 0.85
aesni_cipher_macFunction · 0.85
ccp_do_hmac_doneFunction · 0.85
ccp_gcm_doneFunction · 0.85
padlock_cipher_processFunction · 0.85
padlock_authcomputeFunction · 0.85
cryptocteon_processFunction · 0.85

Calls 4

m_copydataFunction · 0.85
cvm_page_copydataFunction · 0.85
cuio_copydataFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected