Index: sys/opencrypto/criov.c =================================================================== --- sys/opencrypto/criov.c +++ sys/opencrypto/criov.c @@ -269,6 +269,13 @@ } } +void +crypto_cursor_copy(const struct crypto_buffer_cursor *fromc, + struct crypto_buffer_cursor *toc) +{ + memcpy(toc, fromc, sizeof(struct crypto_buffer_cursor)); +} + SDT_PROBE_DEFINE2(opencrypto, criov, cursor_advance, vmpage, "struct crypto_buffer_cursor*", "size_t"); void Index: sys/opencrypto/cryptodev.h =================================================================== --- sys/opencrypto/cryptodev.h +++ sys/opencrypto/cryptodev.h @@ -698,6 +698,8 @@ size_t crypto_buffer_len(struct crypto_buffer *cb); void crypto_cursor_init(struct crypto_buffer_cursor *cc, const struct crypto_buffer *cb); +void crypto_cursor_copy(const struct crypto_buffer_cursor *fromc, + struct crypto_buffer_cursor *toc); void crypto_cursor_advance(struct crypto_buffer_cursor *cc, size_t amount); void *crypto_cursor_segbase(struct crypto_buffer_cursor *cc); size_t crypto_cursor_seglen(struct crypto_buffer_cursor *cc);