aboutsummaryrefslogtreecommitdiff
path: root/sys/opencrypto/cryptosoft.c
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2020-08-26 02:37:42 +0000
committerAlan Somers <asomers@FreeBSD.org>2020-08-26 02:37:42 +0000
commite6f6d0c9bcbf7942c390f65062054ec4784ce5b8 (patch)
treea83b50c9e02f47cd1b8d6091a31f2398db82bd19 /sys/opencrypto/cryptosoft.c
parentd4d2928a3fc688c04d9a03c8a95bc96537d2c64b (diff)
downloadsrc-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/opencrypto/cryptosoft.c')
-rw-r--r--sys/opencrypto/cryptosoft.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c
index 27a6d472e3d8..0041e96ac0dc 100644
--- a/sys/opencrypto/cryptosoft.c
+++ b/sys/opencrypto/cryptosoft.c
@@ -980,6 +980,10 @@ swcr_compdec(struct swcr_session *ses, struct cryptop *crp)
}
}
break;
+ case CRYPTO_BUF_VMPAGE:
+ adj = crp->crp_payload_length - result;
+ crp->crp_buf.cb_vm_page_len -= adj;
+ break;
default:
break;
}