mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
9c1da8b5ee
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 guest, and lets the compiler know that it should emit
code that can deal with the guest alignment.
While at it, also use __get_user() and __put_user() instead of
tswap64().
Fixes:
|
||
---|---|---|
.. | ||
fcntl.h | ||
signal.h | ||
sockbits.h | ||
target_errno_defs.h | ||
target_flat.h | ||
target_mman.h | ||
target_prctl_unalign.h | ||
target_resource.h | ||
target_structs.h | ||
termbits.h |