Re: [PATCH 2/2] crypto: salsa20 use endian access helpers

From: Herbert Xu
Date: Wed Dec 17 2008 - 00:57:06 EST


On Mon, Dec 08, 2008 at 05:26:36PM -0800, Harvey Harrison wrote:
>
> @@ -98,40 +91,51 @@ static void salsa20_wordtobyte(u8 output[64], const u32 input[16])
> for (i = 0; i < 16; ++i)
> x[i] += input[i];
> for (i = 0; i < 16; ++i)
> - U32TO8_LITTLE(output + 4 * i,x[i]);
> + store_le32((__le32 *)(output + 4 * i), x[i]);
> }

We need to mark output (i.e., buf) as aligned in the caller.

Otherwise the patch looks good to me.

Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/