[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writ
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes |
Date: |
Mon, 24 Mar 2014 08:27:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 03/24/2014 05:41 AM, Peter Maydell wrote:
> On 15 March 2014 02:48, Richard Henderson <address@hidden> wrote:
>> Since the kernel doesn't pass any info on the reason for the fault,
>> disassemble the instruction to detect a store.
>
> Incidentally, I've been wondering if we could improve
> handle_cpu_signal so that at least the "check if this
> fault was because we write-protected a page when we
> translated code out of it" part doesn't depend on the
> CPU-specific signal handler setting is_write correctly.
> I think most guests don't depend on getting exactly
> correct fault information, but if we don't track our
> own page protection correctly then even simple guest
> binaries don't work.
Indeed. I had wondered if just setting is_write=1 when we don't know wouldn't
be a better solution that what we have now.
> (Also, shouldn't we ideally speaking see if the SIGSEGV
> was the result of attempting to execute from non-executable
> memory?)
Probably, but I'm not sure we know at this point.
Although, honestly, the best fallback would be softmmu. Which we really ought
to enable for both 64-on-32 and host > guest page size. Especially with the
later we sometimes can't even *load* simple binaries.
r~
- [Qemu-devel] [PATCH 00/26] tcg/aarch64 improvements, part 3, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 02/26] tcg-aarch64: Use intptr_t apropriately, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 03/26] tcg-aarch64: Use TCGType and TCGMemOp constants, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 04/26] tcg-aarch64: Use MOVN in tcg_out_movi, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 06/26] tcg-aarch64: Special case small constants in tcg_out_movi, Richard Henderson, 2014/03/14
- [Qemu-devel] [PATCH 07/26] tcg-aarch64: Use adrp in tcg_out_movi, Richard Henderson, 2014/03/14