1. 03 Feb, 2011 8 commits
  2. 20 Jan, 2011 2 commits
  3. 17 Jan, 2011 1 commit
  4. 13 Jan, 2011 29 commits
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 · 581548db
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
        [IA64] Fix format warning in arch/ia64/kernel/acpi.c
      581548db
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 · 03a4491f
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
        firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO
      03a4491f
    • Linus Torvalds's avatar
      Merge branch 'for-2.6.38/drivers' of git://git.kernel.dk/linux-2.6-block · 7b0cb1bd
      Linus Torvalds authored
      * 'for-2.6.38/drivers' of git://git.kernel.dk/linux-2.6-block:
        cciss: reinstate proper FIFO order of command queue list
        floppy: replace NO_GEOM macro with a function
      7b0cb1bd
    • Linus Torvalds's avatar
      Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block · 275220f0
      Linus Torvalds authored
      * 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits)
        block: ensure that completion error gets properly traced
        blktrace: add missing probe argument to block_bio_complete
        block cfq: don't use atomic_t for cfq_group
        block cfq: don't use atomic_t for cfq_queue
        block: trace event block fix unassigned field
        block: add internal hd part table references
        block: fix accounting bug on cross partition merges
        kref: add kref_test_and_get
        bio-integrity: mark kintegrityd_wq highpri and CPU intensive
        block: make kblockd_workqueue smarter
        Revert "sd: implement sd_check_events()"
        block: Clean up exit_io_context() source code.
        Fix compile warnings due to missing removal of a 'ret' variable
        fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
        block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p)
        cfq-iosched: don't check cfqg in choose_service_tree()
        fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors
        cdrom: export cdrom_check_events()
        sd: implement sd_check_events()
        sr: implement sr_check_events()
        ...
      275220f0
    • Linus Torvalds's avatar
      Merge branch 'for-linus/i2c-2638' of git://git.fluff.org/bjdooks/linux · fe3c560b
      Linus Torvalds authored
      * 'for-linus/i2c-2638' of git://git.fluff.org/bjdooks/linux:
        i2c-bfin-twi: move setup to the earlier subsys initcall
        i2c-bfin-twi: handle faulty slave devices better
        i2c-mv64xxx: send repeated START between messages in xfer
        i2c-nomadik: fix regression on adapter name
        i2c-omap: Set latency requirements only once for several messages
        i2c-eg20t: add driver for Intel EG20T
        i2c-ocores: add some device tree documentation
        i2c-ocores: Use devres for resource allocation
        i2c-ocores: Adapt for device tree
        i2c-iop3xx: add iomem annotation
      fe3c560b
    • Linus Torvalds's avatar
      Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · d2005603
      Linus Torvalds authored
      * 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
        ARM: mach-shmobile: Kill off unused !gpio_is_valid() case
        ARM: mach-shmobile: sh7372 Enable SDIO IRQs for Mackerel
        ARM: mach-shmobile: sh7377 Enable SDIO IRQs
        ARM: mach-shmobile: sh7367 Enable SDIO IRQs
        ARM: mach-shmobile: sh7372 Enable SDIO IRQs
        ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support
        ARM: mach-shmobile: ap4eb: SCIF port for earlyprintk when using zboot
        ARM: mach-shmobile: mackerel: SCIF port for earlyprintk when using zboot
        ARM: mach-shmobile: mackerel: Add support get_cd in CN23
      d2005603
    • Linus Torvalds's avatar
      Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · 86f6f9b6
      Linus Torvalds authored
      * 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (31 commits)
        sh: Add support for AP-SH4AD-0A board.
        sh: Add support for AP-SH4A-3A board.
        sh: Add a new mach type for alpha project boards.
        serial: sh-sci: build fixes.
        sh: sh7372 SH4AL-DSP probe support
        sh: sh7366 Enable SDIO IRQs
        sh: sh7343 Enable SDIO IRQs
        sh: mach-ecovec24: enable runtime PM for SDHI
        sh: sh7723 / ap325rxa enable SDIO IRQs
        sh: sh7722 Enable SDIO IRQs
        sh: sh7724 Enable SDIO IRQs
        sh: Fix up legacy PTEA space attribute mapping.
        sh: Stub out legacy PCC pgprot encoding for X2 TLBs.
        sh: constify prefetch pointers.
        sh: Add a machvec callback for early memblock reservations.
        sh: update sh7757lcr_defconfig
        sh: add PVR probing for SH7757 3rd cut
        sh: Use device_initcall() instead of __initcall()
        sh: intc - convert board specific landisk code
        sh: Move init_landisk_IRQ to header file
        ...
      86f6f9b6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6 · d33a6291
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (29 commits)
        video: move SH_MIPI_DSI/SH_LCD_MIPI_DSI to the top of menu
        fbdev: Implement simple blanking in pseudocolor modes for vt8500lcdfb
        video: imx: Update the manufacturer's name
        nuc900fb: don't treat NULL clk as an error
        s3c2410fb: don't treat NULL clk as an error
        video: tidy up modedb formatting.
        video: matroxfb: Correct video option in comments and kernel config help.
        fbdev: sh_mobile_hdmi: simplify pointer handling
        fbdev: sh_mobile_hdmi: framebuffer notifiers have to be registered
        fbdev: sh_mobile_hdmi: add command line option to use the preferred EDID mode
        OMAP: DSS2: Introduce omap_channel as an omap_dss_device parameter, add new overlay manager.
        OMAP: DSS2: Use dss_features to handle DISPC bits removed on OMAP4
        OMAP: DSS2: LCD2 Channel Changes for DISPC
        OMAP: DSS2: Change remaining DISPC functions for new omap_channel argument
        OMAP: DSS2: Introduce omap_channel argument to DISPC functions used by interface drivers
        OMAP: DSS2: Represent DISPC register defines with channel as parameter
        OMAP: DSS2: Add dss_features for omap4 and overlay manager related features
        OMAP: DSS2: Clean up DISPC color mode validation checks
        OMAP: DSS2: Add back authors of panel-generic.c based drivers
        OMAP: DSS2: remove generic DPI panel driver duplicated panel drivers
        ...
      d33a6291
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 66dc918d
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits)
        ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
        ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO
        ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO
        ALSA: oxygen: fix Xonar DG input
        ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low
        ALSA: hda - Fix missing EAPD for Acer 4930G
        ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs.
        ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
        ALSA: hda - Don't refer ELD when unplugged
        ASoC: tpa6130a2: Fix compiler warning
        ASoC: tlv320dac33: Add DAPM selection for LOM invert
        ASoC: DMIC codec: Adding a generic DMIC codec
        ALSA: snd-usb-us122l: Fix missing NULL checks
        ALSA: snd-usb-us122l: Fix MIDI output
        ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
        ASoC: Fix section mismatch in wm8995.c
        ALSA: oxygen: add S/PDIF source selection for Claro cards
        ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
        ASoC: fix migor audio build
        ALSA: include delay.h for msleep in Xonar DG support
        ...
      66dc918d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · b2034d47
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (41 commits)
        fs: add documentation on fallocate hole punching
        Gfs2: fail if we try to use hole punch
        Btrfs: fail if we try to use hole punch
        Ext4: fail if we try to use hole punch
        Ocfs2: handle hole punching via fallocate properly
        XFS: handle hole punching via fallocate properly
        fs: add hole punching to fallocate
        vfs: pass struct file to do_truncate on O_TRUNC opens (try #2)
        fix signedness mess in rw_verify_area() on 64bit architectures
        fs: fix kernel-doc for dcache::prepend_path
        fs: fix kernel-doc for dcache::d_validate
        sanitize ecryptfs ->mount()
        switch afs
        move internal-only parts of ncpfs headers to fs/ncpfs
        switch ncpfs
        switch 9p
        pass default dentry_operations to mount_pseudo()
        switch hostfs
        switch affs
        switch configfs
        ...
      b2034d47
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 27d189c0
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (46 commits)
        hwrng: via_rng - Fix memory scribbling on some CPUs
        crypto: padlock - Move padlock.h into include/crypto
        hwrng: via_rng - Fix asm constraints
        crypto: n2 - use __devexit not __exit in n2_unregister_algs
        crypto: mark crypto workqueues CPU_INTENSIVE
        crypto: mv_cesa - dont return PTR_ERR() of wrong pointer
        crypto: ripemd - Set module author and update email address
        crypto: omap-sham - backlog handling fix
        crypto: gf128mul - Remove experimental tag
        crypto: af_alg - fix af_alg memory_allocated data type
        crypto: aesni-intel - Fixed build with binutils 2.16
        crypto: af_alg - Make sure sk_security is initialized on accept()ed sockets
        net: Add missing lockdep class names for af_alg
        include: Install linux/if_alg.h for user-space crypto API
        crypto: omap-aes - checkpatch --file warning fixes
        crypto: omap-aes - initialize aes module once per request
        crypto: omap-aes - unnecessary code removed
        crypto: omap-aes - error handling implementation improved
        crypto: omap-aes - redundant locking is removed
        crypto: omap-aes - DMA initialization fixes for OMAP off mode
        ...
      27d189c0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · a1703154
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        rbd: fix cleanup when trying to mount inexistent image
        net/ceph: make ceph_msgr_wq non-reentrant
        ceph: fsc->*_wq's aren't used in memory reclaim path
        ceph: Always free allocated memory in osdmap_decode()
        ceph: Makefile: Remove unnessary code
        ceph: associate requests with opening sessions
        ceph: drop redundant r_mds field
        ceph: implement DIRLAYOUTHASH feature to get dir layout from MDS
        ceph: add dir_layout to inode
      a1703154
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog · 67b5ad9a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
        watchdog: Add MCF548x watchdog driver.
        watchdog: add driver for the Atheros AR71XX/AR724X/AR913X SoCs
        watchdog: Add TCO support for nVidia chipsets
        watchdog: Add support for sp5100 chipset TCO
        watchdog: f71808e_wdt: add F71862FG, F71869 to Kconfig
        watchdog: iTCO_wdt: TCO Watchdog patch for Intel DH89xxCC PCH
        watchdog: iTCO_wdt: TCO Watchdog patch for Intel NM10 DeviceIDs
        watchdog: ks8695_wdt: include mach/hardware.h instead of mach/timex.h.
        watchdog: Propagate Book E WDT period changes to all cores
        watchdog: add CONFIG_WATCHDOG_NOWAYOUT support to PowerPC Book-E watchdog driver
        watchdog: alim7101_wdt: fix compiler warning on alim7101_pci_tbl
        watchdog: alim1535_wdt: fix compiler warning on ali_pci_tbl
        watchdog: Fix reboot on W83627ehf chipset.
        watchdog: Add watchdog support for W83627DHG chip
        watchdog: f71808e_wdt: Add Fintek F71869 watchdog
        watchdog: add f71862fg support
        watchdog: clean-up f71808e_wdt.c
      67b5ad9a
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 174a86df
      Linus Torvalds authored
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        hwmon: (dme1737) Minor cleanups
        hwmon: (dme1737) Add support for in7 for SCH5127
        hwmon: (emc1403) Add EMC1423 support
        hwmon: (w83627hf) Document W83627THF voltage pin mapping
        hwmon: (w83793) Drop useless mutex
        hwmon: (fschmd) Drop useless mutex
        hwmon: (w83781d) Use pr_fmt and pr_<level>
        hwmon: (pc87427) Use pr_fmt and pr_<level>
        hwmon: (pc87360) Use pr_fmt and pr_<level>
        hwmon: (lm78) Use pr_fmt and pr_<level>
        hwmon: (it87) Use pr_fmt and pr_<level>
        hwmon: Schedule the removal of the old intrusion detection interfaces
        hwmon: (w83793) Implement the standard intrusion detection interface
        hwmon: (w83792d) Implement the standard intrusion detection interface
        hwmon: (adm9240) Implement the standard intrusion detection interface
        hwmon: (via686a) Initialize fan_div values
        hwmon: (w83795) Silent false warning from gcc
        hwmon: (ads7828) Update email contact details
      174a86df
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6 · 1896a134
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (45 commits)
        regulator: missing index in PTR_ERR() in isl6271a_probe()
        regulator: Assign return value of mc13xxx_reg_rmw to ret
        regulator: Add initial per-regulator debugfs support
        regulator: Make regulator_has_full_constraints a bool
        regulator: Clean up logging a bit
        regulator: Optimise out noop voltage changes
        regulator: Add API to re-apply voltage to hardware
        regulator: Staticise non-exported functions in mc13892
        regulator: Only notify voltage changes when they succeed
        regulator: Provide a selector based set_voltage_sel() operation
        regulator: Factor out voltage set operation into a separate function
        regulator: Convert WM8994 to use get_voltage_sel()
        regulator: Convert WM835x to use get_voltage_sel()
        regulator: Allow modular build of mc13xxx-core
        regulator: support PMIC mc13892
        make mc13783 regulator code generic
        Change the register name definitions for mc13783
        mach-ux500: Updated and connected ab8500 regulator board configuration
        regulators: Removed macros for initialization of ab8500 regulators
        regulators: Added verbose debug messages to ab8500 regulators
        ...
      1896a134
    • Linus Torvalds's avatar
      Merge branch 'x86-olpc-for-linus' of... · e691d24e
      Linus Torvalds authored
      Merge branch 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, olpc: Speed up device tree creation during boot
        x86, olpc: Add OLPC device-tree support
        x86, of: Define irq functions to allow drivers/of/* to build on x86
      e691d24e
    • Linus Torvalds's avatar
      Merge branch 'kvm-updates/2.6.38' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 55065bc5
      Linus Torvalds authored
      * 'kvm-updates/2.6.38' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (142 commits)
        KVM: Initialize fpu state in preemptible context
        KVM: VMX: when entering real mode align segment base to 16 bytes
        KVM: MMU: handle 'map_writable' in set_spte() function
        KVM: MMU: audit: allow audit more guests at the same time
        KVM: Fetch guest cr3 from hardware on demand
        KVM: Replace reads of vcpu->arch.cr3 by an accessor
        KVM: MMU: only write protect mappings at pagetable level
        KVM: VMX: Correct asm constraint in vmcs_load()/vmcs_clear()
        KVM: MMU: Initialize base_role for tdp mmus
        KVM: VMX: Optimize atomic EFER load
        KVM: VMX: Add definitions for more vm entry/exit control bits
        KVM: SVM: copy instruction bytes from VMCB
        KVM: SVM: implement enhanced INVLPG intercept
        KVM: SVM: enhance mov DR intercept handler
        KVM: SVM: enhance MOV CR intercept handler
        KVM: SVM: add new SVM feature bit names
        KVM: cleanup emulate_instruction
        KVM: move complete_insn_gp() into x86.c
        KVM: x86: fix CR8 handling
        KVM guest: Fix kvm clock initialization when it's configured out
        ...
      55065bc5
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial · 008d23e4
      Linus Torvalds authored
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
        Documentation/trace/events.txt: Remove obsolete sched_signal_send.
        writeback: fix global_dirty_limits comment runtime -> real-time
        ppc: fix comment typo singal -> signal
        drivers: fix comment typo diable -> disable.
        m68k: fix comment typo diable -> disable.
        wireless: comment typo fix diable -> disable.
        media: comment typo fix diable -> disable.
        remove doc for obsolete dynamic-printk kernel-parameter
        remove extraneous 'is' from Documentation/iostats.txt
        Fix spelling milisec -> ms in snd_ps3 module parameter description
        Fix spelling mistakes in comments
        Revert conflicting V4L changes
        i7core_edac: fix typos in comments
        mm/rmap.c: fix comment
        sound, ca0106: Fix assignment to 'channel'.
        hrtimer: fix a typo in comment
        init/Kconfig: fix typo
        anon_inodes: fix wrong function name in comment
        fix comment typos concerning "consistent"
        poll: fix a typo in comment
        ...
      
      Fix up trivial conflicts in:
       - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
       - fs/ext4/ext4.h
      
      Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
      008d23e4
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 8f685fbd
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: hid-multitouch: minor fixes based on additional review
        HID: Switch turbox/mosart touchscreen to hid-mosart
        HID: add Add Cando touch screen 10.1-inch product id
        HID: hid-mulitouch: add support for the 'Sensing Win7-TwoFinger'
        HID: hid-multitouch: add support for Cypress TrueTouch panels
        HID: hid-multitouch: support for PixCir-based panels
        HID: set HID_MAX_FIELD at 128
        HID: add feature_mapping callback
      8f685fbd
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · d24450e2
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: add SW_ROTATE_LOCK switch type
        Input: fix force feedback capability query example
        Input: wacom_w8001 - add single-touch support
        Input: add Austria Microsystem AS5011 joystick driver
        Input: remove aaed2000 keyboard driver
        Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13
        Input: cy8ctmg110_ts - Convert to dev_pm_ops
        Input: migor_ts - convert to dev_pm_ops
        Input: mcs5000_ts - convert to dev_pm_ops
        Input: eeti_ts - convert to dev_pm_ops
        Input: ad7879 - convert I2C to dev_pm_ops
      d24450e2
    • Lasse Collin's avatar
    • Lasse Collin's avatar
      decompressors: check input size in decompress_inflate.c · 1da914e0
      Lasse Collin authored
      Check for end of the input buffer when skipping over the filename field in
      the .gz file header.
      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>
      1da914e0
    • Lasse Collin's avatar
      x86: support XZ-compressed kernel · 30314804
      Lasse Collin authored
      This integrates the XZ decompression code to the x86 pre-boot code.
      
      mkpiggy.c is updated to reserve about 32 KiB more buffer safety margin for
      kernel decompression.  It is done unconditionally for all decompressors to
      keep the code simpler.
      
      The XZ decompressor needs around 30 KiB of heap, so the heap size is
      increased to 32 KiB on both x86-32 and x86-64.
      
      Documentation/x86/boot.txt is updated to list the XZ magic number.
      
      With the x86 BCJ filter in XZ, XZ-compressed x86 kernel tends to be a few
      percent smaller than the equivalent LZMA-compressed kernel.
      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>
      30314804
    • Lasse Collin's avatar
      decompressors: add boot-time XZ support · 3ebe1243
      Lasse Collin authored
      This implements the API defined in <linux/decompress/generic.h> which is
      used for kernel, initramfs, and initrd decompression.  This patch together
      with the first patch is enough for XZ-compressed initramfs and initrd;
      XZ-compressed kernel will need arch-specific changes.
      
      The buffering requirements described in decompress_unxz.c are stricter
      than with gzip, so the relevant changes should be done to the
      arch-specific code when adding support for XZ-compressed kernel.
      Similarly, the heap size in arch-specific pre-boot code may need to be
      increased (30 KiB is enough).
      
      The XZ decompressor needs memmove(), memeq() (memcmp() == 0), and
      memzero() (memset(ptr, 0, size)), which aren't available in all
      arch-specific pre-boot environments.  I'm including simple versions in
      decompress_unxz.c, but a cleaner solution would naturally be nicer.
      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>
      3ebe1243
    • 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>
      24fa0402
    • Lasse Collin's avatar
      Decompressors: fix callback-to-callback mode in decompress_unlzo.c · fb7fa589
      Lasse Collin authored
      Callback-to-callback decompression mode is used for initrd (not
      initramfs).  The LZO wrapper is broken for this use case for two reasons:
      
        - The argument validation is needlessly too strict by
          requiring that "posp" is non-NULL when "fill" is non-NULL.
      
        - The buffer handling code didn't work at all for this
          use case.
      
      I tested with LZO-compressed kernel, initramfs, initrd, and corrupt
      (truncated) initramfs and initrd images.
      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>
      fb7fa589
    • Lasse Collin's avatar
      Decompressors: check input size in decompress_unlzo.c · 5a3f81a7
      Lasse Collin authored
      The code assumes that the input is valid and not truncated.  Add checks to
      avoid reading past the end of the input buffer.  Change the type of "skip"
      from u8 to int to fix a possible integer overflow.
      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>
      5a3f81a7
    • Lasse Collin's avatar
      Decompressors: check for write errors in decompress_unlzo.c · 8f9b54a3
      Lasse Collin authored
      The return value of flush() is not checked in unlzo().  This means that
      the decompressor won't stop even if the caller doesn't want more data.
      This can happen e.g.  with a corrupt LZO-compressed initramfs image.
      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>
      8f9b54a3
    • Lasse Collin's avatar
      Decompressors: validate match distance in decompress_unlzma.c · eb0cf3e1
      Lasse Collin authored
      Validate the newly decoded distance (rep0) in process_bit1().  This is to
      detect corrupt LZMA data quickly.  The old code can run for long time
      producing garbage until it hits the end of the input.
      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>
      eb0cf3e1