[PATCH FC]: BZ 210013 Unaligned access patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave,

Please apply to FC kernel.

P.
Patch to fix unaligned access during module loads.

Tested by Doug (dchapman@xxxxxxxxxx) 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@xxxxxxxxxx>
Signed-off-by: Doug Chapman <dchapman@xxxxxxxxxx>


--- 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);
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux