qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] target/arm: Fix unaligned mte checks
@ 2021-04-02  5:37 Richard Henderson
  2021-04-02  5:37 ` [PATCH 1/2] target/arm: Check PAGE_WRITE_ORG for MTE writeability Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Richard Henderson @ 2021-04-02  5:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm

I was incorrectly assuming that only the first byte of an MTE access
is checked against the tags.  But per the ARM, unaligned accesses are
pre-decomposed into single-byte accesses.  So by the time we reach the
actual MTE check in the ARM pseudocode, all accesses are aligned.

There's probably more that could be simplified here, but I did try to
keep the patch small-ish.


r~


Richare Henderson (2):
  target/arm: Check PAGE_WRITE_ORG for MTE writeability
  target/arm: Fix unaligned mte checks

 target/arm/helper-a64.h           |   3 +-
 target/arm/internals.h            |  13 +--
 target/arm/translate-a64.h        |   2 +-
 target/arm/mte_helper.c           | 171 ++++++++++++------------------
 target/arm/sve_helper.c           |  96 ++++++-----------
 target/arm/translate-a64.c        |  52 ++++-----
 target/arm/translate-sve.c        |   9 +-
 tests/tcg/aarch64/mte-5.c         |  44 ++++++++
 tests/tcg/aarch64/Makefile.target |   2 +-
 9 files changed, 179 insertions(+), 213 deletions(-)
 create mode 100644 tests/tcg/aarch64/mte-5.c

-- 
2.25.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-02 18:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02  5:37 [PATCH 0/2] target/arm: Fix unaligned mte checks Richard Henderson
2021-04-02  5:37 ` [PATCH 1/2] target/arm: Check PAGE_WRITE_ORG for MTE writeability Richard Henderson
2021-04-02  5:37 ` [PATCH 2/2] target/arm: Fix unaligned mte checks Richard Henderson
2021-04-02 15:43   ` Richard Henderson
2021-04-02 18:35   ` Peter Maydell
2021-04-02 18:44     ` Richard Henderson
2021-04-02  5:45 ` [PATCH 0/2] " no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).