From patchwork Sun Nov 29 16:43:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5812 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp11727653lad; Sun, 29 Nov 2026 08:43:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErEcfXeO2riAYYOa7meuYndTI3kAnzlJreKBW0LOpaeN+z+1nb3mMMdxzdMEyOue8zhBTeA+t9Pc7CY=@openvpn.net X-Received: by 2002:a05:7023:a41:b0:1b2:67f9:43cb with SMTP id a92af1059eb24-1b5525e786cmr30415594c88.17.1795970598000; Sun, 29 Nov 2026 08:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795970597; cv=none; d=google.com; s=arc-20260327; b=TuHV1PINfvjLNqMpUqztW8pP8YSFBCFayaohDTe9aLKwNl55bFXgd2CULdmRx8Dp9a lslReEOiqHxtm5/rF5nSyWA9E+B7kZbCVlV5TNcJdOXy6vFTs5t+tv11QC2IbRYFEg0S qqmUK70KnF0nruJ33OnIysm80MgpuMVTBRQJWGNiVKOyKnvEUnrSZFtmOUFm5DgUQByq qQBbQTj8bQjMb+kbtEhkrycPqoXACd/dCBlhePx3T2ifhv4cJjpM+iuTyPsdPhZG/UwW 4PMtJ8pDh4IbTesTRTO0imHz3m5M2oLhtAoydMe5ZaBqCkbdrcjDbphNbUg9usw/w/Gn q66w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=z2lDojyvjJW7JxeLymEBCSUj6QciXSsrUAALlqNgDRo=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=kFWID/DxkX2kVBlmndw5OShVypKdB86VLcIaoY067xL+TIrFntjEPN5T1t4lqUslnG LwvZ6iWg2PcpV+k579Vod/y3UFuINO7gPg/rC+LfTFHsAV8PMW8jcoNW+FVtHrgwm9wt QQWGd7mieuGbokLIK4cJC0gKyP8exHocIJoHFRYOpyeSTL+kzLEd3deDfr6QytlvHPHD mz0vkWiIsrgUE5UH+0NEehEt43wmXl3lP7qDu1KUD6EUWyYtNlKIn3IbQ7y3eR5+bo10 V4MZkWUCZO/9CxiJpMBjliwTemXXnYsylu/mBZZzjZK34elXDqP+T7uNh9HAv/ipwtP4 ajLA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=e0YTAVZ+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Vn+TmDWc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=SVO9Ptz3; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id a92af1059eb24-1b59ecd055bsi21348248c88.45.2026.11.29.08.43.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Nov 2026 08:43:17 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=e0YTAVZ+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Vn+TmDWc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=SVO9Ptz3; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=z2lDojyvjJW7JxeLymEBCSUj6QciXSsrUAALlqNgDRo=; b=e0YTAVZ+Uf8zCS 0jG1vb6lXWY/mKoCnv0ZQ4N142Uzw/yrqkqcOCi1qj2hfLj4fQKjHw7CdKtDUzp424Tx4zEThU2hN vQdvDpMaijth+73w/327qyFTuk6vtYj2w0hWcN4sjVl6JoYobCss5NXJ/gKey/J8wsKMkCFCkkG8i KS0=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xXhzg-000000002Me-3Hxq; Sun, 29 Nov 2026 16:43:16 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xXhzf-000000002MY-1AOc for openvpn-devel@lists.sourceforge.net; Sun, 29 Nov 2026 16:43:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FWb8/mrYJXv/R6D0lAXIbPI3N9eRQEPxvJl5Ljkci9Q=; b=Vn+TmDWcFAw4yQatRqvABB6w9q 3ICMpPLXC4zjAd8UDg/tJx4ZK1jzI4SAfPEVW91ekYwVkvCqZn6tjVyF8svz1oPex/3GzDRkOrKbi Y0jqvh6k6zIiQQRH5jiRSINaM683vY8cSZ7KxmlaP1uEe9WEgt1b8IEOEoXPw100km6Q=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FWb8/mrYJXv/R6D0lAXIbPI3N9eRQEPxvJl5Ljkci9Q=; b=SVO9Ptz3LxFkB2IOcZIJbXsjPx 6hePNRpIMoclkthBgu7pQ7F5bgGcPTaeVWwPIZXBsBCCQ9i6f97Y/ru8OsNz+nKOltTT+IIfM+T/0 cvtztyAL1xkktfQe7U9eQYBA7taeaTDiDz4Celd/rSa7j/WE105e48eq45wmHkcjsaa4=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xXhzd-000000003RD-2XqI for openvpn-devel@lists.sourceforge.net; Sun, 29 Nov 2026 16:43:15 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6ATGh6gZ012353 for ; Sun, 29 Nov 2026 17:43:06 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6ATGh6YZ012352 for openvpn-devel@lists.sourceforge.net; Sun, 29 Nov 2026 17:43:06 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sun, 29 Nov 2026 17:43:00 +0100 Message-ID: <20261129164306.12327-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Razvan Cojocaru 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 [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xXhzd-000000003RD-2XqI Subject: [Openvpn-devel] [PATCH v2] Remove the no-op VALGRIND_MAKE_READABLE() macro X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1883211666041973725 X-GMAIL-MSGID: 1883211666041973725 From: Razvan Cojocaru 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 Acked-by: Gert Doering 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 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 #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; }