3 ms·
If the right way to use the Linux system call is to use it with flags set to such that it becomes equivalent to the OpenBSD system call, 1) Why does the Linux
by hsivonen 11y ago
If the right way to use the Linux system call is to use it with flags set to such that it becomes equivalent to the OpenBSD system call,
1) Why does the Linux system call have flags at all?
2) Why does the Linux system call have a different name?
I.e. why not clone the OpenBSD system call exactly with the same name and semantics and not give the userland any flags to shoot self in the foot with?
- masklinn 11y agohttp://thread.gmane.org/gmane.linux.kernel/1750023 http://thread.gmane.org/gmane.linux.kernel/1750023 (you certainly don't have to agree with that, currently all the flags can do is draw from /dev/random instead of /dev/urandom, and do so without blocking, but that's the reasoning behind the interface change and thus the name change)
- hsivonen 11y agoIt's pretty sad that the embedded system problem is exposed to the userland, which isn't a reasonable place to deal with the problem. A better solution would be to require the bootloader to supply the kernel with a seed (as, I gather, OpenBSD deals with the problem) and not support hardware that doesn't have at least one of 1) hardware rng or 2) 256 bits of non-volatile storage for storing a seed across boots available to the bootloader.