From: Mark Wielaard Date: Tue, 10 Feb 2015 13:39:04 +0000 (+0000) Subject: Bug #344007 accept4 syscall unhandled on arm64 (242) and ppc64 (344) X-Git-Tag: svn/VALGRIND_3_11_0~666 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0279de2d80afb0741b50fbd0e400d262385381fd;p=thirdparty%2Fvalgrind.git Bug #344007 accept4 syscall unhandled on arm64 (242) and ppc64 (344) ppc64 might fall back to socketcall in some cases, but arm64 always uses accept4 syscall directly. Some (confusing) background on when/how glibc (wrongly) decides to use a direct accept4 or the socketcall system call: https://sourceware.org/ml/libc-alpha/2013-12/msg00014.html git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14926 --- diff --git a/NEWS b/NEWS index 6395513356..0b7bb56882 100644 --- a/NEWS +++ b/NEWS @@ -93,6 +93,7 @@ where XXXXXX is the bug number as listed below. unitialised value(s)" 343967 Don't warn about setuid/setgid/setcap executable for directories 343978 Recognize DWARF5/GCC5 DW_LANG_Fortran 2003 and 2008 constants +344007 accept4 syscall unhandled on arm64 (242) and ppc64 (344) n-i-bz Provide implementations of certain compiler builtins to support compilers who may not provide those n-i-bz Old STABS code is still being compiled, but never used. Remove it. diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index c23e6f75ca..1f9670aa09 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -1040,6 +1040,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_mbind, sys_mbind), // 235 LINXY(__NR_get_mempolicy, sys_get_mempolicy), // 236 LINX_(__NR_set_mempolicy, sys_set_mempolicy), // 237 + LINXY(__NR_accept4, sys_accept4), // 242 GENXY(__NR_wait4, sys_wait4), // 260 LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 270 @@ -1379,8 +1380,6 @@ static SyscallTableEntry syscall_main_table[] = { //ZZ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 363 //ZZ LINXY(__NR_perf_event_open, sys_perf_event_open), // 364 //ZZ -//ZZ LINXY(__NR_accept4, sys_accept4), // 366 -//ZZ //ZZ LINXY(__NR_name_to_handle_at, sys_name_to_handle_at),// 370 //ZZ LINXY(__NR_open_by_handle_at, sys_open_by_handle_at),// 371 //ZZ LINXY(__NR_clock_adjtime, sys_clock_adjtime) // 372 diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index 25e0bdecdb..8d5fa08b09 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1152,6 +1152,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_pwritev, sys_pwritev), // 321 LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 322 + LINXY(__NR_accept4, sys_accept4), // 344 + LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 347 LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351