[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 4/9] target/arm: Fix exception case in allocation_tag_mem_prob
From: |
Gustavo Romero |
Subject: |
[PATCH v3 4/9] target/arm: Fix exception case in allocation_tag_mem_probe |
Date: |
Mon, 17 Jun 2024 06:28:44 +0000 |
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>
---
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.34.1
- [PATCH v3 0/9] Add MTE stubs for aarch64 user mode, Gustavo Romero, 2024/06/17
- [PATCH v3 1/9] gdbstub: Clean up process_string_cmd, Gustavo Romero, 2024/06/17
- [PATCH v3 2/9] gdbstub: Move GdbCmdParseEntry into a new header file, Gustavo Romero, 2024/06/17
- [PATCH v3 3/9] gdbstub: Add support for target-specific stubs, Gustavo Romero, 2024/06/17
- [PATCH v3 4/9] target/arm: Fix exception case in allocation_tag_mem_probe,
Gustavo Romero <=
- [PATCH v3 5/9] target/arm: Make some MTE helpers widely available, Gustavo Romero, 2024/06/17
- [PATCH v3 6/9] target/arm: Factor out code for setting MTE TCF0 field, Gustavo Romero, 2024/06/17
- [PATCH v3 7/9] gdbstub: Make get cpu and hex conversion functions non-internal, Gustavo Romero, 2024/06/17
- [PATCH v3 8/9] gdbstub: Add support for MTE in user mode, Gustavo Romero, 2024/06/17