From patchwork Thu Dec 12 15:33:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 181495 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1042854ile; Thu, 12 Dec 2019 07:33:42 -0800 (PST) X-Google-Smtp-Source: APXvYqy8Iv21fsPvAHiVsudjVgejjmrM7GgsmtBMtBZAQQc5mNuQbHL/HeQRcYLrEhS/aN3XeksX X-Received: by 2002:a9d:6481:: with SMTP id g1mr8922917otl.180.1576164822750; Thu, 12 Dec 2019 07:33:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576164822; cv=none; d=google.com; s=arc-20160816; b=F0cDS8HpW+NeMUZcyEbAVrE1r2506TOcRW12uuUX/Dczc3TayaDCK1chbY+x76zjbh jmcOqXtmWxHJrOYuHDMkX/cg8XUBbV+bMS8Dxm7SgKu6yEdL92M4LZliIommZIpIcqyJ 4KlZl0n+Mmrj7IKc+iXKDMEwg7Ve2jMvVI+St+XiaY3DaB7nBGAH7MiKMVNdHNaNDcja u9LNrCCYqBvFuc9PqqezZCuGEGi1NTK1Tj40K42Jv52ARFVgKUtbNgj/DfPJmvHzLmY3 bacw0S7cFJhqHpCyx5br3tYwFwMZBVTNGEEttxSDZEVR8L+aKE6WLLKyNOLsRt4Ptl4M 4ReA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=7S6Y0nbEEcBYAcogGgPmLGy2HspQG4owwTgPOCn6ZMU=; b=D8MK0PmNmAjMwv4Za+wPo9EHRm9Lq0T9Vgz0SgRkDp7bLYTWVUa3Fm6ElmUyIztkmX 78k04ZNaClzyHPSh6jArwpps1zL14HlPEHIE7K912PCYpYvYUn40O7i/QAyEydqo3Mwh 2UQv8UNs1sUH14NC3yememlARaQpbaddAlsQckOtXuPf8UzMAmJg3fLMtLSMT74Iwa7M 7MlvJUws/hOWtQZp/a7Oj5AIqAn5y6IcWXr5Y4Nhhtk1+LK6MJQAIPyNy1Rzxuqy/GDk kFPT/RLxtM9pE+kq9HpbkA3jfROL/E6f+g6tP1QyYzrF+ixeKUQKN9pGw7Hvyz3m5ehI xWCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=2EFhTRsl; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e59si3310502ote.97.2019.12.12.07.33.41; Thu, 12 Dec 2019 07:33:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=2EFhTRsl; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729097AbfLLPdk (ORCPT + 3 others); Thu, 12 Dec 2019 10:33:40 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:42571 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729013AbfLLPdk (ORCPT ); Thu, 12 Dec 2019 10:33:40 -0500 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 55b4bcd0 for ; Thu, 12 Dec 2019 14:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :from:date:message-id:subject:to:cc:content-type; s=mail; bh=E2V cdkD3abkaVwURvKw+X676+JI=; b=2EFhTRslyiQBfMM5cjL8GcmCLAc06sStZMl yseH970Ara10AB3fJ9uIWSvk1kJrX0Pib6PBBLGatjGLz1+YpbD/MAgzC1IbpwPW 1WpcwGYRqPGJRfSI8ebWLwGTR9wSgxAer1Xt9t1s/ZphM60ZtrE4ExTC0yo37AJ/ u5G6QsPjPzGFkIQ0H+gZdfSlRKVooFMN3cw8ocmKpP7/SJ/cSs8qQtiKoq3gk04S jzAg6AF7qVUzRLy5JaZR74NSthLgn8xm31uiGLV/QLqmJ/Y/m6N3whbInx3nxdUq MbHdNZQ4FD8Aewu777KSCr+Ea+PVgFeK0weh6wN6xFMbi6hakIw== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id bd3b1413 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 12 Dec 2019 14:37:49 +0000 (UTC) Received: by mail-oi1-f178.google.com with SMTP id x195so722737oix.4 for ; Thu, 12 Dec 2019 07:33:37 -0800 (PST) X-Gm-Message-State: APjAAAXCXAJAz1W3TUKoCnb2WurEZnuKWGrp0nAdkmdOo8hMkmmgfaAL 6u/HLjNAX7xL4YoTBwHv5YnotRqdS7FCIFAqLJg= X-Received: by 2002:aca:5cc1:: with SMTP id q184mr4473597oib.122.1576164816891; Thu, 12 Dec 2019 07:33:36 -0800 (PST) MIME-Version: 1.0 From: "Jason A. Donenfeld" Date: Thu, 12 Dec 2019 16:33:25 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: adiantum testmgr tests not running? To: Linux Crypto Mailing List , Eric Biggers Cc: Ard Biesheuvel Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hey Eric, I had to do this ugly hack to get the adiantum testmgr tests running. Did you wind up doing the same when developing it, or was there some other mechanism that invoked this naturally? I see all the other primitives running, but not adiantum. Jason return rc; diff --git a/crypto/chacha_generic.c b/crypto/chacha_generic.c index 8beea79ab117..f446b19429e9 100644 --- a/crypto/chacha_generic.c +++ b/crypto/chacha_generic.c @@ -117,7 +117,9 @@ static struct skcipher_alg algs[] = { static int __init chacha_generic_mod_init(void) { - return crypto_register_skciphers(algs, ARRAY_SIZE(algs)); + int ret = crypto_register_skciphers(algs, ARRAY_SIZE(algs)); + BUG_ON(alg_test("adiantum(xchacha20,aes)", "adiantum", 0, 0)); + return ret; } static void __exit chacha_generic_mod_fini(void) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 82513b6b0abd..7de24e431c5e 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -5328,7 +5328,7 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask) driver, alg, fips_enabled ? "fips" : "panic_on_fail"); } - if (fips_enabled && !rc) + if (!rc) pr_info("alg: self-tests for %s (%s) passed\n", driver, alg);