|
From: | Richard Henderson |
Subject: | Re: [PATCH v5 0/4] linux-user: Fix siginfo_t contents when jumping to non-readable pages |
Date: | Thu, 18 Aug 2022 11:32:53 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
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 the end of a page, while in reality they may stop right after it.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 to only affect instructions that cross page boundaries, and RISC-V also has variable length instructions, it seems that I've run into the same problem as what is fixed here.
It seems likely, and the code at the end of riscv_tr_translate_insn is wrong.
Could this fix be extended be extended to targets/riscv?
I'll write up something. r~
[Prev in Thread] | Current Thread | [Next in Thread] |