if everything TRULY is a file, then the only syscalls you need are open, read, and write. you can implement everything else on top of open, read, and write. change my mind.
read() and write() should not access other properties of the calling process for security reasons; such things make attacks possible, both against the kernel and against other processes. see, for example, the band-aid fix e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 for IB
-
-
Sure, they shouldn’t, but they can and do. E.g. open yourself from /proc/self/mem and go crazy.
-
that's different. privileges for the access come from the open() call / from the fd, rather than being taken from the caller on read(); the mm_struct being accessed comes from the inode. if you read the FD from another context, you get the same data.
- 2 more replies
New conversation -
-
-
the true universal syscall is ioctl()
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.