Re: [PATCH v2 03/42] accel/tcg: Fix cpu_ld*_code_mmu for user mode

2025-03-18 Thread Pierrick Bouvier
On 3/18/25 14:31, Richard Henderson wrote: 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_m

Re: [PATCH v2 03/42] accel/tcg: Fix cpu_ld*_code_mmu for user mode

2025-03-18 Thread Richard Henderson
On 3/18/25 16:52, Pierrick Bouvier wrote: On 3/18/25 14:31, Richard Henderson wrote: These routines are buggy in multiple ways:    - Use of target-endian loads, then a bswap that depends on the host endiannness. The code is very similar to do_ld*_mmu functions, so it's subtle to notice.

Re: [PATCH v2 03/42] accel/tcg: Fix cpu_ld*_code_mmu for user mode

2025-03-18 Thread Pierrick Bouvier
On 3/18/25 18:05, Richard Henderson wrote: On 3/18/25 16:52, Pierrick Bouvier wrote: On 3/18/25 14:31, Richard Henderson wrote: These routines are buggy in multiple ways:    - Use of target-endian loads, then a bswap that depends on the host endiannness. The code is very similar to do_

Re: [PATCH v2 03/42] accel/tcg: Fix cpu_ld*_code_mmu for user mode

2025-03-18 Thread Pierrick Bouvier
On 3/18/25 14:31, Richard Henderson wrote: These routines are buggy in multiple ways: - Use of target-endian loads, then a bswap that depends on the host endiannness. The code is very similar to do_ld*_mmu functions, so it's subtle to notice. Was the endianness bug due to the fact we u

[PATCH v2 03/42] accel/tcg: Fix cpu_ld*_code_mmu for user mode

2025-03-18 Thread Richard Henderson
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