On 3/25/22 07:37, Peter Maydell wrote:
This turns out to be because in 2015 kernel commit c3525940cca5
switched powerpc from checking against 515/516 and instead made
them check MAX_ERRNO (4095).

(If anybody cared about seccomp on sparc hosts they'd probably
want to fix the sparc kernel similarly, but presumably nobody
does :-))

Indeed, thanks for the archaeology.

The kernel commit message mentions some infrastructure in
the form of force_successful_syscall_return() where syscall
implementations can force that a value above -MAX_ERRNO
is still treated as "success". In theory perhaps we should
have something similar...

In theory, yes.  It affects 3 or 4 syscalls.
That said, nios2 doesn't define force_successful_syscall_return. :-P


r~

Reply via email to