linux-user/s390x: Fix sigframe types
commit5d79bd111ff4f9ed0b19c20f6708a770651a9048
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 28 Apr 2021 19:33:54 +0000 (28 12:33 -0700)
committerLaurent Vivier <laurent@vivier.eu>
Sat, 15 May 2021 19:44:38 +0000 (15 21:44 +0200)
tree99df12c1bdc98bcb911e8fe372f955a44a7f610e
parent4cce45df712650e494784415167a9e6a3f3d5136
linux-user/s390x: Fix sigframe types

Noticed via gitlab clang-user job:

  TEST    signals on s390x
../linux-user/s390x/signal.c:258:9: runtime error: \
  1.84467e+19 is outside the range of representable values of \
  type 'unsigned long'

Which points to the fact that we were performing a double-to-uint64_t
conversion while storing the fp registers, instead of just copying
the data across.

Turns out there are several errors:

target_ulong is the size of the target register, whereas abi_ulong
is the target 'unsigned long' type.  Not a big deal here, since we
only support 64-bit s390x, but not correct either.

In target_sigcontext and target ucontext, we used a host pointer
instead of a target pointer, aka abi_ulong.

Fixing this allows the removal of a cast to __put_user.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210428193408.233706-2-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/s390x/signal.c