Remove unnecessary use of function-local static variable. 32 bytes is
small enough to live on the stack.
Details
Details
- Reviewers
markm delphij jmg - Group Reviewers
secteam O3: Kernel Random Numbers Generator (Owns No Changed Paths) - Commits
- rGb00de27cfc8d: Fortuna: trivial static variable cleanup
rS339481: Fortuna: trivial static variable cleanup
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 19258 Build 18871: arc lint + arc unit
Event Timeline
Comment Actions
This would increase stack usage for /dev/random read by 32 bytes, but I think it's small enough and make the code easier to reason for MP safety (the buffer is not meant to be shared by two different threads), so consider this a LGTM from secteam@ as long as there is no objection raised by September 1st.
Comment Actions
Yeah, the buffer should not be shared and it is a tiny amount of stack space. Our /dev/random read stacks are not super deep. (This isn't a security issue or implementation flaw due to the exclusive RANDOM_RESEED mutex being held over all accesses.) Thanks!