summaryrefslogtreecommitdiffstats
path: root/src/interface/linux/linux_timer.c
Commit message (Collapse)AuthorAgeFilesLines
* [linux] Avoid starting currticks() from zero every timeMichael Brown2014-03-071-1/+7
| | | | | | | | | | | | | | | | | | | 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>
* [linux] Add missing #include <stddef.h>Marin Hannache2013-07-141-0/+1
| | | | | Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Add timerPiotr Jaroszyński2010-08-191-0/+80
Add linux timer API. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>