linux-raw-sys
linux-raw-sys copied to clipboard
Add syscall functions
Draft for resolving https://github.com/bytecodealliance/rustix/issues/1055
If the outlined approach is acceptable, I will port the remaining arches and tweak the gen
crate.
I am not sure what to do with x86. Duplicating the vDSO stuff looks a bit too heavy, while using int 0x80
would be too inefficient. We could use the GS register with 0x10 offset, but IIUC it relies on C runtime, which may not be present in some rare cases and the offset may not be stable across platforms. After cursory reading it looks like we could use the sysenter
instruction, it's performance should be comparable to vDSO, but I wonder why it was not used in the rustix
crate.