* LZO irreversible output?
@ 2010-02-03 21:38 Nigel Cunningham
2010-02-03 22:54 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Nigel Cunningham @ 2010-02-03 21:38 UTC (permalink / raw)
To: linux-crypto, TuxOnIce Devel List, LKML
[-- Attachment #1: Type: text/plain, Size: 4725 bytes --]
Hi all.
(Not sent to LKML yesterday; no reply from linux-crypto yet, so resending).
A while back now, I stopped supplying the LZF compression algorithm with
TuxOnIce and made LZO the default algorithm. Around the same time, we
started getting occasional errors when reading images; decompression
failures.
I've finally managed to find the time to properly look at this, and have
managed to find a data page that LZO compresses, but seems to be unable
to decompress back to the original contents. I'm wondering whether this
is because I'm doing something wrong, or because there really is some
data the LZO (or the kernel implementation) can't do reversible
compression on.
I've turned the test case and the way TuxOnIce invokes the compression
and decompression code into a standalone kernel module (attached). On my
64 bit machine, insmoding the module results in the error path being
triggered (skipping the dump of the original page):
[52205.333463] Output 716 bytes. Result 0.
[52205.333468] Compressed to: 06 f8 8f 09 00 00 ea ff ff 00 a1 00 40 7a
00 ff
[52205.333473] Compressed to: ff 27 3c 00 78 01 2b 0c 00 01 30 90 09 00
7c 05
[52205.333478] Compressed to: fc 00 d0 03 3f dd 00 68 dc 06 fc 00 20 07
dd 00
[52205.333483] Compressed to: a0 dc 06 fc 00 20 07 dd 00 d8 dc 06 fc 00
20 07
[52205.333488] Compressed to: de 00 10 91 bc 1b fc 00 20 07 dd 00 48 dc
06 fc
[52205.333493] Compressed to: 00 20 07 dd 00 80 dc 06 fc 00 20 07 dd 00
b8 dc
[52205.333498] Compressed to: 06 fc 00 20 07 dd 00 f0 dc 06 fc 00 20 07
de 00
[52205.333503] Compressed to: 28 92 bc 22 fc 00 20 07 dd 00 60 dc 06 fc
00 20
[52205.333508] Compressed to: 07 dd 00 98 dc 06 fc 00 20 07 dd 00 d0 dc
06 fc
[52205.333512] Compressed to: 00 20 07 de 00 08 93 bc 1b fc 00 20 07 dd
00 40
[52205.333517] Compressed to: dc 06 fc 00 20 07 dd 00 78 dc 06 fc 00 20
07 dd
[52205.333522] Compressed to: 00 b0 dc 06 fc 00 20 07 dd 00 e8 dc 06 fc
00 20
[52205.333527] Compressed to: 07 de 00 20 94 bc 22 fc 00 20 07 dd 00 58
dc 06
[52205.333532] Compressed to: fc 00 20 07 dd 00 90 dc 06 fc 00 20 07 dd
00 c8
[52205.333537] Compressed to: dc 06 fc 00 20 07 de 00 00 95 bc 1b 27 1c
00 a0
[52205.333542] Compressed to: 07 3f 3d 13 38 dc 06 fc 00 b9 06 00 3f dd
00 70
[52205.333546] Compressed to: dc 06 fc 00 20 07 dd 00 a8 dc 06 fc 00 20
07 dd
[52205.333551] Compressed to: 00 e0 dc 06 fc 00 20 07 de 00 18 96 bc 22
fc 00
[52205.333556] Compressed to: 20 07 dd 00 50 dc 06 fc 00 20 07 dd 00 88
dc 06
[52205.333561] Compressed to: fc 00 20 07 dd 00 c0 dc 06 fc 00 20 07 dd
00 f8
[52205.333566] Compressed to: dc 06 fc 00 20 07 de 00 30 97 bc 22 fc 00
20 07
[52205.333571] Compressed to: dd 00 68 dc 06 fc 00 20 07 dd 00 a0 dc 06
fc 00
[52205.333576] Compressed to: 20 07 dd 00 d8 dc 06 fc 00 20 07 de 00 10
98 bc
[52205.333581] Compressed to: 1b fc 00 20 07 dd 00 48 dc 06 fc 00 20 07
dd 00
[52205.333586] Compressed to: 80 dc 06 fc 00 20 07 dd 00 b8 dc 06 fc 00
20 07
[52205.333591] Compressed to: dd 00 f0 dc 06 fc 00 20 07 de 00 28 99 bc
22 fc
[52205.333596] Compressed to: 00 20 07 dd 00 60 dc 06 fc 00 20 07 dd 00
98 dc
[52205.333601] Compressed to: 06 fc 00 20 07 dd 00 d0 dc 06 fc 00 20 07
de 00
[52205.333606] Compressed to: 08 9a bc 1b fc 00 20 07 dd 00 40 dc 06 fc
00 20
[52205.333611] Compressed to: 07 dd 00 78 dc 06 fc 00 20 07 dd 00 b0 dc
06 fc
[52205.333616] Compressed to: 00 20 07 dd 00 e8 dc 06 fc 00 20 07 de 00
20 9b
[52205.333621] Compressed to: bc 22 fc 00 20 07 dd 00 58 dc 06 fc 00 20
07 dd
[52205.333625] Compressed to: 00 90 dc 06 fc 00 20 07 dd 00 c8 dc 06 fc
00 20
[52205.333630] Compressed to: 07 de 00 00 9c bc 1b 27 1c 00 a0 07 3f 1d
1b 38
[52205.333635] Compressed to: dc 06 fc 00 b8 06 20 02 fc 1b dd 06 70 dc
00 20
[52205.333640] Compressed to: 07 dd 00 a8 dc 05 fc 00 20 07 dd 00 e0 dc
06 fc
[52205.333645] Compressed to: 00 20 07 de 00 18 9d bc 22 fc 00 20 07 dd
00 50
[52205.333650] Compressed to: dc 06 fc 00 20 07 dd 00 88 dc 06 fc 00 20
07 dd
[52205.333655] Compressed to: 00 c0 dc 06 fc 00 20 07 dd 00 f8 dc 06 fc
00 20
[52205.333660] Compressed to: 07 de 00 30 9e bc 22 fc 00 20 07 dd 00 68
dc 06
[52205.333665] Compressed to: fc 00 20 07 dd 00 a0 dc 06 fc 00 20 07 dd
00 d8
[52205.333670] Compressed to: dc 06 fc 00 20 07 de 00 10 9f bc 1b fc 00
20 07
[52205.333675] Compressed to: dd 00 48 dc 06 fc 00 20 07 dd 00 80 dc 06
fc 00
[52205.333679] Compressed to: 20 07 dd 00 b8 dc 06 fc 00 20 07 dd 00 f0
dc 06
[52205.333684] Compressed to: 05 f0 9f 09 00 00 ea ff ff 11 00 00
[52205.333689]
[52205.333691] Restored to 0 bytes, result code -22.
Would someone be willing and able to tell me what (if anything) I'm
doing wrong, or whether there is something wrong with the algo or its
implementation?
Thanks!
Nigel
[-- Attachment #2: 940-lzo-test.patch --]
[-- Type: text/x-diff, Size: 21236 bytes --]
Kconfig | 6 +
Makefile | 2
lzo_test.c | 340 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 348 insertions(+)
diff -ruNp 940-lzo-test.patch-old/kernel/power/Kconfig 940-lzo-test.patch-new/kernel/power/Kconfig
--- 940-lzo-test.patch-old/kernel/power/Kconfig 2010-02-03 12:58:29.000000000 +1100
+++ 940-lzo-test.patch-new/kernel/power/Kconfig 2010-02-03 12:36:41.000000000 +1100
@@ -461,3 +461,9 @@ config PM_RUNTIME
and the bus type drivers of the buses the devices are on are
responsible for the actual handling of the autosuspend requests and
wake-up events.
+
+config TOI_LZO_TEST
+ tristate "Test LZO"
+ depends on CRYPTO
+ ---help---
+ Test LZO compression.
diff -ruNp 940-lzo-test.patch-old/kernel/power/lzo_test.c 940-lzo-test.patch-new/kernel/power/lzo_test.c
--- 940-lzo-test.patch-old/kernel/power/lzo_test.c 1970-01-01 10:00:00.000000000 +1000
+++ 940-lzo-test.patch-new/kernel/power/lzo_test.c 2010-02-03 12:57:23.000000000 +1100
@@ -0,0 +1,340 @@
+#include <linux/module.h>
+#include <linux/vmalloc.h>
+#include <linux/crypto.h>
+
+/*
+ * Test LZO compression.
+ */
+
+static char *original =
+ "\xf8\x8f\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x30\x90\x09\x00\x00\xea\xff\xff\x30\x90\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x68\x90\x09\x00\x00\xea\xff\xff"
+ "\x68\x90\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xa0\x90\x09\x00\x00\xea\xff\xff\xa0\x90\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x90\x09\x00\x00\xea\xff\xff"
+ "\xd8\x90\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x10\x91\x09\x00\x00\xea\xff\xff\x10\x91\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x48\x91\x09\x00\x00\xea\xff\xff"
+ "\x48\x91\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x91\x09\x00\x00\xea\xff\xff\x80\x91\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x91\x09\x00\x00\xea\xff\xff"
+ "\xb8\x91\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xf0\x91\x09\x00\x00\xea\xff\xff\xf0\x91\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x28\x92\x09\x00\x00\xea\xff\xff"
+ "\x28\x92\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x60\x92\x09\x00\x00\xea\xff\xff\x60\x92\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x98\x92\x09\x00\x00\xea\xff\xff"
+ "\x98\x92\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xd0\x92\x09\x00\x00\xea\xff\xff\xd0\x92\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x93\x09\x00\x00\xea\xff\xff"
+ "\x08\x93\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x40\x93\x09\x00\x00\xea\xff\xff\x40\x93\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x78\x93\x09\x00\x00\xea\xff\xff"
+ "\x78\x93\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xb0\x93\x09\x00\x00\xea\xff\xff\xb0\x93\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x93\x09\x00\x00\xea\xff\xff"
+ "\xe8\x93\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x20\x94\x09\x00\x00\xea\xff\xff\x20\x94\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x58\x94\x09\x00\x00\xea\xff\xff"
+ "\x58\x94\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x90\x94\x09\x00\x00\xea\xff\xff\x90\x94\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x94\x09\x00\x00\xea\xff\xff"
+ "\xc8\x94\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x95\x09\x00\x00\xea\xff\xff\x00\x95\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x38\x95\x09\x00\x00\xea\xff\xff"
+ "\x38\x95\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x70\x95\x09\x00\x00\xea\xff\xff\x70\x95\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x95\x09\x00\x00\xea\xff\xff"
+ "\xa8\x95\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xe0\x95\x09\x00\x00\xea\xff\xff\xe0\x95\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x18\x96\x09\x00\x00\xea\xff\xff"
+ "\x18\x96\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x50\x96\x09\x00\x00\xea\xff\xff\x50\x96\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x88\x96\x09\x00\x00\xea\xff\xff"
+ "\x88\x96\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xc0\x96\x09\x00\x00\xea\xff\xff\xc0\x96\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x96\x09\x00\x00\xea\xff\xff"
+ "\xf8\x96\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x30\x97\x09\x00\x00\xea\xff\xff\x30\x97\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x68\x97\x09\x00\x00\xea\xff\xff"
+ "\x68\x97\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xa0\x97\x09\x00\x00\xea\xff\xff\xa0\x97\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x97\x09\x00\x00\xea\xff\xff"
+ "\xd8\x97\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x10\x98\x09\x00\x00\xea\xff\xff\x10\x98\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x48\x98\x09\x00\x00\xea\xff\xff"
+ "\x48\x98\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x98\x09\x00\x00\xea\xff\xff\x80\x98\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x98\x09\x00\x00\xea\xff\xff"
+ "\xb8\x98\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xf0\x98\x09\x00\x00\xea\xff\xff\xf0\x98\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x28\x99\x09\x00\x00\xea\xff\xff"
+ "\x28\x99\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x60\x99\x09\x00\x00\xea\xff\xff\x60\x99\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x98\x99\x09\x00\x00\xea\xff\xff"
+ "\x98\x99\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xd0\x99\x09\x00\x00\xea\xff\xff\xd0\x99\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x9a\x09\x00\x00\xea\xff\xff"
+ "\x08\x9a\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x40\x9a\x09\x00\x00\xea\xff\xff\x40\x9a\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x78\x9a\x09\x00\x00\xea\xff\xff"
+ "\x78\x9a\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xb0\x9a\x09\x00\x00\xea\xff\xff\xb0\x9a\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x9a\x09\x00\x00\xea\xff\xff"
+ "\xe8\x9a\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x20\x9b\x09\x00\x00\xea\xff\xff\x20\x9b\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x58\x9b\x09\x00\x00\xea\xff\xff"
+ "\x58\x9b\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x90\x9b\x09\x00\x00\xea\xff\xff\x90\x9b\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x9b\x09\x00\x00\xea\xff\xff"
+ "\xc8\x9b\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x9c\x09\x00\x00\xea\xff\xff\x00\x9c\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x38\x9c\x09\x00\x00\xea\xff\xff"
+ "\x38\x9c\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x70\x9c\x09\x00\x00\xea\xff\xff\x70\x9c\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x9c\x09\x00\x00\xea\xff\xff"
+ "\xa8\x9c\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xe0\x9c\x09\x00\x00\xea\xff\xff\xe0\x9c\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x18\x9d\x09\x00\x00\xea\xff\xff"
+ "\x18\x9d\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x50\x9d\x09\x00\x00\xea\xff\xff\x50\x9d\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x88\x9d\x09\x00\x00\xea\xff\xff"
+ "\x88\x9d\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xc0\x9d\x09\x00\x00\xea\xff\xff\xc0\x9d\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x9d\x09\x00\x00\xea\xff\xff"
+ "\xf8\x9d\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x30\x9e\x09\x00\x00\xea\xff\xff\x30\x9e\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x68\x9e\x09\x00\x00\xea\xff\xff"
+ "\x68\x9e\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xa0\x9e\x09\x00\x00\xea\xff\xff\xa0\x9e\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x9e\x09\x00\x00\xea\xff\xff"
+ "\xd8\x9e\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x10\x9f\x09\x00\x00\xea\xff\xff\x10\x9f\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x48\x9f\x09\x00\x00\xea\xff\xff"
+ "\x48\x9f\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x9f\x09\x00\x00\xea\xff\xff\x80\x9f\x09\x00\x00\xea\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x9f\x09\x00\x00\xea\xff\xff"
+ "\xb8\x9f\x09\x00\x00\xea\xff\xff\x00\x00\x00\x00\x00\x00\x00\x40"
+ "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xf0\x9f\x09\x00\x00\xea\xff\xff\xf0\x9f\x09\x00\x00\xea\xff\xff";
+
+static __init int test(void)
+{
+ struct crypto_comp *tfm = crypto_alloc_comp("lzo", 0, 0);
+ char *compressed = NULL, *decompressed = NULL;
+ int comp_size, decomp_size, comp_result, decomp_result, okay;
+
+ if (IS_ERR(tfm)) {
+ printk(KERN_INFO "Failed to initialise the lzo "
+ "compression transform.\n");
+ return 1;
+ }
+
+ compressed = vmalloc_32(2 * PAGE_SIZE);
+ if (!compressed)
+ goto out;
+
+ decompressed = (char *) get_zeroed_page(GFP_KERNEL);
+ if (!decompressed)
+ goto out;
+
+ comp_result = crypto_comp_compress(tfm, original, PAGE_SIZE,
+ compressed, &comp_size);
+
+ if (comp_result) {
+ printk("Compression failed (returned %d).\n", comp_result);
+ goto out;
+ }
+
+ decomp_result = crypto_comp_decompress(tfm, compressed, comp_size,
+ decompressed, &decomp_size);
+
+ okay = (!decomp_result && decomp_size == PAGE_SIZE &&
+ !memcmp(decompressed, original, PAGE_SIZE));
+
+ if (!okay) {
+ printk("Compression test failed.\n");
+ print_hex_dump(KERN_ERR, "Original page: ", DUMP_PREFIX_NONE,
+ 16, 1, original, PAGE_SIZE, 0);
+ printk(KERN_ERR "\nOutput %d bytes. Result %d.", comp_size,
+ comp_result);
+ print_hex_dump(KERN_ERR, "Compressed to: ", DUMP_PREFIX_NONE,
+ 16, 1, compressed, comp_size, 0);
+ printk(KERN_ERR "\nRestored to %d bytes, result code %d.\n",
+ decomp_size, decomp_result);
+ print_hex_dump(KERN_ERR, "Decompressed : ", DUMP_PREFIX_NONE,
+ 16, 1, decompressed, decomp_size, 0);
+ } else
+ printk("Compression test passed.\n");
+out:
+ crypto_free_comp(tfm);
+
+ if (compressed)
+ vfree(compressed);
+
+ if (decompressed)
+ free_page((unsigned long) decompressed);
+
+ return 0;
+}
+
+#ifdef MODULE
+static __exit void unload(void)
+{
+ /* Nothing to do */
+}
+
+module_init(test);
+module_exit(unload);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Nigel Cunningham");
+MODULE_DESCRIPTION("TuxOnIce LZO test module");
+#else
+late_initcall(test);
+#endif
diff -ruNp 940-lzo-test.patch-old/kernel/power/Makefile 940-lzo-test.patch-new/kernel/power/Makefile
--- 940-lzo-test.patch-old/kernel/power/Makefile 2010-02-03 12:58:29.000000000 +1100
+++ 940-lzo-test.patch-new/kernel/power/Makefile 2010-02-03 12:35:44.000000000 +1100
@@ -41,3 +41,5 @@ obj-$(CONFIG_HIBERNATION) += swsusp.o hi
obj-$(CONFIG_HIBERNATION_NVS) += hibernate_nvs.o
obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o
+
+obj-$(CONFIG_TOI_LZO_TEST) += lzo_test.o
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: LZO irreversible output?
2010-02-03 21:38 LZO irreversible output? Nigel Cunningham
@ 2010-02-03 22:54 ` Rafael J. Wysocki
2010-02-04 4:37 ` Nigel Cunningham
0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2010-02-03 22:54 UTC (permalink / raw)
To: Nigel Cunningham; +Cc: linux-crypto, TuxOnIce Devel List, LKML
On Wednesday 03 February 2010, Nigel Cunningham wrote:
> Hi all.
>
> (Not sent to LKML yesterday; no reply from linux-crypto yet, so resending).
>
> A while back now, I stopped supplying the LZF compression algorithm with
> TuxOnIce and made LZO the default algorithm. Around the same time, we
> started getting occasional errors when reading images; decompression
> failures.
>
> I've finally managed to find the time to properly look at this, and have
> managed to find a data page that LZO compresses, but seems to be unable
> to decompress back to the original contents. I'm wondering whether this
> is because I'm doing something wrong, or because there really is some
> data the LZO (or the kernel implementation) can't do reversible
> compression on.
Well, FWIW, we have never had any problems with the userland LZO in s2disk,
so if anything is wrong with LZO here, I guess it's the kernel code.
Rafael
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: LZO irreversible output?
2010-02-03 22:54 ` Rafael J. Wysocki
@ 2010-02-04 4:37 ` Nigel Cunningham
2010-02-07 22:23 ` Bill Davidsen
0 siblings, 1 reply; 7+ messages in thread
From: Nigel Cunningham @ 2010-02-04 4:37 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-crypto, TuxOnIce Devel List, LKML
Hi Rafael.
Rafael J. Wysocki wrote:
> On Wednesday 03 February 2010, Nigel Cunningham wrote:
>> Hi all.
>>
>> (Not sent to LKML yesterday; no reply from linux-crypto yet, so resending).
>>
>> A while back now, I stopped supplying the LZF compression algorithm with
>> TuxOnIce and made LZO the default algorithm. Around the same time, we
>> started getting occasional errors when reading images; decompression
>> failures.
>>
>> I've finally managed to find the time to properly look at this, and have
>> managed to find a data page that LZO compresses, but seems to be unable
>> to decompress back to the original contents. I'm wondering whether this
>> is because I'm doing something wrong, or because there really is some
>> data the LZO (or the kernel implementation) can't do reversible
>> compression on.
>
> Well, FWIW, we have never had any problems with the userland LZO in s2disk,
> so if anything is wrong with LZO here, I guess it's the kernel code.
Okay. Guess I have to start shipping LZF again and make it the default
again then.
Regards,
Nigel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: LZO irreversible output?
2010-02-04 4:37 ` Nigel Cunningham
@ 2010-02-07 22:23 ` Bill Davidsen
2010-02-08 8:33 ` Nigel Cunningham
0 siblings, 1 reply; 7+ messages in thread
From: Bill Davidsen @ 2010-02-07 22:23 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-crypto, tuxonice-devel
Nigel Cunningham wrote:
> Hi Rafael.
>
> Rafael J. Wysocki wrote:
>> On Wednesday 03 February 2010, Nigel Cunningham wrote:
>>> Hi all.
>>>
>>> (Not sent to LKML yesterday; no reply from linux-crypto yet, so resending).
>>>
>>> A while back now, I stopped supplying the LZF compression algorithm with
>>> TuxOnIce and made LZO the default algorithm. Around the same time, we
>>> started getting occasional errors when reading images; decompression
>>> failures.
>>>
>>> I've finally managed to find the time to properly look at this, and have
>>> managed to find a data page that LZO compresses, but seems to be unable
>>> to decompress back to the original contents. I'm wondering whether this
>>> is because I'm doing something wrong, or because there really is some
>>> data the LZO (or the kernel implementation) can't do reversible
>>> compression on.
>> Well, FWIW, we have never had any problems with the userland LZO in s2disk,
>> so if anything is wrong with LZO here, I guess it's the kernel code.
>
> Okay. Guess I have to start shipping LZF again and make it the default
> again then.
>
I would hope someone will look at the real problem, though, that LZO isn't
working properly. I have to assume that either the kernel decompress is broken
or that the page you have given is invalid, and the error lies in the compression.
It doesn't look as if you are doing something wrong, it looks broken.
--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: LZO irreversible output?
2010-02-07 22:23 ` Bill Davidsen
@ 2010-02-08 8:33 ` Nigel Cunningham
2010-02-09 17:32 ` [TuxOnIce-devel] " Nix
0 siblings, 1 reply; 7+ messages in thread
From: Nigel Cunningham @ 2010-02-08 8:33 UTC (permalink / raw)
To: Bill Davidsen; +Cc: linux-kernel, linux-crypto, tuxonice-devel
Hi Bill.
Bill Davidsen wrote:
> I would hope someone will look at the real problem, though, that LZO
> isn't working properly. I have to assume that either the kernel
> decompress is broken or that the page you have given is invalid, and the
> error lies in the compression.
>
> It doesn't look as if you are doing something wrong, it looks broken.
I did get hold of Richard Purdie and Nitin Gupta, who were the guys in
the know. We discovered that LZO is expecting decomp_size to be
initialised to the amount of available space when the decompression code
is called, so there was a bug in my testing code. Nitin was talking
about sending a patch to the documentation to make this requirement clearer.
That said, the actual code that TuxOnIce uses does already initialise
the variable to PAGE_SIZE, so it seems that I might just have to run
with the checking code enabled (with this fix) for a while, until the
issue is found.
Regards,
Nigel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [TuxOnIce-devel] LZO irreversible output?
2010-02-08 8:33 ` Nigel Cunningham
@ 2010-02-09 17:32 ` Nix
2010-02-09 20:38 ` Nigel Cunningham
0 siblings, 1 reply; 7+ messages in thread
From: Nix @ 2010-02-09 17:32 UTC (permalink / raw)
To: Nigel Cunningham
Cc: Bill Davidsen, tuxonice-devel, linux-kernel, linux-crypto
On 8 Feb 2010, Nigel Cunningham verbalised:
> That said, the actual code that TuxOnIce uses does already initialise
> the variable to PAGE_SIZE, so it seems that I might just have to run
> with the checking code enabled (with this fix) for a while, until the
> issue is found.
If you push the fix somewhere I'll run with it as well and see if I can
make this problem happen again. (So far I've only seen it with both
compression and max_workers > 1, but I haven't done a systematic check
for this so it could be an illusion.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [TuxOnIce-devel] LZO irreversible output?
2010-02-09 17:32 ` [TuxOnIce-devel] " Nix
@ 2010-02-09 20:38 ` Nigel Cunningham
0 siblings, 0 replies; 7+ messages in thread
From: Nigel Cunningham @ 2010-02-09 20:38 UTC (permalink / raw)
To: Nix; +Cc: Bill Davidsen, tuxonice-devel, linux-kernel, linux-crypto
Hi.
Nix wrote:
> On 8 Feb 2010, Nigel Cunningham verbalised:
>> That said, the actual code that TuxOnIce uses does already initialise
>> the variable to PAGE_SIZE, so it seems that I might just have to run
>> with the checking code enabled (with this fix) for a while, until the
>> issue is found.
>
> If you push the fix somewhere I'll run with it as well and see if I can
> make this problem happen again. (So far I've only seen it with both
> compression and max_workers > 1, but I haven't done a systematic check
> for this so it could be an illusion.)
I will do - I've just been very slow to because I'm in the middle of
switching website hosting at the moment (as well as the week-to-week
parts of my real job!). Too much to do and not enough time :)
Nigel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-02-09 20:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 21:38 LZO irreversible output? Nigel Cunningham
2010-02-03 22:54 ` Rafael J. Wysocki
2010-02-04 4:37 ` Nigel Cunningham
2010-02-07 22:23 ` Bill Davidsen
2010-02-08 8:33 ` Nigel Cunningham
2010-02-09 17:32 ` [TuxOnIce-devel] " Nix
2010-02-09 20:38 ` Nigel Cunningham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox