Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-18 Thread Richard Henderson
On 8/18/22 09:55, Vivian Wang wrote: On 8/17/22 23:05, Ilya Leoshkevich wrote: Hi, I noticed that when we get a SEGV due to jumping to non-readable memory, sometimes si_addr and program counter in siginfo_t are slightly off. I tracked this down to the assumption that translators stop before

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-18 Thread Ilya Leoshkevich
On Fri, 2022-08-19 at 00:55 +0800, Vivian Wang wrote: > Hi, > Could this be related to issue 1155 [1]? On RISC-V, I'm getting > incorrect [m|s]tval/[m|s]epc combinations for page faults in system > emulation and incorrect si_addr and program counter on SIGSEGV in > user emulation. Since it seems

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-18 Thread Vivian Wang
On 8/17/22 23:05, Ilya Leoshkevich wrote: > Hi, > > I noticed that when we get a SEGV due to jumping to non-readable > memory, sometimes si_addr and program counter in siginfo_t are slightly > off. I tracked this down to the assumption that translators stop before > the end of a page, while in

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-17 Thread Ilya Leoshkevich
On Wed, 2022-08-17 at 11:23 -0500, Richard Henderson wrote: > On 8/17/22 10:05, Ilya Leoshkevich wrote: > > Hi, > > > > I noticed that when we get a SEGV due to jumping to non-readable > > memory, sometimes si_addr and program counter in siginfo_t are > > slightly > > off. I tracked this down to

Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-17 Thread Richard Henderson
On 8/17/22 10:05, Ilya Leoshkevich wrote: Hi, I noticed that when we get a SEGV due to jumping to non-readable memory, sometimes si_addr and program counter in siginfo_t are slightly off. I tracked this down to the assumption that translators stop before the end of a page, while in reality they

[PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-17 Thread Ilya Leoshkevich
Hi, I noticed that when we get a SEGV due to jumping to non-readable memory, sometimes si_addr and program counter in siginfo_t are slightly off. I tracked this down to the assumption that translators stop before the end of a page, while in reality they may stop right after it. Patch 1 fixes an