[S390] addressing mode limits and psw address wrapping

An instruction with an address right below the adress limit for the
current addressing mode will wrap. The instruction restart logic in
the protection fault handler and the signal code need to follow the
wrapping rules to find the correct instruction address.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Martin Schwidefsky 2011-10-30 15:16:48 +01:00
parent 20b40a794b
commit ccf45cafb0
4 changed files with 29 additions and 4 deletions

View file

@ -447,8 +447,9 @@ void do_signal(struct pt_regs *regs)
/* fallthrough */
case -ERESTARTNOINTR:
regs->gprs[2] = regs->orig_gpr2;
regs->psw.addr = regs->psw.addr -
(regs->svc_code >> 16);
regs->psw.addr =
__rewind_psw(regs->psw,
regs->svc_code >> 16);
break;
}
/* No longer in a system call */