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-prev] [day] [month] [year] [list]
Message-Id: <133391382535580@web11h.yandex.ru>
Date:	Wed, 23 Oct 2013 17:39:40 +0400
From:	Konstantin Tokarev <annulen@...dex.ru>
To:	Brent Taylor <motobud@...il.com>
Cc:	"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
	Artem Bityutskiy <dedekind1@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: lz4hc compression in UBIFS?



23.10.2013, 16:49, "Brent Taylor" <motobud@...il.com>:
> On Wed, Oct 23, 2013 at 2:40 AM, Konstantin Tokarev <annulen@...dex.ru> wrote:
>
>>  23.10.2013, 09:26, "Brent Taylor" <motobud@...il.com>:
>>>  Konstantin,
>>>     I did my testing with data from /dev/urandom (which I now realize
>>>  wasn't the best choice of data source), but if I use /dev/zero (which
>>>  actually causes data compression to occur), the decompressor fails.  I
>>>  don't know the internal workings of the lz4hc compressor or the lz4
>>>  decompressor.  I couldn't find any examples of any code in the kernel
>>>  actually using the compressor.  I've cc'ed the maintainers of the
>>>  lz4hc_compress.c to see if they my have some more insight to the
>>>  issue.
>>  Does decompressor fail for you with the same error messages?
>>
>>  Have you tried to copy my file to the volume? It looks like minimal test case
>>  for my board, if I remove any line decompressor works fine.
>>
>>  --
>>  Regards,
>>  Konstantin
>
> Yes, I get the same error, here's a dump from UBIFS when I cat a file
> filled with data from /dev/zero:
>
> UBIFS error (pid 4288): ubifs_decompress: cannot decompress 12 bytes,
> compressor lz4hc, error -22
> UBIFS error (pid 4288): read_block: bad data node (block 0, inode 71)
>         magic          0x6101831
>         crc            0xff61a078
>         node_type      1 (data node)
>         group_type     0 (no node group)
>         sqnum          2700
>         len            60
>         key            (71, data, 0)
>         size           512
>         compr_typ      3
>         data size      12
>         data:
>         00000000: 1f 00 01 00 ff e8 50 00 00 00 00 00
> UBIFS error (pid 4288): do_readpage: cannot read page 0 of inode 71, error -22
> cat: /opt/data/zero.bin: Input/output error
>
> Steps to reproduce are:
> 1.  Create a file with all zeros: dd if=/dev/zero bs=512 count=1
> of=/opt/data/zero.bin
> 2.  Unmount ubifs and detach ubi partition
> 3.  attach ubi partition and mount ubifs
> 4. cat /opt/data/zero.bin

Reproduced here.

-- 
Regards,
Konstantin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ