Page MenuHomeFreeBSD

Depessimize arc4rand
ClosedPublic

Authored by mjg on May 12 2019, 1:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 28 2024, 8:39 PM
Unknown Object (File)
Dec 19 2023, 11:50 PM
Unknown Object (File)
Dec 3 2023, 3:47 AM
Unknown Object (File)
Oct 12 2023, 12:51 AM
Unknown Object (File)
Sep 30 2023, 1:45 PM
Unknown Object (File)
Aug 29 2023, 12:58 PM
Unknown Object (File)
Aug 29 2023, 12:57 PM
Unknown Object (File)
Aug 29 2023, 12:56 PM
Subscribers

Details

Summary

The function starts with atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, ARC4_ENTR_SEED), which at least on x86 always dirties the cacheline. I.e. there is perfectly avoidable line bouncing. While here do minor cleanups.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cem added a reviewer: markm.
This revision is now accepted and ready to land.May 12 2019, 2:24 AM
delphij added a subscriber: delphij.

Looks reasonable to me.

This revision was automatically updated to reflect the committed changes.