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
…
ansicoldef.c
…
ansiesc.c
…
archive.c [image] Propagate trust flag to extracted archive images 2021-05-12 14:14:52 +01:00
asprintf.c
…
assert.c
…
base16.c
…
base64.c [base64] Include terminating NUL within base64 character array 2021-06-07 13:20:02 +01:00
basename.c
…
bitmap.c
…
blockdev.c
…
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
…
cwuri.c
…
debug.c [debug] Allow debug colourisation to be disabled 2016-01-12 15:39:14 +00:00
debug_md5.c
…
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
…
errno.c
…
exec.c [libc] Make sleep() interruptible 2016-03-22 16:18:42 +00:00
fault.c
…
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
…
gdbserial.c
…
gdbstub.c [gdb] Add support for x86_64 2016-03-22 08:44:32 +00:00
gdbudp.c
…
getkey.c [efi] Work around broken UEFI keyboard drivers 2016-05-25 23:28:41 +01:00
getopt.c
…
hw.c
…
i82365.c
…
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
…
job.c
…
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
…
log.c
…
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
…
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
…
null_reboot.c
…
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
…
nvo.c
…
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
…
pcmcia.c
…
pending.c
…
pinger.c
…
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
…
process.c
…
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
…
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
…
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
…
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