[Openvpn-devel,v2] Remove the no-op VALGRIND_MAKE_READABLE() macro
Commit Message
From: Razvan Cojocaru <razvanc@mailbox.org>
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 <razvanc@mailbox.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
@@ -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.
@@ -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;
}
@@ -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;
}