1. 06 4月, 2018 1 次提交
  2. 02 8月, 2016 1 次提交
  3. 11 9月, 2015 1 次提交
    • Y
      lib/decompressors: use real out buf size for gunzip with kernel · 2d3862d2
      Yinghai Lu 提交于
      When loading x86 64bit kernel above 4GiB with patched grub2, got kernel
      gunzip error.
      
      | early console in decompress_kernel
      | decompress_kernel:
      |       input: [0x807f2143b4-0x807ff61aee]
      |      output: [0x807cc00000-0x807f3ea29b] 0x027ea29c: output_len
      | boot via startup_64
      | KASLR using RDTSC...
      |  new output: [0x46fe000000-0x470138cfff] 0x0338d000: output_run_size
      |  decompress: [0x46fe000000-0x47007ea29b] <=== [0x807f2143b4-0x807ff61aee]
      |
      | Decompressing Linux... gz...
      |
      | uncompression error
      |
      | -- System halted
      
      the new buffer is at 0x46fe000000ULL, decompressor_gzip is using
      0xffffffb901ffffff as out_len.  gunzip in lib/zlib_inflate/inflate.c cap
      that len to 0x01ffffff and decompress fails later.
      
      We could hit this problem with crashkernel booting that uses kexec loading
      kernel above 4GiB.
      
      We have decompress_* support:
          1. inbuf[]/outbuf[] for kernel preboot.
          2. inbuf[]/flush() for initramfs
          3. fill()/flush() for initrd.
      This bug only affect kernel preboot path that use outbuf[].
      
      Add __decompress and take real out_buf_len for gunzip instead of guessing
      wrong buf size.
      
      Fixes: 1431574a (lib/decompressors: fix "no limit" output buffer length)
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Alexandre Courbot <acourbot@nvidia.com>
      Cc: Jon Medhurst <tixy@linaro.org>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2d3862d2
  4. 02 4月, 2015 1 次提交
  5. 26 8月, 2014 1 次提交
    • A
      MIPS: ZBOOT: add missing <linux/string.h> include · 29593fd5
      Aurelien Jarno 提交于
      Commit dc4d7b37 (MIPS: ZBOOT: gather string functions into string.c)
      moved the string related functions into a separate file, which might
      cause the following build error, depending on the configuration:
      
      | CC      arch/mips/boot/compressed/decompress.o
      | In file included from linux/arch/mips/boot/compressed/../../../../lib/decompress_unxz.c:234:0,
      |                  from linux/arch/mips/boot/compressed/decompress.c:67:
      | linux/arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c: In function 'fill_temp':
      | linux/arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:162:2: error: implicit declaration of function 'memcpy' [-Werror=implicit-function-declaration]
      | cc1: some warnings being treated as errors
      | linux/scripts/Makefile.build:308: recipe for target 'arch/mips/boot/compressed/decompress.o' failed
      | make[6]: *** [arch/mips/boot/compressed/decompress.o] Error 1
      | linux/arch/mips/Makefile:308: recipe for target 'vmlinuz' failed
      
      It does not fail with the standard configuration, as when
      CONFIG_DYNAMIC_DEBUG is not enabled <linux/string.h> gets included in
      include/linux/dynamic_debug.h. There might be other ways for it to
      get indirectly included.
      
      We can't add the include directly in xz_dec_stream.c as some
      architectures might want to use a different version for the boot/
      directory (see for example arch/x86/boot/string.h).
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Cc: stable@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/7420/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      29593fd5
  6. 02 8月, 2014 1 次提交
  7. 25 1月, 2014 1 次提交
  8. 30 10月, 2013 2 次提交
  9. 01 2月, 2013 1 次提交
  10. 05 8月, 2010 1 次提交
  11. 27 2月, 2010 1 次提交
  12. 28 1月, 2010 1 次提交
  13. 13 1月, 2010 1 次提交
  14. 17 12月, 2009 1 次提交
    • W
      MIPS: Add support for GZIP / BZIP2 / LZMA compressed kernel images · 1b93b3c3
      Wu Zhangjin 提交于
      This patch helps to generate smaller kernel images for linux-MIPS,
      
      Here is the effect when using lzma:
      
      $ ls -sh vmlinux
      7.1M vmlinux
      $ ls -sh vmlinuz
      1.5M vmlinuz
      
      Have tested the 32bit kernel on Qemu/Malta and 64bit kernel on FuLoong
      Mini PC. both of them work well. and also, tested by Alexander Clouter
      on an AR7 based Linksys WAG54Gv2, and by Manuel Lauss on an Alchemy
      board.
      
      This -v2 version incorporate the feedback from Ralf, and add the
      following changes:
      
      1. add .ecoff, .bin, .erec format support
      2. only enable it and the debug source code for the machines we tested
      3. a dozen of fixups and cleanups
      
      and if you want to enable it for your board, please try to select
      SYS_SUPPORTS_ZBOOT for it, and if the board have an 16550 compatible
      uart, you can select SYS_SUPPORTS_ZBOOT_UART16550 directly. and then
      sending the relative patches to Ralf.
      Tested-by: NManuel Lauss <manuel.lauss@googlemail.com>
      Tested-by: NAlexander Clouter <alex@digriz.org.uk>
      Signed-off-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1b93b3c3