2 ms·
The NT kernel uses exceptions all over the place, in the form of SEH. Accessing an unmapped user pointer? Exception. NTFS log error? Exception. There's no funda
by quotemstr 12y ago
The NT kernel uses exceptions all over the place, in the form of SEH. Accessing an unmapped user pointer? Exception. NTFS log error? Exception. There's no fundamental incompatibility between ring 0 and exceptions.
- shmerl 12y agoI'm not sure it's a positive example.
- quotemstr 12y agoI actually prefer NT exceptions to __copy_from_user for obtaining values from userspace. With SEH exceptions, the kernel can just access user pointers directly and handle possible errors in a natural way. This pattern is especially nice because NT allows ring-0 code to call system call functions directly, and in that case, an input pointer might be a kernel pointer, meaning that the SEH block does no harm and everything Just Works. __copy_from_user feels very awkward by comparison.
- sanxiyn 12y agoIt sure is a positive example. NT kernel is very successful and well respected.