aboutsummaryrefslogtreecommitdiff
path: root/linux-user/s390x
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-04-28 12:33:58 -0700
committerLaurent Vivier <laurent@vivier.eu>2021-05-15 21:44:38 +0200
commitbd45be9f5ffcaae68d2d0de2962cdc9fa20cb832 (patch)
treee6d7c2c953ba397e3ddc5de4b587203fd9b60c99 /linux-user/s390x
parente6f960fcbe0d2ecd72d7f7d10a2ed510701db35e (diff)
linux-user/s390x: Fix trace in restore_regs
Directly reading sc->regs.psw.addr misses the bswap that may be performed by __get_user. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-6-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/s390x')
-rw-r--r--linux-user/s390x/signal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
index e455a9818d..dcc6f7bc02 100644
--- a/linux-user/s390x/signal.c
+++ b/linux-user/s390x/signal.c
@@ -232,16 +232,17 @@ give_sigsegv:
static void restore_sigregs(CPUS390XState *env, target_sigregs *sc)
{
+ target_ulong prev_addr;
int i;
for (i = 0; i < 16; i++) {
__get_user(env->regs[i], &sc->regs.gprs[i]);
}
+ prev_addr = env->psw.addr;
__get_user(env->psw.mask, &sc->regs.psw.mask);
- trace_user_s390x_restore_sigregs(env, (unsigned long long)sc->regs.psw.addr,
- (unsigned long long)env->psw.addr);
__get_user(env->psw.addr, &sc->regs.psw.addr);
+ trace_user_s390x_restore_sigregs(env, env->psw.addr, prev_addr);
for (i = 0; i < 16; i++) {
__get_user(env->aregs[i], &sc->regs.acrs[i]);