by burfog · 6y ago · 0 comments
The 0xf1 byte, an "icebp" or "int1" instruction
In 32-bit code, use an FPU stack underflow
In 64-bit mode, access a non-canonical address
In 32-bit code, use the "into" instruction
Write data using a segment selector that goes beyond the LDT limit
With the alignment checking enabled, do a misaligned memory operation
Of course, we can also do system calls without causing exceptions. Examples:
Write the system call number to a well-known memory location that the OS will poll
Modulate the CPU temperature by running code. The OS decodes the signal. Use message passing that involves OFDM, LDPC, ASN.1, and digital signatures.
How about floating point division by zero? Then you could use floating point syscall numbers! SWOON
Call it the NaNix kernel.
"To infinity, and beyond!!!"
It's not a bug, it's a feature. This adds.. ehem.. a new dimension to integer numbers (or even complex numbers, we'll call them supercomplex numbers).
I like how you mixed this in with real suggestions.
Don't kink-shame the ITU-T! They're just sadomasochistic, that's all...
(Which given the fact that the list contains undocumented and obscure 0xf1 icebp and not documented 0xcc int3 seems to be the intention)
Of course you would have to make the KBC low level accessible to user mode which may cause issue processing legacy input devices. Plus having to reinitialise protected mode every system call might cause some efficiency issues.
As for entering and exiting protected mode: that is in fact surprisingly fast operation assuming that all the relevant data structures are still in place. In fact DOS XMS managers (and VxD-based Windows) switch between PM with vm86, true real mode and various unreal-ish (ie. real mode with weird values in descriptor shadow registers) modes quite regularly.
for security reasons (ASLR), the vsyscall page is implemented on modern kernels by unmapping the page, trapping the page fault, and emulating the system call.
the recently introduced io_uring interface provides an interface to set up a buffer ring which is asynchronously polled by the kernel for system calls to execute.