]> git.ipfire.org Git - thirdparty/qemu.git/commit
accel/tcg: Fix cpu_ld*_code_mmu for user mode
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 15 Mar 2025 01:20:00 +0000 (18:20 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 23 Apr 2025 21:08:17 +0000 (14:08 -0700)
commit66269bb96999395906e0e38ca7e59f92ab371933
tree81cb6fcc2bfe3b4f338e9413c59acb2542aa8270
parente9358339c5dc7aab0b48d35b57371efae1737046
accel/tcg: Fix cpu_ld*_code_mmu for user mode

These routines are buggy in multiple ways:
  - Use of target-endian loads, then a bswap that
    depends on the host endiannness.
  - A non-unwinding code load must set_helper_retaddr 1,
    which is magic within adjust_signal_pc.
  - cpu_ldq_code_mmu used MMU_DATA_LOAD

The bugs are hidden because all current uses of cpu_ld*_code_mmu
are from system mode.

Fixes: 2899062614a ("accel/tcg: Add cpu_ld*_code_mmu")
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/user-exec.c