Dave,
Please apply to FC kernel.
P.
Patch to fix unaligned access during module loads.
Tested by Doug (dchapman(a)redhat.com) on HP ia64 boxes, and by me on SGI ia64
box. Additionally tested by me on x86_64.
Addresses and resolves BZ 210013.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
Signed-off-by: Doug Chapman <dchapman(a)redhat.com>
--- linux-2.6.17.ia64/lib/sha1.c.orig 2006-09-19 17:07:59.000000000 -0400
+++ linux-2.6.17.ia64/lib/sha1.c 2006-09-19 17:07:48.000000000 -0400
@@ -3,6 +3,7 @@
* Peter Gutmann, and placed in the public domain.
*/
+#include <asm/unaligned.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/cryptohash.h>
@@ -41,7 +42,7 @@
__u32 a, b, c, d, e, t, i;
for (i = 0; i < 16; i++)
- W[i] = be32_to_cpu(((const __be32 *)in)[i]);
+ W[i] = be32_to_cpu(get_unaligned((const __be32 *)in+i));
for (i = 0; i < 64; i++)
W[i+16] = rol32(W[i+13] ^ W[i+8] ^ W[i+2] ^ W[i], 1);
Show replies by date