[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 33/40] target/arm: Fix exception case in allocation_tag_mem_pr
From: |
Alex Bennée |
Subject: |
[PATCH v2 33/40] target/arm: Fix exception case in allocation_tag_mem_probe |
Date: |
Fri, 5 Jul 2024 09:40:40 +0100 |
From: Gustavo Romero <gustavo.romero@linaro.org>
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>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240628050850.536447-5-gustavo.romero@linaro.org>
---
target/arm/tcg/mte_helper.c | 3 +++
1 file changed, 3 insertions(+)
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);
}
--
2.39.2
- [PATCH v2 24/40] plugins/lockstep: make mixed-mode safe, (continued)
- [PATCH v2 24/40] plugins/lockstep: make mixed-mode safe, Alex Bennée, 2024/07/05
- [PATCH v2 14/40] tests/tcg/arm: Drop -N from LDFLAGS, Alex Bennée, 2024/07/05
- [PATCH v2 36/40] gdbstub: Make hex conversion function non-internal, Alex Bennée, 2024/07/05
- [PATCH v2 21/40] test/plugin: make insn plugin less noisy by default, Alex Bennée, 2024/07/05
- [PATCH v2 13/40] tests/tcg/arm: Fix fcvt result messages, Alex Bennée, 2024/07/05
- [PATCH v2 38/40] gdbstub: Use true to set cmd_startswith, Alex Bennée, 2024/07/05
- [PATCH v2 23/40] plugins/lockstep: preserve sock_path, Alex Bennée, 2024/07/05
- [PATCH v2 33/40] target/arm: Fix exception case in allocation_tag_mem_probe,
Alex Bennée <=
- [PATCH v2 40/40] tests/tcg/aarch64: Add MTE gdbstub tests, Alex Bennée, 2024/07/05