Page MenuHomeFreeBSD

crypto: move all zeroing into crypto_getreq
ClosedPublic

Authored by mjg on Sep 28 2022, 4:00 PM.
Tags
None
Referenced Files
F115842555: D36774.diff
Tue, Apr 29, 10:43 AM
Unknown Object (File)
Sun, Apr 27, 3:52 AM
Unknown Object (File)
Fri, Apr 18, 12:36 PM
Unknown Object (File)
Fri, Apr 18, 9:27 AM
Unknown Object (File)
Mon, Apr 7, 12:27 AM
Unknown Object (File)
Mar 7 2025, 3:21 PM
Unknown Object (File)
Mar 6 2025, 3:33 PM
Unknown Object (File)
Feb 20 2025, 7:23 AM
Subscribers

Details

Summary

This avoids a memset with a size unknown at compilatin time, giving the compiler more room to optimize.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mjg requested review of this revision.Sep 28 2022, 4:00 PM
mjg created this revision.
sys/opencrypto/crypto.c
1651

crypto_initreq() zeros the buffer, but _crypto_initreq() does not.

mjg retitled this revision from crypto: eliminate a spurious memset from crypto_getreq to crypto: move all zeroing into crypto_getreq.
mjg edited the summary of this revision. (Show Details)
mjg added inline comments.
sys/opencrypto/crypto.c
1651

huh, you are right. i reworked the patch, key point being that M_ZERO loses information about the size, which does not need to happen.

This revision is now accepted and ready to land.Sep 28 2022, 4:43 PM
This revision was automatically updated to reflect the committed changes.