From patchwork Sat Jun 30 00:01:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10497763 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3D5B60327 for ; Sat, 30 Jun 2018 00:05:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1F7B295F5 for ; Sat, 30 Jun 2018 00:05:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6404296A9; Sat, 30 Jun 2018 00:05:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 983FA295F5 for ; Sat, 30 Jun 2018 00:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936918AbeF3AFH (ORCPT ); Fri, 29 Jun 2018 20:05:07 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:34460 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932449AbeF3AFG (ORCPT ); Fri, 29 Jun 2018 20:05:06 -0400 Received: by mail-pl0-f67.google.com with SMTP id z9-v6so5172328plo.1 for ; Fri, 29 Jun 2018 17:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2onN84CwMXBR4kkBOBamWPFc4EuA3j75DexGdlAMMv0=; b=PJzj11c6oTnI5G2lUnQ+YTz3Wh1L3nEgxQn58HiJtr6IOcCr0hRkflvfnZuZ7L4OPZ +C1JigU3q+/vEitY15uv9rAkFa/4E4OQNSIjzP+IoqP/7p3GWZN50JWjTzoT3vy6eJf2 ypo5OFQyZmjvSNanibX6nKeO/WwaXqTR3geDT/9Tg7952gZ/3z7CIhfXMeP9/3HoRP++ G+4dBkbKfXOAyCgE1zWSQz+OUGHGvixV5cWgEC11A2hkCSGsmeeX+1GpOUC9EkPHtTEB yCoqYKJlRb7Pv7h098fCuQRwxu9/VTewrUrZM2/f6MerE9p0tCIG7ZNOiWJIvMKOTq93 kCXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2onN84CwMXBR4kkBOBamWPFc4EuA3j75DexGdlAMMv0=; b=cMU5tkNYhT29YAZppiGGYLTMUtDkUJn7BuSqjqVBvK0GvYq2oX9r4VN7S5yCjvIh5O Il7+LM76aUPYL8D8Dto01vYJc0AZtDAyMTJqEFZemjzEPyiyXWKwo6OPW2gkVEIiQ8/e orcrZhx3qWvyP/Pv82S2Mu2f2hnC2zZHhF5/ubbmumx0V/boIflW6mrf42nK8fOBsaJe Fsihc4ty2gMUH2Va7DWYe/E2SmzxwW/1rTwsmZ4dPdqJ2pK4zmxkNM/Q1MdftcG6uXdP jyQnj2FU/5RsEHnE5WfgNVN2nYLPlydMdc7sERj1supj0Wshxjr4r53u6C4CaTJW7h2o LcwQ== X-Gm-Message-State: APt69E21EPrz3hB69v4EC8hWlCRrbeRYYt1fPtENIrICNtvuN9UJrwrX QE+aeCeFpLUvT2IdqK4bOJCCShOz X-Google-Smtp-Source: ADUXVKJVW04VeUgKQjr+a+pOvQnpZ3AnIb4CKqlOadJLX5I1Aa4Lr3srw1wUKpfa5ioKo824/YtUAg== X-Received: by 2002:a17:902:28ea:: with SMTP id f97-v6mr16382162plb.55.1530317105788; Fri, 29 Jun 2018 17:05:05 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id j13-v6sm16335788pgq.73.2018.06.29.17.05.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 17:05:05 -0700 (PDT) From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: Megha Dey , Tim Chen , Eric Biggers Subject: [PATCH 3/4] crypto: sha512_generic - add cra_priority Date: Fri, 29 Jun 2018 17:01:43 -0700 Message-Id: <20180630000144.62230-4-ebiggers3@gmail.com> X-Mailer: git-send-email 2.18.0.399.gad0ab374a1-goog In-Reply-To: <20180630000144.62230-1-ebiggers3@gmail.com> References: <20180630000144.62230-1-ebiggers3@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers sha512-generic and sha384-generic had a cra_priority of 0, so it wasn't possible to have a lower priority SHA-512 or SHA-384 implementation, as is desired for sha512_mb which is only useful under certain workloads and is otherwise extremely slow. Change them to priority 100, which is the priority used for many of the other generic algorithms. Signed-off-by: Eric Biggers --- crypto/sha512_generic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c index eba965d18bfc..c92efac0f060 100644 --- a/crypto/sha512_generic.c +++ b/crypto/sha512_generic.c @@ -171,6 +171,7 @@ static struct shash_alg sha512_algs[2] = { { .base = { .cra_name = "sha512", .cra_driver_name = "sha512-generic", + .cra_priority = 100, .cra_flags = CRYPTO_ALG_TYPE_SHASH, .cra_blocksize = SHA512_BLOCK_SIZE, .cra_module = THIS_MODULE, @@ -185,6 +186,7 @@ static struct shash_alg sha512_algs[2] = { { .base = { .cra_name = "sha384", .cra_driver_name = "sha384-generic", + .cra_priority = 100, .cra_flags = CRYPTO_ALG_TYPE_SHASH, .cra_blocksize = SHA384_BLOCK_SIZE, .cra_module = THIS_MODULE,