On Tue, Sep 28, 2021 at 3:42 AM Richard Henderson <richard.hender...@linaro.org> 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)); > >> + __put_user(TARGET_NR_sigreturn, (int *)(tramp + 2)); > > > > I know this is mostly code movement, but using uint32_t would > > make it easier to read. > > I'll give you int32_t here, since the value is signed.
Better, thanks. > > >> + __put_user(TARGET_NR_rt_sigreturn, (int *)(tramp + 1)); > > > > and uint32_t. > > Likewise. > > >> + uint16_t *tramp = lock_user(VERIFY_WRITE, sigtramp_page, 2 * 8, 0); > > > > Shouldn't this be 8 + 7? > > Does it really matter if we write 15 or 16 bytes of this page? Certainly not :)