Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2417757imm; Thu, 19 Jul 2018 20:54:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfJOcaydQdnGCdo6olqY2+mgV0R/KQHUNPI9BVSbTn9wFVHMqql8a08TEKYA4V1TE5VOy99 X-Received: by 2002:a17:902:8c88:: with SMTP id t8-v6mr433321plo.117.1532058863050; Thu, 19 Jul 2018 20:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532058863; cv=none; d=google.com; s=arc-20160816; b=xLbGCauJCJ3iFtlzQR+3uHPs6Q/bkwdf0H0MCUm72htzW7IYf2D1IWxJkDJs2U0CrL isl2wFkVKRf3uhgubKUeDaES46zTfKwywpIsFkMz8CPYAzgwGYeWzg8EGiuS2kavUeR7 lb5Rbq1MQLXrdIR3GtIY59ss+MzIMoUNf89eSy8Nejd+KaLKlSsNM5UgDcHY6+DUAl5y 7J4B3bplTipq3W4dNaM5m10msG/6NIIGHzdqEs8NOzEXmcuP9QE2oFN+SwCUzGaFqxuj XcjhLs+gvYJnyJ6Fy45GMSRHJEUxWTPYmapL8WGuwfZuyL3xSuUVdxJ1pfnhfLvAPM/K 3dIA== 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=6GGo/ZPKgjJ9HLyxJdwLtM5jY5TNfPz07MP2K2J9mJ8=; b=R7BM6aSX8MIQG4fMyd5MfUsdfz9ZqDY2UUFO/jwPnllMRo/7uX4ulDUkaY08X4dUf6 j5Ytykp1tj4zj7Pfj7g7pZiQIUjrljifuAnqYaxcn7gzc+3L69PLPAtf60dg/oGmZ5MA JE50rgHiAweUU+RZ9S2jK7VW9NHboH+HafhqU9wintk9KUO84XaJ2D11TWlL8qD5wu0c zrmWRYYAiPw+oyD1z/wVcy8cp24Yy046oCzZx5BKwMyE8yUPx5fabUqH4+wtm5nz3hxE LklZX0/BNVm106D6D+MOWH0CJWjAIp6eR3o+sCxJokfi9pKD/4+TXARk1EMZDuyYH81t l93g== 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 t16-v6si758418plo.319.2018.07.19.20.54.08; Thu, 19 Jul 2018 20:54:23 -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 S1727204AbeGTEjs (ORCPT + 99 others); Fri, 20 Jul 2018 00:39:48 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:38884 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725737AbeGTEjs (ORCPT ); Fri, 20 Jul 2018 00:39:48 -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 1fgMU1-0004uo-SV; Fri, 20 Jul 2018 11:53:33 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1fgMTt-0007Sd-7x; Fri, 20 Jul 2018 11:53:25 +0800 Date: Fri, 20 Jul 2018 11:53:25 +0800 From: Herbert Xu To: Megha Dey Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, megha.dey@intel.com Subject: Re: [RFC] crypto: Remove mcryptd Message-ID: <20180720035325.m5tzeuqsfej3y6wd@gondor.apana.org.au> References: <1526089453-6542-1-git-send-email-megha.dey@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526089453-6542-1-git-send-email-megha.dey@linux.intel.com> 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 Fri, May 11, 2018 at 06:44:13PM -0700, Megha Dey wrote: > > +static struct ahash_alg *simd_ahash_create_compat(const char *algname, > + const char *drvname, > + const char *basename) > +{ > + struct ahash_alg *alg; > + struct ahash_alg *ialg; > + int err; I think there has been a misunderstsanding. You're not actually using the simd wrapper here. All you're doing is creating a function with the word simd in its name. In all other respects this is just exposing the underlying algorithm to users directly, which cannot work because the underlying algorithm requires SIMD. What you need to do is create an actual simd wrapper with cryptd and all the functions that may do SIMD work needs to invoke cryptd if may_use_simd() (and other conditions) is false. This wrapper should live in crypto/simd.c. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt