<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/lib/xz, branch v4.19.112</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-10-01T22:44:59+00:00</updated>
<entry>
<title>lib/xz: Put CRC32_POLY_LE in xz_private.h</title>
<updated>2018-10-01T22:44:59+00:00</updated>
<author>
<name>Joel Stanley</name>
<email>joel@jms.id.au</email>
</author>
<published>2018-09-21T02:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=242cdad873a75652f97c35aad61270581e0f3a2e'/>
<id>urn:sha1:242cdad873a75652f97c35aad61270581e0f3a2e</id>
<content type='text'>
This fixes a regression introduced by faa16bc404d72a5 ("lib: Use
existing define with polynomial").

The cleanup added a dependency on include/linux, which broke the PowerPC
boot wrapper/decompresser when KERNEL_XZ is enabled:

  BOOTCC  arch/powerpc/boot/decompress.o
 In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:233,
                 from arch/powerpc/boot/decompress.c:42:
 arch/powerpc/boot/../../../lib/xz/xz_crc32.c:18:10: fatal error:
 linux/crc32poly.h: No such file or directory
  #include &lt;linux/crc32poly.h&gt;
           ^~~~~~~~~~~~~~~~~~~

The powerpc decompresser is a hairy corner of the kernel. Even while building
a 64-bit kernel it needs to build a 32-bit binary and therefore avoid including
files from include/linux.

This allows users of the xz library to avoid including headers from
'include/linux/' while still achieving the cleanup of the magic number.

Fixes: faa16bc404d72a5 ("lib: Use existing define with polynomial")
Reported-by: Meelis Roos &lt;mroos@linux.ee&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Suggested-by: Christophe LEROY &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Tested-by: Meelis Roos &lt;mroos@linux.ee&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>lib: Use existing define with polynomial</title>
<updated>2018-07-27T11:16:38+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2018-07-17T16:05:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=faa16bc404d72a5afb857c924c83a5f691f83386'/>
<id>urn:sha1:faa16bc404d72a5afb857c924c83a5f691f83386</id>
<content type='text'>
Do not define again the polynomial but use header with existing define.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>lib/xz: Add fall-through comments to a switch statement</title>
<updated>2017-10-12T13:10:12+00:00</updated>
<author>
<name>Lasse Collin</name>
<email>lasse.collin@tukaani.org</email>
</author>
<published>2017-05-03T16:00:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a244f48ecbbd03a11eb84819c5c599db81823ee'/>
<id>urn:sha1:5a244f48ecbbd03a11eb84819c5c599db81823ee</id>
<content type='text'>
It's good style. I was also told that GCC 7 is more strict and might
give a warning when such comments are missing.

Signed-off-by: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Suggested-by: Andrei Borzenkov &lt;arvidjaar@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>lib/xz: enable all filters by default in Kconfig</title>
<updated>2014-06-04T23:54:18+00:00</updated>
<author>
<name>Lasse Collin</name>
<email>lasse.collin@tukaani.org</email>
</author>
<published>2014-06-04T23:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf4d064d89aebe3cc43d875c0803478a6a1dde12'/>
<id>urn:sha1:bf4d064d89aebe3cc43d875c0803478a6a1dde12</id>
<content type='text'>
This restores the old behavior that existed before 2013-02-22, when
changes were made by 64dbfb444c150 ("decompressors: drop dependency on
CONFIG_EXPERT") and 5dc49c75a2 ("decompressors: make the default
XZ_DEC_* config match the selected architecture").

Disabling the filters only makes sense on embedded systems.

Signed-off-by: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Acked-by: Kyle McMartin &lt;kyle@infradead.org&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: Phillip Lougher &lt;phillip@lougher.demon.co.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/xz: add comments for the intentionally missing break statements</title>
<updated>2014-06-04T23:54:18+00:00</updated>
<author>
<name>Lasse Collin</name>
<email>lasse.collin@tukaani.org</email>
</author>
<published>2014-06-04T23:11:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=84d517f3e56f7d0d305c14a701cee8f7372ebe1e'/>
<id>urn:sha1:84d517f3e56f7d0d305c14a701cee8f7372ebe1e</id>
<content type='text'>
Signed-off-by: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>decompressors: fix typo "POWERPC"</title>
<updated>2013-03-13T22:21:48+00:00</updated>
<author>
<name>Paul Bolle</name>
<email>pebolle@tiscali.nl</email>
</author>
<published>2013-03-13T21:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97da55fcec6e3898f50010a6847dfa64f7c085e6'/>
<id>urn:sha1:97da55fcec6e3898f50010a6847dfa64f7c085e6</id>
<content type='text'>
Commit 5dc49c75a26b ("decompressors: make the default XZ_DEC_* config
match the selected architecture") added

	default y if POWERPC

to lib/xz/Kconfig.  But there is no Kconfig symbol POWERPC.  The most
general Kconfig symbol for the powerpc architecture is PPC.  So let's
use that.

Signed-off-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Cc: Florian Fainelli &lt;florian@openwrt.org&gt;
Cc: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>decompressors: make the default XZ_DEC_* config match the selected architecture</title>
<updated>2013-02-22T01:22:26+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>florian@openwrt.org</email>
</author>
<published>2013-02-22T00:44:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5dc49c75a26b99e86a18441e0b64c1f7c7c6a500'/>
<id>urn:sha1:5dc49c75a26b99e86a18441e0b64c1f7c7c6a500</id>
<content type='text'>
Change the defautl XZ_DEC_* config symbol to match the configured
architecture.  It is perfectly legitimate to support multiple XZ BCJ
filters for different architectures (e.g.: to mount foreign squashfs/xz
compressed filesystems), it is however more natural not to select them all
by default, but only the one matching the configured architecture.

Signed-off-by: Florian Fainelli &lt;florian@openwrt.org&gt;
Acked-by: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>decompressors: drop dependency on CONFIG_EXPERT</title>
<updated>2013-02-22T01:22:26+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>florian@openwrt.org</email>
</author>
<published>2013-02-22T00:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=64dbfb444c150f5b64979323a197dedc2ec3e02c'/>
<id>urn:sha1:64dbfb444c150f5b64979323a197dedc2ec3e02c</id>
<content type='text'>
Remove the XZ_DEC_* depedencey on CONFIG_EXPERT as recommended by Lasse
Colin.

Signed-off-by: Florian Fainelli &lt;florian@openwrt.org&gt;
Acked-by: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>decompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endif</title>
<updated>2013-02-22T01:22:26+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>florian@openwrt.org</email>
</author>
<published>2013-02-22T00:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9d7496296590d57e0745286711aa31ed1b828917'/>
<id>urn:sha1:9d7496296590d57e0745286711aa31ed1b828917</id>
<content type='text'>
Group all architecture-specific BCJ filter configuration symbols under an
if XZ_BCJ / endif statement.

Signed-off-by: Florian Fainelli &lt;florian@openwrt.org&gt;
Acked-by: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>XZ: Fix incorrect XZ_BUF_ERROR</title>
<updated>2011-09-21T20:39:59+00:00</updated>
<author>
<name>Lasse Collin</name>
<email>lasse.collin@tukaani.org</email>
</author>
<published>2011-09-21T14:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9c1f8594df4814ebfd6822ca3c9444fb3445888d'/>
<id>urn:sha1:9c1f8594df4814ebfd6822ca3c9444fb3445888d</id>
<content type='text'>
xz_dec_run() could incorrectly return XZ_BUF_ERROR if all of the
following was true:

 - The caller knows how many bytes of output to expect and only provides
   that much output space.

 - When the last output bytes are decoded, the caller-provided input
   buffer ends right before the LZMA2 end of payload marker.  So LZMA2
   won't provide more output anymore, but it won't know it yet and thus
   won't return XZ_STREAM_END yet.

 - A BCJ filter is in use and it hasn't left any unfiltered bytes in the
   temp buffer.  This can happen with any BCJ filter, but in practice
   it's more likely with filters other than the x86 BCJ.

This fixes &lt;https://bugzilla.redhat.com/show_bug.cgi?id=735408&gt; where
Squashfs thinks that a valid file system is corrupt.

This also fixes a similar bug in single-call mode where the uncompressed
size of a block using BCJ + LZMA2 was 0 bytes and caller provided no
output space.  Many empty .xz files don't contain any blocks and thus
don't trigger this bug.

This also tweaks a closely related detail: xz_dec_bcj_run() could call
xz_dec_lzma2_run() to decode into temp buffer when it was known to be
useless.  This was harmless although it wasted a minuscule number of CPU
cycles.

Signed-off-by: Lasse Collin &lt;lasse.collin@tukaani.org&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
