To avoid magic handling of non-existing system calls the ABI
sv_fetch_syscall_args() can simply return ENOSYS.
This will be used in the following Linux emulation layer changes.
MFC after: 1 week
Differential D41859
syscall: Allow the sv_fetch_syscall_args to return an uninitialized sysent on error dchagin on Sep 14 2023, 11:02 AM. Authored by Tags Referenced Files
Subscribers
Details
To avoid magic handling of non-existing system calls the ABI MFC after: 1 week
Diff Detail
Event TimelineComment Actions I want to deorbit linux_nosys hack from syscalls.master and fix sv_fetch_syscall_args: https://reviews.freebsd.org/D41902 & https://reviews.freebsd.org/D41901 Comment Actions D41901 sounds as a hack, again. Am I right that the issue is that nosys() sends signal, while Linux' nosys should not? If yes, there are two options:
Comment Actions yes
This way is so generic while for Linuxulator we just need to return ENOSYS. I updated D41901, now callp is initialized and fetch_syscall_args() returns ENOSYS for non-existent syscall. What do you think? Btw, the way you proposed will not work, due to nosys marked as ABSENT and in such cases syscall_thread_enter() return ENOSYS. Ah, this revision is not needed for D41901 now Comment Actions And ABSENT as well? I want to have the obsol() handling to be centralized, we need to have single place where the ENOSYS actions like psignal/log/uprintf happen, and it seems that it cannot be easily kept in nosysl(). Perhaps nosys() should become just return (ENOSYS); and dedicated code in syscallret() do the ENOSYS handling. Comment Actions Yes, all SY_THR_ABSENT marked syscalls go throught syscall_thread_enter() which can return ENOSYS then sy_call() is skiped.
I understand, however this requires one extra check on a "fast path", may be add a check to a slow path? Like in https://reviews.freebsd.org/D41929 |