david/ipxe
Archived
1
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/linux
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
..
linux_console.c [console] Remove "log message" usage from interactive console defaults 2012-03-27 00:51:50 +01:00
linux_entropy.c [legal] Update FSF mailing address in GPL licence texts 2012-07-20 19:55:45 +01:00
linux_nap.c [legal] Update FSF mailing address in GPL licence texts 2012-07-20 19:55:45 +01:00
linux_pci.c [linux] Add support for accessing PCI configuration space via /proc/bus/pci 2013-07-13 12:44:45 +02:00
linux_smbios.c [linux] Provide access to SMBIOS via /dev/mem 2013-12-05 03:16:27 +00:00
linux_time.c [linux] Add missing #include <stddef.h> 2013-07-14 23:36:13 +02:00
linux_timer.c [linux] Avoid starting currticks() from zero every time 2014-03-07 17:30:05 +00:00
linux_uaccess.c [legal] Update FSF mailing address in GPL licence texts 2012-07-20 19:55:45 +01:00
linux_umalloc.c [linux] Make malloc and linux_umalloc valgrindable 2011-03-27 21:03:05 +01:00