arm64: compat: Don't pull syscall number from regs in arm_compat_syscall
authorWill Deacon <will.deacon@arm.com>
Thu, 3 Jan 2019 18:00:39 +0000 (18:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:04:37 +0000 (22:04 +0100)
commit6c9a2046297f7210498d47de9e348fe93270b099
tree0b0b752c140b9e109f2dd407f7b885332836f7ba
parent4f14f446d115f022492f574bb02cff287b91915d
arm64: compat: Don't pull syscall number from regs in arm_compat_syscall

commit 53290432145a8eb143fe29e06e9c1465d43dc723 upstream.

The syscall number may have been changed by a tracer, so we should pass
the actual number in from the caller instead of pulling it from the
saved r7 value directly.

Cc: <stable@vger.kernel.org>
Cc: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/sys_compat.c
arch/arm64/kernel/syscall.c