Re: [PATCH] lib/sha1: remove memsets and allocate workspace on the stack

From: Geert Uytterhoeven
Date: Tue Aug 09 2011 - 03:01:38 EST

On Tue, Aug 9, 2011 at 01:45, Joe Perches <joe@xxxxxxxxxxx> wrote:
> You should add #include <linux/crypthash.h> to
> lib/sha1.c and perhaps rationalize the use of __u8
> and char for the second argument to sha_transform in
> the definition and uses.
> For defense in depth, a bool could be added to sha_transform
> like:
> void sha_transform(__u32 *digest, const char *data, bool wipe);

Yeah, why is the second parameter not "const void *data"? That
would save some casts in the callers.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at