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>
This commit is contained in:
parent
e6f960fcbe
commit
bd45be9f5f
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user