x86/signal: Fix restart_syscall number for x32 tasks
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 30 Nov 2015 21:54:36 +0000 (00:54 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 5 Dec 2015 17:52:14 +0000 (18:52 +0100)
commit22eab1108781eff09961ae7001704f7bd8fb1dce
tree1d3ce8386a1a7242db508f30e71b0f5fa8c71b74
parent8e8efe0379bd93e8219ca0fc6fa80b5dd85b09cb
x86/signal: Fix restart_syscall number for x32 tasks

When restarting a syscall with regs->ax == -ERESTART_RESTARTBLOCK,
regs->ax is assigned to a restart_syscall number.  For x32 tasks, this
syscall number must have __X32_SYSCALL_BIT set, otherwise it will be
an x86_64 syscall number instead of a valid x32 syscall number. This
issue has been there since the introduction of x32.

Reported-by: strace/tests/restart_syscall.test
Reported-and-tested-by: Elvira Khabirova <lineprinter0@gmail.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Cc: Elvira Khabirova <lineprinter0@gmail.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20151130215436.GA25996@altlinux.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/signal.c
This page took 0.026363 seconds and 5 git commands to generate.