[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/7] linux-user/nios2: Adjust error return
|
From: |
Richard Henderson |
|
Subject: |
Re: [PATCH 3/7] linux-user/nios2: Adjust error return |
|
Date: |
Fri, 25 Mar 2022 12:55:56 -0600 |
|
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
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~
- [PATCH 0/7] linux-user/nios2: Fix clone and sigreturn, Richard Henderson, 2022/03/20
- [PATCH 7/7] tests/tcg/nios2: Re-enable linux-user tests, Richard Henderson, 2022/03/20
- [PATCH 4/7] linux-user/nios2: Handle special qemu syscall return values, Richard Henderson, 2022/03/20
- [PATCH 5/7] linux-user/nios2: Remove do_sigreturn, Richard Henderson, 2022/03/20
- [PATCH 1/7] linux-user/nios2: Fix clone child return, Richard Henderson, 2022/03/20