|
|
|
|
|
by rep_lodsb
1640 days ago
|
|
Are you sure? I don't think any NT kernel allowed userspace code to directly access I/O ports. The earliest versions didn't even let graphics drivers do that, but that was changed (in either 3.51 or 4.0?) for performance reasons. For compatibility with DOS and 16-bit Windows versions, the kernel may emulate I/O access, similar to modern virtual machines. For simple devices, that layer of emulation may be very thin (with some accesses going directly to the hardware), but that isn't a security problem. A simple polled ADC can't do any harm to the system, at worst you get garbage if multiple programs were to use it at the same time. |
|
IIRC, user-mode programs of WinXP (and earlier, including Win2k) were able to directly access these hardware ports. Which meant that WinXP / Win2k had far better latency, leading to obscure hardware bugs to anyone who upgraded from XP -> Vista (or later). Even if you rewrote the program to use Win Vista+ style COM ports, it wasn't good enough.
So a lot of people stayed back on WinXP / Win NT.
---------
16-bit programs were DOS / segmented mode. Win95 remained compatible. IIRC, Win2k forced you into 32-bit flat-mode programs, which had some security benefits.
But these 32-bit "flat mode" security benefits were not enough, and were still a far cry from the expectations of the modern computer user.