These are devices exposed in Ironclad regardless of target system when present, with standardized interfaces.
/dev/console
wraps architecture-specific debug output channels for use
with file operations. For x86-based targets, this is COM1, for other targets,
this may be UART.
If the target implements reading from the debug channels, read will be supported as well. If not implemented, the device will be read-only.
The kernel also uses the debug channels for output, so keep in mind the contentions that can cause. If you are doing a lot of spaced writes, do not be surprised if the kernel pops in the middle! In the other hand, the kernel does not read from the debug channels.
The devices starting by ramdev
are virtual devices representing the
RAM driver passed by some boot protocols, an FS can be mounted to them, or be
otherwise used like any other block device. These RAM devices are read/write,
but they cannot grow in size, so changes are constrained to the area the
RAM device already has allocated.
The device random
is equivalent to the one featured in other UNIX-like
kernels, and can be read to get a stream of cryptographically secure
pseudo-random bytes.
Ironclad has limited sources of entropy, so the quality of this random numbers
may be limited as well. To mitigate this, one may write to the random
device. The written data will be used as additional entropy.
/dev/urandom
does the same as /dev/random
, and is only provided
for compatibility.
getrandom
is provided as well for avoiding the file interface when
interfacing with /dev/random
, as that may avoid certain kinds of DoS
attacks related to opened file limits.
When present, CPU random number generators may be exposed as /dev/hwrng
.
This device behaves the same as /dev/random
apart from the fact that
it does not allow writing to it. It is recommended that, unless necessary, you
use /dev/random
instead. If you are to use hwrng
, be sure you
trust your hardware to not be backdoored, else, those backdoors might be
rendered useless by the kernel’s own CSPRNG processing.
null
returns EOF
whenever read, and all the write operations are
discarded.
zero
returns exclusively a stream of zeros when read, and all write
operations are discarded.