Quantcast

Valgrind: r16319 - in /trunk/coregrind/m_syswrap: priv_syswrap-darwin.h syswrap-darwin.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Valgrind: r16319 - in /trunk/coregrind/m_syswrap: priv_syswrap-darwin.h syswrap-darwin.c

svn-2
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)),        // ???


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Loading...