Re:Getting Past C
by jdcarter on Tuesday January 03, 2017 @05:28PM
(#13313788)
I can answer: safe read/write from a simple system call can be "easy." Safe read from the network, possible but no longer easy. Safe call to ioctl, which can literally do anything with any device driver... is a "safe" version of that even possible?
[ Parent
| on HN ]
Re:Getting Past C
by tedunangst on Tuesday January 03, 2017 @06:01PM
(#13314073)
If we're expanding the set of possible bugs to "the kernel can do anything and overwrite anything", then it doesn't matter what language you use.
ioctl is a marshaling mechanism that can represent a library API of almost unlimited proportions and variety. A safety wrapper basically has to target the specific functions, rather than ioctl itself. That has happened within Unix, with some library functions having originated as wrappers around ioctls.