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~