Gert Doering has uploaded a new patch set (#3) to the change originally created 
by Răzvan Cojocaru. ( https://gerrit.openvpn.net/c/openvpn/+/2366?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by Gert Doering


Change subject: Remove the no-op VALGRIND_MAKE_READABLE() macro
......................................................................

Remove the no-op VALGRIND_MAKE_READABLE() macro

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
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg42152.html
Signed-off-by: Gert Doering <[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/3

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: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6af9b27b5fd47aaf4a099823118bd4d1be9dfd12
Gerrit-Change-Number: 2366
Gerrit-PatchSet: 3
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to