diff options
author | Gustavo Romero <gustavo.romero@linaro.org> | 2024-07-05 09:40:40 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2024-07-05 12:35:07 +0100 |
commit | 41bfb6704eed12015ddead4e507b97b39b1ff5f6 (patch) | |
tree | 1ee8604e25c05441a5acff5316efe10ad9e9a42d | |
parent | 60f4ce8e2cb9afebc7f3e40062087b91b7243c36 (diff) |
target/arm: Fix exception case in allocation_tag_mem_probe
If page in 'ptr_access' is inaccessible and probe is 'true'
allocation_tag_mem_probe should not throw an exception, but currently it
does, so fix it.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240628050850.536447-5-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240705084047.857176-34-alex.bennee@linaro.org>
-rw-r--r-- | target/arm/tcg/mte_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index 037ac6dd60..a50d576294 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -96,6 +96,9 @@ static uint8_t *allocation_tag_mem_probe(CPUARMState *env, int ptr_mmu_idx, assert(!(probe && ra)); if (!(flags & (ptr_access == MMU_DATA_STORE ? PAGE_WRITE_ORG : PAGE_READ))) { + if (probe) { + return NULL; + } cpu_loop_exit_sigsegv(env_cpu(env), ptr, ptr_access, !(flags & PAGE_VALID), ra); } |