zlacker

[return to "OpenBSD: Removing syscall(2) from libc and kernel"]
1. saagar+Ss[view] [source] 2023-10-27 17:37:12
>>eclipt+(OP)
Why not remove syscall instructions altogether? When libc wants to do something, it traps on an undefined instruction and then the kernel looks at the program counter to see what it should do. Seems like this would be the ultimate application of this line of thought…
◧◩
2. nine_k+Ot[view] [source] 2023-10-27 17:42:39
>>saagar+Ss
Are there any performance implications on such traps on x64 or ARM?

IIRC, PDP11 and VAX used traps as the way to call the supervisor, and it was pretty cheap.

◧◩◪
3. MBCook+cI[view] [source] 2023-10-27 18:54:45
>>nine_k+Ot
I think ARM (or at least ARM64) does the trap thing too.
[go to top]