From: Razvan Cojocaru <[email protected]> Valgrind 3.3.0 removed the VALGRIND_MAKE_READABLE() client request [1]. memdbg.h has defined it as an empty macro in both the USE_VALGRIND and the default branch since commit 7c51fe16 ("Fixed a bug in plugin.c that caused openvpn_plugin_client_destructor_v1 to not be called ..."), so the calls emit no code. Drop it, its callers and the memdbg.h comment describing it.
[1] https://valgrind.org/docs/manual/dist.news.older.html Change-Id: I6af9b27b5fd47aaf4a099823118bd4d1be9dfd12 Signed-off-by: Razvan Cojocaru <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2366 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2366 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <[email protected]> diff --git a/src/openvpn/memdbg.h b/src/openvpn/memdbg.h index 62c75ec..0f2c5ec 100644 --- a/src/openvpn/memdbg.h +++ b/src/openvpn/memdbg.h @@ -28,12 +28,6 @@ * * Valgrind is a great tool for debugging memory issues. * - * Grep for VALGRIND_MAKE_READABLE in the OpenVPN source. - * Because valgrind thinks that some of the data passed from - * OpenSSL back to OpenVPN is tainted due to being sourced - * from uninitialized data, we need to untaint it before use -- - * otherwise we will get a lot of useless warnings. - * * valgrind --tool=memcheck --error-limit=no --gen-suppressions=yes ./openvpn ... */ @@ -41,8 +35,6 @@ #include <valgrind/memcheck.h> #endif -#define VALGRIND_MAKE_READABLE(addr, len) - /* * Force buffers to be zeroed after allocation. * For debugging only. diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 7793c0a..acdc7e5 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -1323,10 +1323,6 @@ { struct gc_arena gc = gc_new(); - VALGRIND_MAKE_READABLE((void *)k->pre_master, sizeof(k->pre_master)); - VALGRIND_MAKE_READABLE((void *)k->random1, sizeof(k->random1)); - VALGRIND_MAKE_READABLE((void *)k->random2, sizeof(k->random2)); - dmsg(D_SHOW_KEY_SOURCE, "%s pre_master: %s", prefix, format_hex(k->pre_master, sizeof(k->pre_master), 0, &gc)); dmsg(D_SHOW_KEY_SOURCE, "%s random1: %s", prefix, @@ -1379,7 +1375,6 @@ buf_clear(&seed); free_buf(&seed); - VALGRIND_MAKE_READABLE((void *)output, output_len); return ret; } diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 03e0279..88644c4 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -2158,8 +2158,6 @@ */ int i = BIO_read(bio, BPTR(buf), (int)BCAP(buf)); - VALGRIND_MAKE_READABLE((void *)&i, sizeof(i)); - #ifdef BIO_DEBUG bio_debug_data("read", bio, BPTR(buf), i, desc); #endif @@ -2184,7 +2182,6 @@ dmsg(D_HANDSHAKE_VERBOSE, "BIO read %s %d bytes", desc, i); buf->len = i; ret = 1; - VALGRIND_MAKE_READABLE((void *)BPTR(buf), BLEN(buf)); } return ret; } _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
