Patch "xz: cleanup CRC32 edits from 2018" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xz: cleanup CRC32 edits from 2018

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xz-cleanup-crc32-edits-from-2018.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 703815f1b4215df29dfc160f3c6e2b2d7af5e71a
Author: Lasse Collin <lasse.collin@xxxxxxxxxxx>
Date:   Sun Jul 21 16:36:24 2024 +0300

    xz: cleanup CRC32 edits from 2018
    
    [ Upstream commit 2ee96abef214550d9e92f5143ee3ac1fd1323e67 ]
    
    In 2018, a dependency on <linux/crc32poly.h> was added to avoid
    duplicating the same constant in multiple files.  Two months later it was
    found to be a bad idea and the definition of CRC32_POLY_LE macro was moved
    into xz_private.h to avoid including <linux/crc32poly.h>.
    
    xz_private.h is a wrong place for it too.  Revert back to the upstream
    version which has the poly in xz_crc32_init() in xz_crc32.c.
    
    Link: https://lkml.kernel.org/r/20240721133633.47721-10-lasse.collin@xxxxxxxxxxx
    Fixes: faa16bc404d7 ("lib: Use existing define with polynomial")
    Fixes: 242cdad873a7 ("lib/xz: Put CRC32_POLY_LE in xz_private.h")
    Signed-off-by: Lasse Collin <lasse.collin@xxxxxxxxxxx>
    Reviewed-by: Sam James <sam@xxxxxxxxxx>
    Tested-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> (powerpc)
    Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
    Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Cc: Joel Stanley <joel@xxxxxxxxx>
    Cc: Albert Ou <aou@xxxxxxxxxxxxxxxxx>
    Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
    Cc: Emil Renner Berthing <emil.renner.berthing@xxxxxxxxxxxxx>
    Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Cc: Jonathan Corbet <corbet@xxxxxxx>
    Cc: Jubin Zhong <zhongjubin@xxxxxxxxxx>
    Cc: Jules Maselbas <jmaselbas@xxxxxxxx>
    Cc: Palmer Dabbelt <palmer@xxxxxxxxxxx>
    Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
    Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Cc: Rui Li <me@xxxxxxxxx>
    Cc: Simon Glass <sjg@xxxxxxxxxxxx>
    Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Cc: Will Deacon <will@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/lib/xz/xz_crc32.c b/lib/xz/xz_crc32.c
index 912aae5fa09e1..34532d14fd4c2 100644
--- a/lib/xz/xz_crc32.c
+++ b/lib/xz/xz_crc32.c
@@ -29,7 +29,7 @@ STATIC_RW_DATA uint32_t xz_crc32_table[256];
 
 XZ_EXTERN void xz_crc32_init(void)
 {
-	const uint32_t poly = CRC32_POLY_LE;
+	const uint32_t poly = 0xEDB88320;
 
 	uint32_t i;
 	uint32_t j;
diff --git a/lib/xz/xz_private.h b/lib/xz/xz_private.h
index 09360ebb510ef..482b90f363fe3 100644
--- a/lib/xz/xz_private.h
+++ b/lib/xz/xz_private.h
@@ -102,10 +102,6 @@
 #	endif
 #endif
 
-#ifndef CRC32_POLY_LE
-#define CRC32_POLY_LE 0xedb88320
-#endif
-
 /*
  * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used
  * before calling xz_dec_lzma2_run().




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux