3 ms·
That's because direct i/o and device access for VGA card manipulation requires root access, it's not directly relates to file permissions. Same with X11 servers
by 0x0 4y ago
That's because direct i/o and device access for VGA card manipulation requires root access, it's not directly relates to file permissions. Same with X11 servers for the longest time (until the kernel started providing APIs for this)
- pjmlp 4y agoDevices are files on UNIX, as we all know from its design. It was more due to lack of userspace APIs for graphics programming than anything else.
- jjtheblunt 4y agoMinor nitpick from someone who wrote device drivers at a FAANG whose name starts with A and who is not based in Seattle: devices can have a presence as a device special file in the filesystem, but they might be not represented in the filesystem also...they might be hiding down some hardware bus, for example.
- pjmlp 4y agoDepends on which UNIX.
- mjg59 4y agoEh you also need to call iopl() which is a privileged operation, it's not just about file permissions
- pjmlp 4y agoIt is a Linux specific API.
- deleted 4y ago[deleted]
- toast0 4y agoOn x86, i/o permissions could easily be delegated to a user-level task; although you'd need some mechanism to request/grant the access, as you probably wouldn't want to allow all programs to access the i/o ports. You'd probably need a mechanism to disable the built in VGA console as well.