From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 4/8] linux-user/arm: Report SIGBUS and SIGSEGV correctly
Date: Sun, 19 Sep 2021 15:23:09 -0700 [thread overview]
Message-ID: <4a65af02-ae19-20c5-9ffa-3e3a7d0401d4@linaro.org> (raw)
In-Reply-To: <CAFEAcA82iZptWmCcgonZvLTU4g+5nnEEQDdtHD5y=X7m82N1Yg@mail.gmail.com>
On 8/26/21 6:31 AM, Peter Maydell wrote:
>> + si_signo = TARGET_SIGSEGV;
>> + si_code = TARGET_SEGV_ACCERR;
>> + break;
>> + case 0x5: /* Translation fault, level 1 */
>> + case 0x7: /* Translation fault, level 2 */
>> + si_signo = TARGET_SIGSEGV;
>> + si_code = TARGET_SEGV_MAPERR;
>> + break;
>
> Side note: for cases like this where we can tell MAPERR from
> ACCERR based on info the exception handler passes to us, should
> we prefer that or the "check the page flags" approach that
> force_sigsegv_for_addr() takes ?
FYI, the v3 version of the sigsegv+siginfo patch set makes is vastly easier on the target
code. For the most part the target code goes away entirely. For the specific case of Arm
(both a32 and a64), we retain it because we are supposed to report the ESR and FAR as part
of the signal frame.
I'll note that a64 isn't filling in the esr_context and far_context structures. The
latter was invented for MTE, I believe, where the normal si_addr is untagged. I should
have a double-check around those at some point...
r~
next prev parent reply other threads:[~2021-09-19 22:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-21 19:59 [PATCH v2 0/8] target/arm: Fix insn exception priorities Richard Henderson
2021-08-21 19:59 ` [PATCH v2 1/8] target/arm: Take an exception if PSTATE.IL is set Richard Henderson
2021-08-21 19:59 ` [PATCH v2 2/8] target/arm: Merge disas_a64_insn into aarch64_tr_translate_insn Richard Henderson
2021-08-21 19:59 ` [PATCH v2 3/8] linux-user/aarch64: Handle EC_PCALIGNMENT Richard Henderson
2021-08-26 13:27 ` Peter Maydell
2021-08-21 19:59 ` [PATCH v2 4/8] linux-user/arm: Report SIGBUS and SIGSEGV correctly Richard Henderson
2021-08-26 13:31 ` Peter Maydell
2021-09-08 9:19 ` Richard Henderson
2021-09-19 22:23 ` Richard Henderson [this message]
2021-08-21 19:59 ` [PATCH v2 5/8] target/arm: Take an exception if PC is misaligned Richard Henderson
2021-08-26 13:45 ` Peter Maydell
2021-09-20 1:29 ` Richard Henderson
2021-09-20 8:08 ` Peter Maydell
2021-09-20 13:29 ` Richard Henderson
2021-08-21 19:59 ` [PATCH v2 6/8] target/arm: Assert thumb pc is aligned Richard Henderson
2021-08-21 20:46 ` Philippe Mathieu-Daudé
2021-09-19 22:34 ` Richard Henderson
2021-08-26 13:46 ` Peter Maydell
2021-08-21 19:59 ` [PATCH v2 7/8] target/arm: Suppress bp for exceptions with more priority Richard Henderson
2021-08-21 19:59 ` [PATCH v2 8/8] tests/tcg: Add arm and aarch64 pc alignment tests Richard Henderson
2021-08-26 13:54 ` Peter Maydell
2021-08-28 4:04 ` Richard Henderson
2021-09-13 13:29 ` [PATCH v2 0/8] target/arm: Fix insn exception priorities Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a65af02-ae19-20c5-9ffa-3e3a7d0401d4@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.