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
Unknown Object (File)
Wed, Dec 18, 7:35 AM
Unknown Object (File)
Sat, Dec 7, 5:24 AM
Unknown Object (File)
Nov 17 2024, 7:11 AM
Unknown Object (File)
Nov 15 2024, 11:23 PM
Unknown Object (File)
Nov 3 2024, 2:32 AM
Unknown Object (File)
Oct 14 2024, 5:15 AM
Unknown Object (File)
Oct 13 2024, 10:54 AM
Unknown Object (File)
Oct 1 2024, 7:55 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39426
Build 36315: arc lint + arc unit

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