Page MenuHomeFreeBSD

crypto: Add crypto_cursor_segment() to fetch both base and length.
ClosedPublic

Authored by jhb on May 24 2021, 11:58 PM.
Tags
None
Referenced Files
F170191447: D30445.id.diff
Thu, Sep 3, 7:33 PM
F170087915: D30445.id89878.diff
Thu, Sep 3, 11:37 AM
F170052423: D30445.id89789.diff
Thu, Sep 3, 9:15 AM
F169913647: D30445.diff
Wed, Sep 2, 11:03 PM
Unknown Object (File)
Tue, Sep 1, 9:40 PM
Unknown Object (File)
Tue, Sep 1, 5:50 PM
Unknown Object (File)
Mon, Aug 31, 5:34 AM
Unknown Object (File)
Sun, Aug 30, 5:25 PM
Subscribers

Details

Summary

This function combines crypto_cursor_segbase() and
crypto_cursor_seglen() into a single function. This is mostly
beneficial in the unmapped mbuf case where back to back calls of these
two functions have to iterate over the sub-components of unmapped
mbufs twice.

Suggested by: markj

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.May 24 2021, 11:58 PM

I originally had this function return both values by reference, but lots of places use different pointer types (e.g. char * and const char *) and I didn't want to add a lot of casts to deal with that, so I changed it to return the pointer. I did have to change a few variables to size_t in the later changes to cryptosoft to cope with the length being set by reference instead of returned, but that was less disruptive overall.

bcr added a subscriber: bcr.

Ok from manpages.

This revision is now accepted and ready to land.May 25 2021, 1:41 PM