qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user/ppc: Implement swapcontext syscall


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] linux-user/ppc: Implement swapcontext syscall
Date: Thu, 19 Jul 2018 04:13:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

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.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/kernel/signal_32.c#n1045


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]