From 0279de2d80afb0741b50fbd0e400d262385381fd Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 10 Feb 2015 13:39:04 +0000 Subject: [PATCH] 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 --- NEWS | 1 + coregrind/m_syswrap/syswrap-arm64-linux.c | 3 +-- coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 639551335..0b7bb5688 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 c23e6f75c..1f9670aa0 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 25e0bdecd..8d5fa08b0 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