1. 01 Oct, 2018 1 commit
    • Joel Stanley's avatar
      lib/xz: Put CRC32_POLY_LE in xz_private.h · 242cdad8
      Joel Stanley authored
      This fixes a regression introduced by faa16bc4 ("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 <linux/crc32poly.h>
      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: faa16bc4 ("lib: Use existing define with polynomial")
      Reported-by: Meelis Roos's avatarMeelis Roos <mroos@linux.ee>
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Suggested-by: default avatarChristophe LEROY <christophe.leroy@c-s.fr>
      Signed-off-by: Joel Stanley's avatarJoel Stanley <joel@jms.id.au>
      Tested-by: Meelis Roos's avatarMeelis Roos <mroos@linux.ee>
      Signed-off-by: Michael Ellerman's avatarMichael Ellerman <mpe@ellerman.id.au>
  2. 27 Jul, 2018 1 commit
  3. 12 Oct, 2017 1 commit
  4. 04 Jun, 2014 2 commits
  5. 13 Mar, 2013 1 commit
  6. 22 Feb, 2013 3 commits
  7. 21 Sep, 2011 1 commit
    • Lasse Collin's avatar
      XZ: Fix incorrect XZ_BUF_ERROR · 9c1f8594
      Lasse Collin authored
      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 <https://bugzilla.redhat.com/show_bug.cgi?id=735408> 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
      Signed-off-by: default avatarLasse Collin <lasse.collin@tukaani.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  8. 24 Jul, 2011 1 commit
  9. 02 May, 2011 1 commit
  10. 21 Jan, 2011 1 commit
    • David Rientjes's avatar
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes authored
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      Reviewed-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  11. 13 Jan, 2011 1 commit
    • Lasse Collin's avatar
      decompressors: add XZ decompressor module · 24fa0402
      Lasse Collin authored
      In userspace, the .lzma format has become mostly a legacy file format that
      got superseded by the .xz format.  Similarly, LZMA Utils was superseded by
      XZ Utils.
      These patches add support for XZ decompression into the kernel.  Most of
      the code is as is from XZ Embedded <http://tukaani.org/xz/embedded.html>.
      It was written for the Linux kernel but is usable in other projects too.
      Advantages of XZ over the current LZMA code in the kernel:
        - Nice API that can be used by other kernel modules; it's
          not limited to kernel, initramfs, and initrd decompression.
        - Integrity check support (CRC32)
        - BCJ filters improve compression of executable code on
          certain architectures. These together with LZMA2 can
          produce a few percent smaller kernel or Squashfs images
          than plain LZMA without making the decompression slower.
      This patch: Add the main decompression code (xz_dec), testing module
      (xz_dec_test), wrapper script (xz_wrap.sh) for the xz command line tool,
      and documentation.  The xz_dec module is enough to have a usable XZ
      decompressor e.g.  for Squashfs.
      Signed-off-by: default avatarLasse Collin <lasse.collin@tukaani.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alain Knaff <alain@knaff.lu>
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>