Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500033

lz4 v lz4hc compression discrepancy

From Srinath Krishna Ananthakrishnan <ska@datera.io>
Newsgroups linux.kernel
Subject lz4 v lz4hc compression discrepancy
Date 2016-10-13 07:20 +0200
Message-ID <srGAW-7rq-29@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

I'm trying to use the lz4 library in the kernel for compression and I
have a case where for a candidate payload worth 16k bytes (attached),
the data that is retrieved after compression + decompression is
different from the original data when using lz4hc. On the other hand,
using the lz4 variant, the data matches perfectly. In both the cases,
I'm using the decompression routine with the known size (16k).

I'm using the kernel version 4.1.26 with just the following commit
backported in the lz4 library from the head kernel.

commit 99b7e93c95c78952724a9783de6c78def8fbfc3f
Author: Krzysztof Kolasa <kkolasa@winsoft.pl>
Date:   Sun May 3 22:58:59 2015 -0500

    lz4: fix system halt at boot kernel on x86_64

    Sometimes, on x86_64, decompression fails with the following
    error:

    Decompressing Linux...

    Decoding failed

     -- System halted

    This condition is not needed for a 64bit kernel(from commit d5e7caf):

    if( ... ||
        (op + COPYLENGTH) > oend)
        goto _output_error

    macro LZ4_SECURE_COPY() tests op and does not copy any data
    when op exceeds the value.

    added by analogy to lz4_uncompress_unknownoutputsize(...)

    Signed-off-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
    Tested-by: Alexander Kuleshov <kuleshovmail@gmail.com>
    Tested-by: Caleb Jorden <cjorden@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Thanks,
Srinath

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

lz4 v lz4hc compression discrepancy Srinath Krishna Ananthakrishnan <ska@datera.io> - 2016-10-13 07:20 +0200

csiph-web