qemu-e2k/target/arm/tcg
Peter Maydell 4d044472ab target/arm: Correct MTE tag checking for reverse-copy MOPS
When we are doing a FEAT_MOPS copy that must be performed backwards,
we call mte_mops_probe_rev(), passing it the address of the last byte
in the region we are probing.  However, allocation_tag_mem_probe()
wants the address of the first byte to get the tag memory for.
Because we passed it (ptr, size) we could incorrectly trip the
allocation_tag_mem_probe() check for "does this access run across to
the following page", and if that following page happened not to be
valid then we would assert.

We know we will always be only dealing with a single page because the
code that calls mte_mops_probe_rev() ensures that.  We could make
mte_mops_probe_rev() pass 'ptr - (size - 1)' to
allocation_tag_mem_probe(), but then we would have to adjust the
returned 'mem' pointer to get back to the tag RAM for the last byte
of the region.  It's simpler to just pass in a size of 1 byte,
because we know that allocation_tag_mem_probe() in pure-probe
single-page mode doesn't care about the size.

Fixes: 69c51dc372 ("target/arm: Implement MTE tag-checking functions for FEAT_MOPS copies")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20231110162546.2192512-1-peter.maydell@linaro.org
2023-11-13 13:15:50 +00:00
..
a32-uncond.decode
a32.decode
a64.decode target/arm: Fix A64 LDRA immediate decode 2023-11-06 15:00:29 +00:00
arm_ldst.h
cpu32.c target/arm: Implement FEAT_HPMN0 2023-10-19 14:32:13 +01:00
cpu64.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
crypto_helper.c
helper-a64.c target/arm: Make FEAT_MOPS SET* insns handle Xs == XZR correctly 2023-11-02 13:36:45 +00:00
helper-a64.h target/arm: Implement the CPY* instructions 2023-09-21 16:07:14 +01:00
helper-mve.h
helper-sme.h
helper-sve.h
hflags.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
iwmmxt_helper.c
m_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
m-nocp.decode
meson.build
mte_helper.c target/arm: Correct MTE tag checking for reverse-copy MOPS 2023-11-13 13:15:50 +00:00
mve_helper.c target/arm/tcg: Clean up local variable shadowing 2023-09-29 10:07:14 +02:00
mve.decode
neon_helper.c
neon-dp.decode
neon-ls.decode
neon-shared.decode
op_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
pauth_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
psci.c
sme_helper.c
sme-fa64.decode
sme.decode
sve_helper.c target/arm: Replace TARGET_PAGE_ENTRY_EXTRA 2023-10-03 08:01:02 -07:00
sve_ldst_internal.h
sve.decode
t16.decode
t32.decode
tlb_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
translate-a32.h tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-a64.c target/arm: HVC at EL3 should go to EL3, not EL2 2023-11-13 13:15:31 +00:00
translate-a64.h tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-m-nocp.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-mve.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-neon.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-sme.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-sve.c target/arm: Fix SVE STR increment 2023-11-02 13:36:45 +00:00
translate-vfp.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate.c target/arm: Permit T32 LDM with single register 2023-10-19 14:32:13 +01:00
translate.h target/arm: Fix A64 LDRA immediate decode 2023-11-06 15:00:29 +00:00
vec_helper.c target/arm: Use clmul_64 2023-09-15 13:57:00 +00:00
vec_internal.h target/arm: Use clmul_16* routines 2023-09-15 13:57:00 +00:00
vfp-uncond.decode
vfp.decode