Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to do a code review.
Please visit
https://gerrit.openvpn.net/c/openvpn/+/2366?usp=email
to review the following change.
Change subject: Remove the no-op VALGRIND_MAKE_READABLE() macro
......................................................................
Remove the no-op VALGRIND_MAKE_READABLE() macro
It has expanded to nothing 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 ..."). Drop it,
its callers and the memdbg.h comment describing it.
Change-Id: I6af9b27b5fd47aaf4a099823118bd4d1be9dfd12
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/memdbg.h
M src/openvpn/ssl.c
M src/openvpn/ssl_openssl.c
3 files changed, 0 insertions(+), 16 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/2366/1
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;
}
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2366?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6af9b27b5fd47aaf4a099823118bd4d1be9dfd12
Gerrit-Change-Number: 2366
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel