|
From: <sv...@va...> - 2017-04-29 22:35:37
|
Author: rhyskidd
Date: Sat Apr 29 23:35:30 2017
New Revision: 16319
Log:
macos: Add a no-op wrapper for a new-in-10.12 syscall: getentropy
Patch from Louis Brunner.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
trunk/coregrind/m_syswrap/syswrap-darwin.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h (original)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h Sat Apr 29 23:35:30 2017
@@ -607,7 +607,7 @@
// NYI work_interval_ctl // 499
#endif /* DARWIN_VERS >= DARWIN_10_11 */
#if DARWIN_VERS >= DARWIN_10_12
-// NYI getentropy // 500
+DECL_TEMPLATE(darwin, getentropy); // 500
// NYI necp_open // 501
// NYI necp_client_action // 502
// 503
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sat Apr 29 23:35:30 2017
@@ -9761,6 +9761,22 @@
/* ---------------------------------------------------------------------
+ Added for macOS 10.12 (Sierra)
+ ------------------------------------------------------------------ */
+
+#if DARWIN_VERS >= DARWIN_10_12
+
+PRE(getentropy)
+{
+ PRINT("getentropy(buffer:%#lx, size:%ld) FIXME", ARG1, ARG2);
+ PRE_REG_READ2(int, "getentropy",
+ void*, buffer, size_t, size);
+}
+
+#endif /* DARWIN_VERS >= DARWIN_10_12 */
+
+
+/* ---------------------------------------------------------------------
syscall tables
------------------------------------------------------------------ */
@@ -10316,7 +10332,7 @@
// _____(__NR_kdebug_typefilter), // 177
// _____(__NR_clonefileat), // 462
// _____(__NR_renameatx_np), // 488
-// _____(__NR_getentropy), // 500
+ MACX_(__NR_getentropy, getentropy), // 500
// _____(__NR_necp_open), // 501
// _____(__NR_necp_client_action), // 502
_____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(503)), // ???
|