summaryrefslogtreecommitdiff
path: root/qemu-seccomp.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-03-27 18:59:04 +0100
committerGreg Kurz <groug@kaod.org>2017-03-27 21:15:31 +0200
commit34ef723ce34aaa14f94530c06a0ab3170a19bb59 (patch)
tree85a23ddd9e52365fb6978f0548f0b72396ecfad0 /qemu-seccomp.c
parentd63fb193e71644a073b77ff5ac6f1216f2f6cf6e (diff)
downloadqemu-34ef723ce34aaa14f94530c06a0ab3170a19bb59.tar.gz
tests/virtio-9p-test: Don't call le*_to_cpus on fields of packed struct
For a packed struct like 'P9Hdr' the fields within it may not be aligned as much as the natural alignment for their types. This means it is not valid to pass the address of such a field to a function like le32_to_cpus() which operate on uint32_t* and assume alignment. Doing this results in a SIGBUS on hosts like SPARC which have strict alignment requirements. Use ldl_le_p() instead, which is specified to correctly handle unaligned pointers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'qemu-seccomp.c')
0 files changed, 0 insertions, 0 deletions