syscall.c: use shuffle_scno in syscall_name

syscall_name() is used only in printsiginfo.c:print_si_info currently,
and is supplied with raw syscall number (that's why it has this ugly
__X32_SYSCALL_BIT hack). But since it handled only __X32_SYSCALL_BIT and
not shuffle_scno(), it was broken on ARM.  Let's replace it with shuffle_scno
call, as it handles both the case of shuffled ARM syscalls and the
__X32_SYSCALL_BIT.

* syscall.c (syscall_name): Call shuffle_scno instead of custom
__X32_SYSCALL_BIT handling.
This commit is contained in:
Eugene Syromyatnikov 2018-01-31 20:12:14 +01:00 committed by Dmitry V. Levin
parent 0f60aba412
commit c3e8a9ebb4

@ -1282,9 +1282,7 @@ get_syscall_result(struct tcb *tcp)
const char *
syscall_name(kernel_ulong_t scno)
{
#if defined X32_PERSONALITY_NUMBER && defined __X32_SYSCALL_BIT
if (current_personality == X32_PERSONALITY_NUMBER)
scno &= ~__X32_SYSCALL_BIT;
#endif
scno = shuffle_scno(scno);
return scno_is_valid(scno) ? sysent[scno].sys_name : NULL;
}