lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 25 Nov 2009 11:12:34 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	"Youquan,Song" <youquan.song@...ux.intel.com>
Cc:	linux-kernel@...r.kernel.org, ying.huang@...el.com,
	kent.liu@...el.com, youquan.song@...el.com
Subject: Re: [PATCH]crypto: Fix algorithm and driver duplicate registered

On Wed, Nov 25, 2009 at 05:35:16AM -0500, Youquan,Song wrote:
>
> For example:
> 
> struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32
> mask)
> 
> The parameter "name",  sometime it is "alg->cra_name" while sometime it
> become "alg->cra_driver_name". What's to lookup, algorithm or driver, depends on
> the context of parameter, So it need confirm no duplicate name exists between 
> cra_driver_name and cra_name. Therefore, there are some werid checking needed, 
> such as following:
> 
>                 if (!strcmp(q->cra_driver_name, alg->cra_name) ||
>                     !strcmp(q->cra_name, alg->cra_driver_name))
> 
> 
> I wonder, Can we define two functions: one lookup algorithm other lookup
> driver? It will be more clear. 

No that would defeat the whole point of having algorithm names
vs. driver names.  When you perform a lookup, we will look for
both algorithm matches AND driver matches.  Exactly which one
takes precedence when two matches are present is determined by
the priority.

Anyway, none of this matters to you if you're just working with
driver implementations so don't even worry about this.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ