Re: [PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-22 Thread Peter Maydell
On Mon, 22 Nov 2021 at 12:21, Richard Henderson wrote: > > On 11/22/21 12:55 PM, Peter Maydell wrote: > >> + /* > >> + * The syscall calling convention isn't the same as the C one: > > > > Looks like the indent here is wrong ? > > Irritatingly, these files are a mix of tabs/spaces.

Re: [PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-22 Thread Richard Henderson
On 11/22/21 12:55 PM, Peter Maydell wrote: - /* This is the entry point for making a system call. The calling + /* +* This is the entry point for making a system call. The calling * convention here is that of a C varargs function with the * first argument a

Re: [PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-22 Thread Peter Maydell
On Wed, 17 Nov 2021 at 16:12, Richard Henderson wrote: > > The current api from safe_syscall_base() is to return -errno, which is > the interface provided by *some* linux kernel abis. The wrapper macro, > safe_syscall(), detects error, stores into errno, and returns -1, to > match the api of the

Re: [PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-17 Thread Warner Losh
On Wed, Nov 17, 2021 at 9:04 AM Richard Henderson < richard.hender...@linaro.org> wrote: > The current api from safe_syscall_base() is to return -errno, which is > the interface provided by *some* linux kernel abis. The wrapper macro, > safe_syscall(), detects error, stores into errno, and return

[PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-17 Thread Richard Henderson
The current api from safe_syscall_base() is to return -errno, which is the interface provided by *some* linux kernel abis. The wrapper macro, safe_syscall(), detects error, stores into errno, and returns -1, to match the api of the system syscall(). For those kernel abis that do not return -errno