1 --- a/sub-projects/compression/lzo-kmod/lzo1x_compress.c
2 +++ b/sub-projects/compression/lzo-kmod/lzo1x_compress.c
3 @@ -62,8 +62,12 @@ _lzo1x_1_do_compress(const unsigned char
7 +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
8 if (get_unaligned((const unsigned short *)m_pos)
9 == get_unaligned((const unsigned short *)ip)) {
11 + if (m_pos[0] == ip[0] && m_pos[1] == ip[1]) {
13 if (likely(m_pos[2] == ip[2]))
16 @@ -94,9 +98,14 @@ match:
34 @@ -208,9 +217,14 @@ int lzo1x_1_compress(const unsigned char
51 *op++ = M4_MARKER | 1;
52 @@ -224,4 +238,3 @@ EXPORT_SYMBOL_GPL(lzo1x_1_compress);
54 MODULE_LICENSE("GPL");
55 MODULE_DESCRIPTION("LZO1X-1 Compressor");
57 --- a/sub-projects/compression/lzo-kmod/lzo1x_decompress.c
58 +++ b/sub-projects/compression/lzo-kmod/lzo1x_decompress.c
59 @@ -45,10 +45,7 @@ int lzo1x_decompress_safe(const unsigned
61 if (HAVE_IP(t + 1, ip_end, ip))
66 - goto first_literal_run;
67 + goto prep_first_literal_run;
70 while ((ip < ip_end)) {
71 @@ -71,30 +68,27 @@ int lzo1x_decompress_safe(const unsigned
72 if (HAVE_IP(t + 4, ip_end, ip))
105 +prep_first_literal_run:
113 +//first_literal_run:
117 @@ -139,8 +133,7 @@ match:
121 - m_pos -= le16_to_cpu(get_unaligned(
122 - (const unsigned short *)ip)) >> 2;
123 + m_pos -= get_unaligned_le16(ip) >> 2;
125 } else if (t >= 16) {
127 @@ -158,8 +151,7 @@ match:
131 - m_pos -= le16_to_cpu(get_unaligned(
132 - (const unsigned short *)ip)) >> 2;
133 + m_pos -= get_unaligned_le16(ip) >> 2;
137 @@ -184,21 +176,33 @@ match:
138 if (HAVE_OP(t + 3 - 1, op_end, op))
141 - if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) {
147 + if (t >= 2 * 4 - (3 - 1)) {
149 + * Assume memcpy don't copy
150 + * more than 32 bytes at once
152 + if ((op - m_pos) >= 32) {
154 + memcpy(op, m_pos, t);
157 + } else if ((op - m_pos) >= 4) {