Skip to content
Snippets Groups Projects
  1. Oct 31, 2018
    • Corentin Labbe's avatar
      lib/zlib_inflate/inflate.c: remove fall through warnings · 7a20c2fa
      Corentin Labbe authored
      This patch remove all following fall through warnings by
      adding /* fall through */ markers.
      Note that we cannot add "__attribute__ ((fallthrough));" due to it is GCC7 only
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:384:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:391:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:393:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:430:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:556:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:595:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:602:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:627:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:646:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:696:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
      
      It is easy to see that thoses fall through are needed since in each case state->mode are set to the case value just below.
      
      Link: http://lkml.kernel.org/r/1536215920-19955-1-git-send-email-clabbe@baylibre.com
      
      
      Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7a20c2fa
  2. May 09, 2017
    • Guenter Roeck's avatar
      lib/zlib_inflate/inftrees.c: fix potential buffer overflow · da5e108b
      Guenter Roeck authored
      
      smatch says:
      
        WARNING: please, no spaces at the start of a line
        #30: FILE: lib/zlib_inflate/inftrees.c:112:
        +    for (min = 1; min < MAXBITS; min++)$
      
        total: 0 errors, 1 warnings, 8 lines checked
      
      NOTE: For some of the reported defects, checkpatch may be able to
            mechanically convert to the typical style using --fix or --fix-inplace.
      
      ./patches/zlib-inflate-fix-potential-buffer-overflow.patch has style problems, please review.
      
      NOTE: If any of the errors are false positives, please report
            them to the maintainer, see CHECKPATCH in MAINTAINERS.
      
      Please run checkpatch prior to sending patches
      
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      da5e108b
  3. Aug 07, 2014
  4. Mar 12, 2010
  5. Jan 14, 2010
    • Benjamin Herrenschmidt's avatar
      zlib: Fix build of powerpc boot wrapper · 6846ee5c
      Benjamin Herrenschmidt authored
      
      Commit ac4c2a3b broke the build
      of all powerpc boot wrappers.
      
      It attempts to add an include of autoconf.h but used the wrong
      path for it. It also adds -D__KERNEL__ to our boot wrapper, both
      things that we pretty much didn't do on purpose so far.
      
      We want our boot wrapper to remain independent enough of the kernel
      for various reasons, one of them being that you can "wrap" an existing
      kernel at distro install time which allows to ship one kernel image
      and a set of boot wrappers for different platforms, the wrappers
      don't have to be built out of the same kernel build tree.
      
      It's also incorrect to do what the patch does in our boot environment
      since we may not have a proper alignment exception handler which means
      we may not be able to fixup the few cases where an unaligned access will
      need SW emulation (depends on the core variant, could be when crossing
      page or segment boundaries for example).
      
      This patch fixes it by putting the old code back in and using the
      new "fancy" variant only when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
      is set, which happens not to be set on powerpc since we don't include
      autoconf.h. It also reverts the changes to our boot wrapper Makefile.
      
      This means that x86 should, afaik, keep the optimisations since its
      boot wrapper does include autoconf.h and define __KERNEL__ (though I
      doubt they make that much different outside of slow embedded processors).
      
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6846ee5c
  6. Jan 11, 2010
  7. Jan 04, 2009
    • Alain Knaff's avatar
      bzip2/lzma: library support for gzip, bzip2 and lzma decompression · bc22c17e
      Alain Knaff authored
      
      Impact: Replaces inflate.c with a wrapper around zlib_inflate; new library code
      
      This is the first part of the bzip2/lzma patch
      
      The bzip patch is based on an idea by Christian Ludwig, includes support for
      compressing the kernel with bzip2 or lzma rather than gzip. Both
      compressors give smaller sizes than gzip.  Lzma's decompresses faster
      than bzip2.
      
      It also supports ramdisks and initramfs' compressed using these two
      compressors.
      
      The functionality has been successfully used for a couple of years by
      the udpcast project
      
      This version applies to "tip" kernel 2.6.28
      
      This part contains:
      - changed inflate.c to accomodate rest of patch
      - implementation of bzip2 compression (not used at this stage yet)
      - implementation of lzma compression (not used at this stage yet)
      - Makefile routines to support bzip2 and lzma kernel compression
      
      Signed-off-by: default avatarAlain Knaff <alain@knaff.lu>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      bc22c17e
  8. Oct 12, 2007
  9. Oct 10, 2007
  10. May 07, 2007
  11. Jul 31, 2006
  12. Jun 28, 2006
  13. Jun 26, 2006
  14. Jun 22, 2006
    • Richard Purdie's avatar
      [PATCH] zlib_inflate: Upgrade library code to a recent version · 4f3865fb
      Richard Purdie authored
      Upgrade the zlib_inflate implementation in the kernel from a patched
      version 1.1.3/4 to a patched 1.2.3.
      
      The code in the kernel is about seven years old and I noticed that the
      external zlib library's inflate performance was significantly faster (~50%)
      than the code in the kernel on ARM (and faster again on x86_32).
      
      For comparison the newer deflate code is 20% slower on ARM and 50% slower
      on x86_32 but gives an approx 1% compression ratio improvement.  I don't
      consider this to be an improvement for kernel use so have no plans to
      change the zlib_deflate code.
      
      Various changes have been made to the zlib code in the kernel, the most
      significant being the extra functions/flush option used by ppp_deflate.
      This update reimplements the features PPP needs to ensure it continues to
      work.
      
      This code has been tested on ARM under both JFFS2 (with zlib compression
      enabled) and ppp_deflate and on x86_32.  JFFS2 sees an approx.  10% real
      world file read speed improvement.
      
      This patch also removes ZLIB_VERSION as it no longer has a correct value.
      We don't need version checks anyway as the kernel's module handling will
      take care of that for us.  This removal is also more in keeping with the
      zlib author's wishes (http://www.zlib.net/zlib_faq.html#faq24
      
      ) and I've
      added something to the zlib.h header to note its a modified version.
      
      Signed-off-by: default avatarRichard Purdie <rpurdie@rpsys.net>
      Acked-by: default avatarJoern Engel <joern@wh.fh-wedel.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4f3865fb
  15. Jan 10, 2006
    • Adrian Bunk's avatar
      [PATCH] lib/zlib*: cleanups · 87c2ce3b
      Adrian Bunk authored
      
      This patch contains the following possible cleanups:
      - #if 0 the following unused functions:
        - zlib_deflate/deflate.c: zlib_deflateSetDictionary
        - zlib_deflate/deflate.c: zlib_deflateParams
        - zlib_deflate/deflate.c: zlib_deflateCopy
        - zlib_inflate/infblock.c: zlib_inflate_set_dictionary
        - zlib_inflate/infblock.c: zlib_inflate_blocks_sync_point
        - zlib_inflate/inflate_sync.c: zlib_inflateSync
        - zlib_inflate/inflate_sync.c: zlib_inflateSyncPoint
      - remove the following unneeded EXPORT_SYMBOL's:
        - zlib_deflate/deflate_syms.c: zlib_deflateCopy
        - zlib_deflate/deflate_syms.c: zlib_deflateParams
        - zlib_inflate/inflate_syms.c: zlib_inflateSync
        - zlib_inflate/inflate_syms.c: zlib_inflateSyncPoint
      
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Cc: Matt Mackall <mpm@selenic.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      87c2ce3b
  16. Oct 29, 2005
  17. Aug 17, 2005
    • Linus Torvalds's avatar
      Revert unnecessary zlib_inflate/inftrees.c fix · c231c7db
      Linus Torvalds authored
      
      It turns out that empty distance code tables are not an error, and that
      a compressed block with only literals can validly have an empty table
      and should not be flagged as a data error.
      
      Some old versions of gzip had problems with this case, but it does not
      affect the zlib code in the kernel.
      
      Analysis and explanations thanks to Sergey Vlasov <vsu@altlinux.ru>
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c231c7db
  18. Aug 05, 2005
  19. Apr 16, 2005
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
Loading