Re: [PATCH v2 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 00:11, Ilya Leoshkevich wrote: target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This m

Re: [PATCH v2 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Richard Henderson
On 2/23/23 13:11, Ilya Leoshkevich wrote: target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This m

[PATCH v2 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Ilya Leoshkevich
target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This makes the host alignment match that of the gu