[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user/ppc: Implement swapcontext syscall
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user/ppc: Implement swapcontext syscall |
Date: |
Thu, 19 Jul 2018 22:40:29 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 07/19/2018 08:13 AM, Richard Henderson wrote:
> On 07/18/2018 03:56 PM, Philippe Mathieu-Daudé wrote:
>>> +
>>> +/* This syscall implements {get,set,swap}context for userland. */
>>
>> This comment confuses me because do_setcontext() is available at line 625.
>
> But that's not wired up as a syscall.
>
>>> + /* For ppc32, ctx_size is "reserved for future use".
>>> + * For ppc64, we do not yet support the VSX extension.
>>> + */
>>> + if (ctx_size < sizeof(struct target_ucontext)) {
>>> + return -TARGET_EINVAL;
>>
>> Shouldn't this be -TARGET_ENOMEM?
>>
>> swapcontext(3):
>> ERRORS
>> ENOMEM Insufficient stack space left.
>
> No. Please compare against the syscall, not the libc interface.
Thanks, I felt I was missing something with the 3rd syscall argument.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/kernel/signal_32.c#n1045
>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>