On Wed, 18 Feb 2009, Herbert Xu wrote:
> On Tue, Feb 17, 2009 at 06:46:40PM +0100, Geert Uytterhoeven wrote:
> > crypto_alloc_tfm() returns an error-valued pointer in case of failure,
> > which must not be translated using __crypto_shash_cast().
> > 
> > Currently everything works fine because __crypto_shash_cast() is a no-op
> > (crypto_shash.base is at offset zero).
> > 
> > Signed-off-by: Geert Uytterhoeven <geert.uytterhoe...@sonycom.com>
> 
> Thanks for the patch.  I think it's easier to just do the casting
> in the underlying functions directly, like this:

Yep, I haven't tried it yet, but it looks OK.

The only caveat is that crypto_*.base must always be at offset zero now.

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   geert.uytterhoe...@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to