3 ms·
Why didn't we get /dev/getrandom?
by plonh 11y ago
Why didn't we get /dev/getrandom?
- viraptor 11y agoOne point of a direct syscall is that you don't have to open any files. That protects you from file descriptor exhaustion attacks.
- cperciva 11y agoAnother point is that it still works if you're inside a chroot / jail / container / with no devices visible.
- rakoo 11y agoIn a way, that's the point of chroot/jail/container: isolate the host filesystem from the guest, so the script that creates it should take /dev into account if it is needed
- Dylan16807 11y agoThe point is to isolate access to the host, and single secure random numbers have nothing to do with the host.
- kalleboo 11y agoHere's the original syscall request http://lists.openwall.net/linux-kernel/2014/07/17/235 http://lists.openwall.net/linux-kernel/2014/07/17/235 and discussion https://news.ycombinator.com/item?id=8049180 https://news.ycombinator.com/item?id=8049180