From nobody Thu Oct 21 17:07:04 2021 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D29C61806ED7; Thu, 21 Oct 2021 17:07:07 +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 4HZv6L5ptSz4h4P; Thu, 21 Oct 2021 17:07:06 +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 C825E1EF2C; Thu, 21 Oct 2021 17:07:04 +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 19LH74sW080375; Thu, 21 Oct 2021 17:07:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19LH74MS080374; Thu, 21 Oct 2021 17:07:04 GMT (envelope-from git) Date: Thu, 21 Oct 2021 17:07:04 GMT Message-Id: <202110211707.19LH74MS080374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d8b6a6559070 - stable/13 - cryptocheck: Expand the set of sizes tested by -z. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d8b6a6559070a4d76f8c9e0660fff2ea5a573d65 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d8b6a6559070a4d76f8c9e0660fff2ea5a573d65 commit d8b6a6559070a4d76f8c9e0660fff2ea5a573d65 Author: John Baldwin AuthorDate: 2021-04-01 22:42:30 +0000 Commit: John Baldwin CommitDate: 2021-10-21 15:51:24 +0000 cryptocheck: Expand the set of sizes tested by -z. Test individual sizes up to the max encryption block length as well as a few sizes that include 1 full block and a partial block before doubling the size. Reviewed by: cem, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29518 (cherry picked from commit c86de1dab8e65bc9d11501ca51f2e152276cb94e) --- tools/tools/crypto/cryptocheck.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index bd075d24e0f5..502ea04cd661 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -228,7 +228,7 @@ static const struct alg { static bool verbose; static int requested_crid; -static size_t aad_sizes[48], sizes[128]; +static size_t aad_sizes[48], sizes[EALG_MAX_BLOCK_LEN * 2]; static u_int naad_sizes, nsizes; static void @@ -1729,12 +1729,18 @@ main(int ac, char **av) if (nsizes == 0) { if (testall) { - for (i = 1; i <= 32; i++) { + for (i = 1; i <= EALG_MAX_BLOCK_LEN; i++) { sizes[nsizes] = i; nsizes++; } - base_size = 32; + for (i = EALG_MAX_BLOCK_LEN + 8; + i <= EALG_MAX_BLOCK_LEN * 2; i += 8) { + sizes[nsizes] = i; + nsizes++; + } + + base_size = EALG_MAX_BLOCK_LEN * 2; while (base_size * 2 < 240 * 1024) { base_size *= 2; assert(nsizes < nitems(sizes));