lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Jul 2014 02:03:23 +0000 (GMT)
From:	Eunbong Song <eunb.song@...sung.com>
To:	gregkh@...uxfoundation.org
Cc:	chanho.min@....com, linux-kernel@...r.kernel.org
Subject: [PATCH] lib : lz4 using put_unaligned_le16 instead of put_unaligned


In case of mips bigendian machine, put_unaligned writes bigendian bytes order. 
This is defined in arch/mips/include/asm/unaligned.h. So it's right use put_unaligned_le16 function instead of put_unaligned.
This patch also fixes problem fail to mount zram ext4 partition with "zram: Decompression failed! err=-1, page=0" in mips bigendian machine.

Signed-off-by: Eunbong Song <eunb.song@...sung.com>
---
 lib/lz4/lz4defs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/lz4/lz4defs.h b/lib/lz4/lz4defs.h
index abcecdc..dc7ef14 100644
--- a/lib/lz4/lz4defs.h
+++ b/lib/lz4/lz4defs.h
@@ -53,7 +53,7 @@ typedef struct _U64_S { u64 v; } U64_S;
 
 #define LZ4_WRITE_LITTLEENDIAN_16(p, v)	\
 	do {	\
-		put_unaligned(v, (u16 *)(p)); \
+		put_unaligned_le16(v, (u16 *)(p)); \
 		p += 2; \
 	} while (0)
 #endif
-- 
1.7.0.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ