david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/interface
Michael Brown 08f9170ba4 [linux] Avoid starting currticks() from zero every time
iPXE uses currticks() (along with the MAC address(es) of any network
devices) to seed the (non-cryptographic) random number generator.  The
current implementation of linux_currticks() ensures that the first
call to currticks() will always return zero; this results in identical
random number sequences on each run of iPXE on a given machine.  This
can cause odd-looking behaviour due to e.g. the reuse of local TCP
port numbers.

Fix by effectively rounding down the start time recorded by
linux_currticks() to the nearest whole second; this makes it unlikely
that consecutive runs of iPXE will use the exact same RNG sequence.

(Note that none of this affects the cryptographic RNG, which uses
/dev/random as a source of entropy.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-07 17:30:05 +00:00
..
bofm [legal] Update FSF mailing address in GPL licence texts 2012-07-20 19:55:45 +01:00
efi [settings] Allow for multiple definitions of each predefined setting 2013-12-05 12:43:28 +00:00
linux [linux] Avoid starting currticks() from zero every time 2014-03-07 17:30:05 +00:00
smbios [settings] Force settings into alphabetical order within sections 2013-12-05 12:43:28 +00:00