Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp626099imm; Wed, 8 Aug 2018 02:58:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyaY/DR3yy2Cb/yWHLoNoMi8AwZlOjb9AVn3xXdEmd9wNFgXliho6sWmcyrR+tVXxwbPKwq X-Received: by 2002:a17:902:e18d:: with SMTP id cd13-v6mr1877006plb.305.1533722286639; Wed, 08 Aug 2018 02:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533722286; cv=none; d=google.com; s=arc-20160816; b=aBuejZL1ky7DkwUD+7vMwm0oLNA4maviWf0C+TrRosSc3sRpHBeNGE4JKK0ihbIPga EpucA+vr5UauahrXltyRimVIoZ/+y3iWVj8Xv2qBwNpU8qyj/yzMqQaTnIqtb3n79HO+ 45nFEFyPbEFPZNX4UNmUoJZWV8Jyjyy+HCon8dbgmtdfdmTfWwP3+q/oCRFEnp93S4yK fN1lza1zuj31sjcJIYa/pG6UCHuB3xAe+W2b/406j6PvzALuQVkYioLxj5r3IVEWcCU4 JafssPGL7twU0NxZm8XNWYZG5iNYmLkQjCzeKzihBvLaAXxw08a2ztC0UflVvTlPy2xB +pNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ljQs7wcIRwaC/0nnxn4Jsp+AR/fpPCpP/4GcXH6ztWs=; b=qlp0V4mPCmv2Ib5UuRAY0cX980lenMG9Cvo2j4yGmCf3W+vwQ4YV9bPXKPpPjOD7Ku TxWJVcAVwbXja0U3CeTBJCHuZiInAB93tGxwHWTtwwv+JkJ3Eecbv88DL0vUeR8G1t5X 5Gb4N8HzX0ZfN/8eX4MXzyOlm6kY0Qtapemv7hb4R/BZTSjzBi7hFT/6ktn1vfaQCxcW 5kNeM6ooEJgPkOGp8vSOXNJyavIqi3UNR8FWOSxt6xVr0uo9yPDtNmwThMRoieNO0DNm 5MWB9rd7Wv0ZSzWIhNDN+NUCPFnbXE+ooTE/rA6QegiTObRhjU8SyRZjUzpiU04XrxbY J20w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8-v6si3074120ply.139.2018.08.08.02.57.52; Wed, 08 Aug 2018 02:58:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbeHHMPZ (ORCPT + 99 others); Wed, 8 Aug 2018 08:15:25 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:43588 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726542AbeHHMPZ (ORCPT ); Wed, 8 Aug 2018 08:15:25 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1fnLCc-0001Wu-VE; Wed, 08 Aug 2018 17:56:27 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1fnLCX-0005eq-L3; Wed, 08 Aug 2018 17:56:21 +0800 Date: Wed, 8 Aug 2018 17:56:21 +0800 From: Herbert Xu To: Megha Dey Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [RFC] crypto: Remove mcryptd Message-ID: <20180808095621.h7ecacftx5ofe5ki@gondor.apana.org.au> References: <1526089453-6542-1-git-send-email-megha.dey@linux.intel.com> <20180720035325.m5tzeuqsfej3y6wd@gondor.apana.org.au> <1532651107.19157.24.camel@megha-Z97X-UD7-TH> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1532651107.19157.24.camel@megha-Z97X-UD7-TH> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 05:25:07PM -0700, Megha Dey wrote: > > 1. On the existing algorithms covered in aesni_intel-glue.c (eg: > __cbc-aes-aesni), 3 algorithms are registered in /proc/crypto: > > __cbc(aes) > cryptd(__cbc-aes-aesni)--> registered via cryptd_create_skcipher > > cbc(aes) > cbc-aes-aesni --> registered via simd_skcipher_create_compat > > __cbc(aes) > __cbc-aes-aesni --> registered as the internal algorithm > > I would want to know why do we need the cryptd(__cbc-aes-aesni) > algorithm at all. I do not see any of the associated setkey, encrypt or > decrypt functions getting called during the selftest or while running > tcrypt. I just see the simd_(setkey, encrypt, decrypt) functions > directly called the inner algorithms. However, if I remove the cryptd > algorithm, none of the algorithms are registered. The simd functions are the fast path where you are running in a context where SIMD can be used directly. cryptd is the slow path where we defer the work to a work queue. > > What you need to do is create an actual simd wrapper with cryptd > > This simd wrapper is already present for skcipher right(in simd.c)? > Assuming we only have ciphers and no hash algorithms, are any changes > required in these wrappers? For skcipher yes they already exist. But this thread was about hashes. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt