Page MenuHomeFreeBSD

crypto: move all zeroing into crypto_getreq
ClosedPublic

Authored by mjg on Sep 28 2022, 4:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 3:18 AM
Unknown Object (File)
Sep 30 2024, 1:40 PM
Unknown Object (File)
Sep 30 2024, 1:33 PM
Unknown Object (File)
Sep 30 2024, 1:33 PM
Unknown Object (File)
Sep 30 2024, 1:31 PM
Unknown Object (File)
Sep 28 2024, 6:36 AM
Unknown Object (File)
Sep 27 2024, 5:43 PM
Unknown Object (File)
Sep 27 2024, 11:21 AM
Subscribers

Details

Summary

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

Diff Detail

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

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.