From owner-dev-commits-src-all@freebsd.org Mon Mar 15 12:36:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 090DD57AD4E; Mon, 15 Mar 2021 12:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DzbWL6nzpz4mCC; Mon, 15 Mar 2021 12:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D77A110B23; Mon, 15 Mar 2021 12:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12FCaENg057612; Mon, 15 Mar 2021 12:36:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12FCaE8X057611; Mon, 15 Mar 2021 12:36:14 GMT (envelope-from git) Date: Mon, 15 Mar 2021 12:36:14 GMT Message-Id: <202103151236.12FCaE8X057611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: ff92a03616c5 - main - if_wg: fix build with DIAGNOSTICS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff92a03616c5caec5ce0c42dd76722e1b6dc9e51 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2021 12:36:15 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ff92a03616c5caec5ce0c42dd76722e1b6dc9e51 commit ff92a03616c5caec5ce0c42dd76722e1b6dc9e51 Author: Kyle Evans AuthorDate: 2021-03-15 12:31:09 +0000 Commit: Kyle Evans CommitDate: 2021-03-15 12:36:02 +0000 if_wg: fix build with DIAGNOSTICS This file got resynced with OpenBSD to pick up fixes that had taken place after the version initially ported to FreeBSD. KASSERT there is more like MPASS here. Reported by: David Wolfskill --- sys/dev/if_wg/wg_noise.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/if_wg/wg_noise.c b/sys/dev/if_wg/wg_noise.c index 373a8578a9f3..ae527eb99bde 100644 --- a/sys/dev/if_wg/wg_noise.c +++ b/sys/dev/if_wg/wg_noise.c @@ -784,10 +784,10 @@ noise_kdf(uint8_t *a, uint8_t *b, uint8_t *c, const uint8_t *x, uint8_t sec[BLAKE2S_HASH_SIZE]; #ifdef DIAGNOSTIC - KASSERT(a_len <= BLAKE2S_HASH_SIZE && b_len <= BLAKE2S_HASH_SIZE && + MPASS(a_len <= BLAKE2S_HASH_SIZE && b_len <= BLAKE2S_HASH_SIZE && c_len <= BLAKE2S_HASH_SIZE); - KASSERT(!(b || b_len || c || c_len) || (a && a_len)); - KASSERT(!(c || c_len) || (b && b_len)); + MPASS(!(b || b_len || c || c_len) || (a && a_len)); + MPASS(!(c || c_len) || (b && b_len)); #endif /* Extract entropy from "x" into sec */