Re: [PATCH v3 10/27] linux-user/i386: Implement setup_sigtramp

2021-09-27 Thread Philippe Mathieu-Daudé
On Tue, Sep 28, 2021 at 3:42 AM Richard Henderson wrote: > On 9/24/21 2:01 PM, Philippe Mathieu-Daudé wrote: > >> +static void install_sigtramp(void *tramp) > >> +{ > >> +/* This is popl %eax ; movl $syscall,%eax ; int $0x80 */ > >> +__put_user(0xb858, (uint16_t *)(tramp + 0)); > >> +_

Re: [PATCH v3 10/27] linux-user/i386: Implement setup_sigtramp

2021-09-27 Thread Richard Henderson
On 9/24/21 2:01 PM, Philippe Mathieu-Daudé wrote: +static void install_sigtramp(void *tramp) +{ +    /* This is popl %eax ; movl $syscall,%eax ; int $0x80 */ +    __put_user(0xb858, (uint16_t *)(tramp + 0)); +    __put_user(TARGET_NR_sigreturn, (int *)(tramp + 2)); I know this is mostly code mo

Re: [PATCH v3 10/27] linux-user/i386: Implement setup_sigtramp

2021-09-24 Thread Philippe Mathieu-Daudé
On 9/24/21 18:59, Richard Henderson wrote: Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Note that x86_64 does not use this code. Signed-off-by: Richard Henderson --- linux-user/i386/target_signal.h | 2 ++ linux-user/x86_64/target_signal.

[PATCH v3 10/27] linux-user/i386: Implement setup_sigtramp

2021-09-24 Thread Richard Henderson
Create and record the two signal trampolines. Use them when the guest does not use SA_RESTORER. Note that x86_64 does not use this code. Signed-off-by: Richard Henderson --- linux-user/i386/target_signal.h | 2 ++ linux-user/x86_64/target_signal.h | 3 ++ linux-user/i386/signal.c |