powerpc/64s/syscall: Fix ptrace syscall info with scv syscalls
authorNicholas Piggin <npiggin@gmail.com>
Thu, 20 May 2021 11:19:31 +0000 (21:19 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 May 2021 10:06:53 +0000 (12:06 +0200)
commit343208ffe92fc662104e08e9f5760c59d11554fd
treee2d47549af3ea41c6e53bbbd1afe2e2ad9283ddc
parent105345b909d8cf1ce4a8a648bee75eef099bc0c9
powerpc/64s/syscall: Fix ptrace syscall info with scv syscalls

commit d72500f992849d31ebae8f821a023660ddd0dcc2 upstream.

The scv implementation missed updating syscall return value and error
value get/set functions to deal with the changed register ABI. This
broke ptrace PTRACE_GET_SYSCALL_INFO as well as some kernel auditing
and tracing functions.

Fix. tools/testing/selftests/ptrace/get_syscall_info now passes when
scv is used.

Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions")
Cc: stable@vger.kernel.org # v5.9+
Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210520111931.2597127-2-npiggin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/ptrace.h
arch/powerpc/include/asm/syscall.h