opengnsys_ipxe/src/core
Michael Brown ff0f860483 [libc] Use wall clock time as seed for the (non-cryptographic) RNG
We currently use the number of timer ticks since power-on as a seed
for the non-cryptographic RNG implemented by random().  Since iPXE is
often executed directly after power-on, and since the timer tick
resolution is generally low, this can often result in identical seed
values being used on each cold boot attempt.

As of commit 41f786c ("[settings] Add "unixtime" builtin setting to
expose the current time"), the current wall-clock time is always
available within the default build of iPXE.  Use this time instead, to
introduce variability between cold boot attempts on the same host.
(Note that variability between different hosts is obtained by using
the MAC address as an additional seed value.)

This has no effect on the separate DRBG used by cryptographic code.

Suggested-by: Heiko <heik0@xs4all.nl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2023-10-06 12:50:43 +01:00
..
acpi.c [acpi] Allow for the possibility of overriding ACPI tables at link time 2022-03-24 12:58:52 +00:00
acpi_settings.c [acpi] Allow for the possibility of overriding ACPI tables at link time 2022-03-24 12:58:52 +00:00
acpimac.c [acpi] Expose system MAC address via ${sysmac} setting 2022-06-10 13:44:40 +01:00
ansicol.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
ansicoldef.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
ansiesc.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
archive.c [image] Propagate trust flag to extracted archive images 2021-05-12 14:14:52 +01:00
asprintf.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
assert.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
base16.c [base16] Add buffer size parameter to base16_encode() and base16_decode() 2015-04-24 14:41:32 +01:00
base64.c [base64] Include terminating NUL within base64 character array 2021-06-07 13:20:02 +01:00
basename.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
bitmap.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
blockdev.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
blocktrans.c [interface] Provide intf_insert() to insert a filter interface 2020-12-07 13:50:24 +00:00
cachedhcp.c [netdevice] Allocate private data for each network upper-layer driver 2023-09-13 20:23:46 +01:00
console.c [libc] Match standard prototype for putchar() 2021-06-07 13:26:01 +01:00
cpio.c [image] Check delimiters when parsing command-line key-value arguments 2023-02-14 11:13:45 +00:00
ctype.c [libc] Rewrite unrelicensable portions of ctype.h 2015-03-02 16:35:37 +00:00
cwuri.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
debug.c [debug] Allow debug colourisation to be disabled 2016-01-12 15:39:14 +00:00
debug_md5.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
device.c [init] Show startup and shutdown function names in debug messages 2019-01-25 14:53:43 +00:00
dma.c [dma] Provide dma_umalloc() for allocating large DMA-coherent buffers 2020-11-29 11:25:40 +00:00
downloader.c [downloader] Allow underlying downloads to provide detailed job progress 2017-09-05 23:23:22 +01:00
dummy_sanboot.c [block] Allow use of a non-default EFI SAN boot filename 2017-04-12 15:58:05 +01:00
dynkeymap.c [console] Support changing keyboard map at runtime 2022-02-16 14:06:33 +00:00
edd.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
errno.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
exec.c [libc] Make sleep() interruptible 2016-03-22 16:18:42 +00:00
fault.c [fault] Add inject_corruption() to randomly corrupt data 2015-07-22 21:17:47 +01:00
fbcon.c [fbcon] Support Unicode character output 2022-03-15 17:27:18 +00:00
fdt.c [fdt] Add ability to parse a MAC address from a flattened device tree 2019-07-19 17:35:39 +01:00
fnrec.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-05 11:40:13 +00:00
gdbserial.c [gdb] Allow gdbstub to be started on an arbitrary serial port 2015-06-29 16:44:16 +01:00
gdbstub.c [gdb] Add support for x86_64 2016-03-22 08:44:32 +00:00
gdbudp.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-05 11:40:13 +00:00
getkey.c [efi] Work around broken UEFI keyboard drivers 2016-05-25 23:28:41 +01:00
getopt.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:50:42 +00:00
hw.c [hw] Eliminate polling while waiting for window to open 2011-06-28 14:45:11 +01:00
i82365.c Initial revision 2005-03-08 18:53:11 +00:00
image.c [image] Generalise concept of selected image 2023-05-17 14:42:03 +01:00
init.c [init] Show startup and shutdown function names in debug messages 2019-01-25 14:53:43 +00:00
interface.c [interface] Fix debug message values for temporary interfaces 2023-07-04 16:54:39 +01:00
iobuf.c [dma] Move I/O buffer DMA operations to iobuf.h 2020-11-28 20:26:28 +00:00
iomap_virt.c [ioapi] Split ioremap() out to a separate IOMAP API 2016-02-26 15:33:40 +00:00
isqrt.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
job.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
keymap.c [console] Support changing keyboard map at runtime 2022-02-16 14:06:33 +00:00
linebuf.c [linebuf] Support buffering of multiple lines 2015-07-28 16:59:11 +01:00
lineconsole.c [syslog] Handle backspace characters 2017-06-13 11:54:41 +01:00
list.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
log.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
main.c [test] Allow self-tests to report exit status when running under Linux 2015-08-21 15:46:28 +01:00
malloc.c [malloc] Rename malloc_dma() to malloc_phys() 2020-11-05 19:13:52 +00:00
memmap_settings.c [settings] Extend numerical setting tags to 64 bits 2017-05-22 13:54:13 +01:00
menu.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
monojob.c [monojob] Display job status message, if present 2017-09-05 23:23:22 +01:00
netbios.c [http] Allow for domain names within NTLM user names 2018-02-19 11:58:28 +00:00
null_acpi.c [acpi] Allow for platforms that provide ACPI tables individually 2021-03-01 00:08:23 +00:00
null_nap.c [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
null_reboot.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:50:42 +00:00
null_sanboot.c [block] Allow use of a non-default EFI SAN boot filename 2017-04-12 15:58:05 +01:00
null_time.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
nvo.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
open.c [uri] Make URI schemes case-insensitive 2021-07-01 16:32:46 +01:00
params.c [params] Allow for arbitrary HTTP request headers to be specified 2023-03-01 12:20:02 +00:00
parseopt.c [console] Restore compatibility with "--key" values in existing scripts 2023-07-07 15:14:00 +01:00
pc_kbd.c [console] Move include/console.h to include/ipxe/console.h 2011-03-09 20:09:26 +00:00
pcmcia.c [console] Move putchar() and getchar() declarations to stdio.h 2012-03-26 14:43:52 +01:00
pending.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
pinger.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
pixbuf.c [pixbuf] Avoid potential division by zero 2017-03-22 14:11:19 +02:00
pool.c [pool] Add a generic concept of a pooled connection 2015-07-28 16:37:00 +01:00
posix_io.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
process.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
profile.c [profile] Prevent potential division by zero 2018-03-18 18:39:39 +02:00
quiesce.c [block] Provide abstraction to allow system to be quiesced 2017-04-26 20:15:39 +01:00
random.c [libc] Use wall clock time as seed for the (non-cryptographic) RNG 2023-10-06 12:50:43 +01:00
refcnt.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
resolv.c [resolv] Use pass-through interfaces for name resolution multiplexer 2017-09-06 11:43:22 +01:00
sanboot.c [block] Provide abstraction to allow system to be quiesced 2017-04-26 20:15:39 +01:00
serial.c [init] Show startup and shutdown function names in debug messages 2019-01-25 14:53:43 +00:00
settings.c [settings] Always process all settings applicators 2022-02-16 13:50:41 +00:00
string.c [libc] Add strncasecmp() 2021-05-18 11:45:24 +01:00
stringextra.c [libc] Remove unused string functions 2015-02-16 16:25:20 +00:00
time.c [time] Allow system clock to be adjusted at runtime 2016-06-13 15:29:05 +01:00
timer.c [time] Add sleep_fixed() function to sleep without checking for Ctrl-C 2017-03-27 15:41:22 +03:00
uart.c [serial] Check for UART existence in uart_select() 2015-07-31 11:19:19 +01:00
uri.c [uri] Allow for relative URIs that include colons within the path 2022-01-13 15:03:22 +00:00
utf8.c [utf8] Add ability to accumulate Unicode characters from UTF-8 bytes 2022-03-01 15:57:33 +00:00
uuid.c [build] Return const char * from uuid_ntoa() 2017-01-22 13:45:00 +00:00
version.c [efi] Include Secure Boot Advanced Targeting (SBAT) metadata 2022-01-13 14:12:44 +00:00
vsprintf.c [libc] Print "<NULL>" for wide-character NULL strings 2016-04-12 11:53:06 +01:00
wchar.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
xfer.c [interface] Fix debug message values for temporary interfaces 2023-07-04 16:54:39 +01:00
xferbuf.c [build] Fix compiler warnings on some gcc versions 2015-07-27 15:21:17 +01:00