summary refs log tree commit diff stats
path: root/cpu-exec-common.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-06-06 19:58:16 +0100
committerRiku Voipio <riku.voipio@linaro.org>2016-06-08 12:06:50 +0300
commit8efb2ed5ec192f7e83c5e48753e695d5cbc161b2 (patch)
tree10344bd8c60be4053aac08f7559c2b721058aa94 /cpu-exec-common.c
parent49ca6f3e24ee45de514604b8116e541332b23a84 (diff)
downloadfocaccia-qemu-8efb2ed5ec192f7e83c5e48753e695d5cbc161b2.tar.gz
focaccia-qemu-8efb2ed5ec192f7e83c5e48753e695d5cbc161b2.zip
linux-user: Correct signedness of target_flock l_start and l_len fields
The l_start and l_len fields in the various target_flock structures are
supposed to be '__kernel_off_t' or '__kernel_loff_t', which means they
should be signed, not unsigned. Correcting the structure definitions means
that __get_user() and __put_user() will correctly sign extend them if
the guest is using 32 bit offsets and the host is using 64 bit offsets.

This fixes failures in the LTP 'fcntl14' tests where it checks that
negative seek offsets work correctly.

We reindent the structures to drop hard tabs since we're touching 40%
of the fields anyway.

RV: long long -> abi_llong as suggested by Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'cpu-exec-common.c')
0 files changed, 0 insertions, 0 deletions