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

2023-03-07 Thread Laurent Vivier
Le 24/02/2023 à 01:39, Ilya Leoshkevich a écrit : 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

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

2023-03-06 Thread Laurent Vivier
Le 24/02/2023 à 01:39, Ilya Leoshkevich a écrit : 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

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

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 01:39, 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 v3 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