]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:43:10 +0000 (15:43 -0700)
commitb4237a625377c6c153ab738a652c89c4ba7579dd
treeaea0eb23762a7669a32c5559bb4f71d335c9233d
parent3ee482eb44154383fd1784456821f2145e0cf75e
x86/signal: Fix restart_syscall number for x32 tasks

Orabug: 23330484

commit 22eab1108781eff09961ae7001704f7bd8fb1dce upstream.

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>
Link: http://lkml.kernel.org/r/20151130215436.GA25996@altlinux.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3ab6a090acfb20dfa49979d21c0a110019ad381f)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
arch/x86/kernel/signal.c