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é <f4...@amsat.org>


Reply via email to