diff options
author | Alan Somers <asomers@FreeBSD.org> | 2020-08-26 02:37:42 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2020-08-26 02:37:42 +0000 |
commit | e6f6d0c9bcbf7942c390f65062054ec4784ce5b8 (patch) | |
tree | a83b50c9e02f47cd1b8d6091a31f2398db82bd19 /sys/dev/sec | |
parent | d4d2928a3fc688c04d9a03c8a95bc96537d2c64b (diff) | |
download | src-e6f6d0c9bcbf7942c390f65062054ec4784ce5b8.tar.gz src-e6f6d0c9bcbf7942c390f65062054ec4784ce5b8.zip |
crypto(9): add CRYPTO_BUF_VMPAGE
crypto(9) functions can now be used on buffers composed of an array of
vm_page_t structures, such as those stored in an unmapped struct bio. It
requires the running to kernel to support the direct memory map, so not all
architectures can use it.
Reviewed by: markj, kib, jhb, mjg, mat, bcr (manpages)
MFC after: 1 week
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D25671
Notes
Notes:
svn path=/head/; revision=364799
Diffstat (limited to 'sys/dev/sec')
-rw-r--r-- | sys/dev/sec/sec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/sec/sec.c b/sys/dev/sec/sec.c index a3c4fdac3de9..342ee849aa2b 100644 --- a/sys/dev/sec/sec.c +++ b/sys/dev/sec/sec.c @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_mem *dma_mem, case CRYPTO_BUF_MBUF: size = m_length(crp->crp_buf.cb_mbuf, NULL); break; + case CRYPTO_BUF_VMPAGE: + size = PAGE_SIZE - cb->cb_vm_page_offset; + break; default: return (EINVAL); } |