Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751389AbdLUGgA (ORCPT ); Thu, 21 Dec 2017 01:36:00 -0500 Received: from [128.1.224.119] ([128.1.224.119]:45410 "EHLO ringil.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750768AbdLUGf6 (ORCPT ); Thu, 21 Dec 2017 01:35:58 -0500 Date: Thu, 21 Dec 2017 17:35:22 +1100 From: Herbert Xu To: Corentin Labbe Cc: davem@davemloft.net, nhorman@tuxdriver.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 1/3] crypto: Prevent to register duplicate cra_driver_name Message-ID: <20171221063522.GA18211@gondor.apana.org.au> References: <1513800567-12764-1-git-send-email-clabbe@baylibre.com> <1513800567-12764-2-git-send-email-clabbe@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513800567-12764-2-git-send-email-clabbe@baylibre.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 24 On Wed, Dec 20, 2017 at 08:09:25PM +0000, Corentin Labbe wrote: > Each crypto algorithm "cra_name" can have multiple implementation called > "cra_driver_name". > If two different implementation have the same cra_driver_name, nothing > can easily differentiate them. > Furthermore the mechanism for getting a crypto algorithm with its > implementation name (crypto_alg_match() in crypto/crypto_user.c) will > get only the first one found. > > So this patch prevent the registration of two implementation with the > same cra_driver_name. > > Signed-off-by: Corentin Labbe No this is intentional. The idea is that you can hot-replace an implementation by registering a new version of it while the old one is still in use. The new one will be used for all new allocations. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt