17 Oct, 2013

2 commits

  • Pull device-mapper fix from Alasdair Kergon:
    "A patch to avoid data corruption in a device-mapper snapshot.

    This is primarily a data corruption bug that all users of
    device-mapper snapshots will want to fix. The CVE is due to a data
    leak under specific circumstances if, for example, the snapshot is
    presented to a virtual machine: a block written as data inside the VM
    can get interpreted incorrectly on the host outside the VM as
    metadata, causing the host to provide the VM with access to blocks it
    would not otherwise see. This is likely to affect few, if any,
    people"

    * tag 'dm-3.12-fix-cve' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm snapshot: fix data corruption

    Linus Torvalds
     
  • Pull gpio fixes from Linus Walleij:
    "Three GPIO fixes for the v3.12 series:
    - A fix to the Lynxpoint IRQ handler
    - Two late fixes to fallout from the gpiod refactoring"

    * tag 'gpio-v3.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpiolib: let gpiod_request() return -EPROBE_DEFER
    gpiolib: safer implementation of desc_to_gpio()
    gpio/lynxpoint: check if the interrupt is enabled in IRQ handler

    Linus Torvalds
     

16 Oct, 2013

5 commits

  • This patch fixes a particular type of data corruption that has been
    encountered when loading a snapshot's metadata from disk.

    When we allocate a new chunk in persistent_prepare, we increment
    ps->next_free and we make sure that it doesn't point to a metadata area
    by further incrementing it if necessary.

    When we load metadata from disk on device activation, ps->next_free is
    positioned after the last used data chunk. However, if this last used
    data chunk is followed by a metadata area, ps->next_free is positioned
    erroneously to the metadata area. A newly-allocated chunk is placed at
    the same location as the metadata area, resulting in data or metadata
    corruption.

    This patch changes the code so that ps->next_free skips the metadata
    area when metadata are loaded in function read_exceptions.

    The patch also moves a piece of code from persistent_prepare_exception
    to a separate function skip_metadata to avoid code duplication.

    CVE-2013-4299

    Signed-off-by: Mikulas Patocka
    Cc: stable@vger.kernel.org
    Cc: Mike Snitzer
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Pull device tree fixes and reverts from Grant Likely:
    "One bug fix and three reverts. The reverts back out the slightly
    controversial feeding the entire device tree into the random pool and
    the reserved-memory binding which isn't fully baked yet. Expect the
    reserved-memory patches at least to resurface for v3.13.

    The bug fixes removes a scary but harmless warning on SPARC that was
    introduced in the v3.12 merge window. v3.13 will contain a proper fix
    that makes the new code work on SPARC.

    On the plus side, the diffstat looks *awesome*. I love removing lines
    of code"

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    Revert "drivers: of: add initialization code for dma reserved memory"
    Revert "ARM: init: add support for reserved memory defined by device tree"
    Revert "of: Feed entire flattened device tree into the random pool"
    of: fix unnecessary warning on missing /cpus node

    Linus Torvalds
     
  • Pull DMA-mapping fix from Marek Szyprowski:
    "A bugfix for the IOMMU-based implementation of dma-mapping subsystem
    for ARM architecture"

    * 'fixes-for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    ARM: dma-mapping: Always pass proper prot flags to iommu_map()

    Linus Torvalds
     
  • Pull kvm fix from Gleb Natapov.

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: Enable pvspinlock after jump_label_init() to avoid VM hang

    Linus Torvalds
     
  • Pull Xen fixes from Stefano Stabellini:
    "A small fix for Xen on x86_32 and a build fix for xen-tpmfront on
    arm64"

    * tag 'stable/for-linus-3.12-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen: Fix possible user space selector corruption
    tpm: xen-tpmfront: fix missing declaration of xen_domain

    Linus Torvalds
     

15 Oct, 2013

10 commits

  • We use jump label to enable pv-spinlock. With the changes in (442e0973e927
    Merge branch 'x86/jumplabel'), the jump label behaviour has changed
    that would result in eventual hang of the VM since we would end up in a
    situation where slow path locks would halt the vcpus but we will not be
    able to wakeup the vcpu by lock releaser using unlock kick.

    Similar problem in Xen and more detailed description is available in
    a945928ea270 (xen: Do not enable spinlocks before jump_label_init()
    has executed)

    This patch splits kvm_spinlock_init to separate jump label changes with
    pvops patching and also make jump label enabling after jump_label_init().

    Signed-off-by: Raghavendra K T
    Reviewed-by: Paolo Bonzini
    Reviewed-by: Steven Rostedt
    Signed-off-by: Gleb Natapov

    Raghavendra K T
     
  • This reverts commit 9d8eab7af79cb4ce2de5de39f82c455b1f796963. There is
    still no consensus on the bindings for the reserved memory and various
    drawbacks of the proposed solution has been shown, so the best now is to
    revert it completely and start again from scratch later.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Grant Likely

    Marek Szyprowski
     
  • This reverts commit 10bcdfb8ba24760f715f0a700c3812747eddddf5. There is
    no consensus on the bindings for the reserved memory, so the code for
    handing it will be reverted.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Grant Likely

    Marek Szyprowski
     
  • Pull vfio fix from Alex Williamson:
    "Fix an incorrect break out of nested loop in iommu mapping code"

    * tag 'vfio-v3.12-rc5' of git://github.com/awilliam/linux-vfio:
    VFIO: vfio_iommu_type1: fix bug caused by break in nested loop

    Linus Torvalds
     
  • Pull infiniband updates from Roland Dreier:
    "Last batch of IB changes for 3.12: many mlx5 hardware driver fixes
    plus one trivial semicolon cleanup"

    * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IB: Remove unnecessary semicolons
    IB/mlx5: Ensure proper synchronization accessing memory
    IB/mlx5: Fix alignment of reg umr gather buffers
    IB/mlx5: Fix eq names to display nicely in /proc/interrupts
    mlx5: Fix error code translation from firmware to driver
    IB/mlx5: Fix opt param mask according to firmware spec
    mlx5: Fix opt param mask for sq err to rts transition
    IB/mlx5: Disable atomic operations
    mlx5: Fix layout of struct mlx5_init_seg
    mlx5: Keep polling to reclaim pages while any returned
    IB/mlx5: Avoid async events on invalid port number
    IB/mlx5: Decrease memory consumption of mr caches
    mlx5: Remove checksum on command interface commands
    IB/mlx5: Fix memory leak in mlx5_ib_create_srq
    IB/mlx5: Flush cache workqueue before destroying it
    IB/mlx5: Fix send work queue size calculation

    Linus Torvalds
     
  • Roland Dreier
     
  • These aren't necessary after switch blocks.

    Signed-off-by: Joe Perches
    Signed-off-by: Roland Dreier

    Joe Perches
     
  • Pull ARM fixes from Russell King:
    "Some more ARM fixes, nothing particularly major here. The biggest
    change is to fix the SMP_ON_UP code so that it works with TI's Aegis
    cores"

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7851/1: check for number of arguments in syscall_get/set_arguments()
    ARM: 7846/1: Update SMP_ON_UP code to detect A9MPCore with 1 CPU devices
    ARM: 7845/1: sharpsl_param.c: fix invalid memory access for pxa devices
    ARM: 7843/1: drop asm/types.h from generic-y
    ARM: 7842/1: MCPM: don't explode if invoked without being initialized first

    Linus Torvalds
     
  • Pull SLAB fix from Pekka Enberg:
    "A regression fix for overly eager slab cache name checks"

    * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
    slab_common: Do not check for duplicate slab names

    Linus Torvalds
     
  • Pull ACPI and power management fixes from Rafael Wysocki:
    "These fix two recent bugs in ACPIPHP (ACPI-based PCI hotplug) and
    update a bunch of web links and e-mail addresses in MAINTAINERS, docs
    and Kconfig that either are stale or will expire soon.

    Specifics:

    - The WARN_ON() in acpiphp_enumerate_slots() triggers as a false
    positive in some cases, so drop it.

    - Add a missing pci_dev_put() to an error code path in
    acpiphp_enumerate_slots().

    - Replace my old e-mail address that's going to expire with a new
    one.

    - Update ACPI web links and git tree information in MAINTAINERS.

    - Update links to the Linux-ACPI project's page in MAINTAINERS.

    - Update some stale links and e-mail addresses under Documentation
    and in the ACPI Kconfig file"

    * tag 'pm+acpi-3.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots()
    ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
    ACPI / PM / Documentation: Replace outdated project links and addresses
    MAINTAINERS / ACPI: Update links to the Linux-ACPI project web page
    MAINTAINERS / ACPI: Update links and git tree information
    MAINTAINERS / Documentation: Update Rafael's e-mail address

    Linus Torvalds
     

14 Oct, 2013

13 commits

  • This reverts commit 109b6236294b53d8eaa50be7d9e9ad37079f5f7e.

    Tim Bird expressed concern that this will have a bad effect on boot
    time, and while simple tests have shown it to be okay with simple tree,
    a device tree blob can potentially be quite large and
    add_device_randomness() is not a fast function. Rather than do this for
    all platforms unconditionally, I'm reverting this patch and would like
    to see it revisited. Instead of feeding the entire tree into the random
    pool, it would probably be appropriate to hash the tree and feed the
    hash result into the pool. There really isn't a lot of randomness in a
    device tree anyway. In the majority of cases only a handful of
    properties are going to be different between machines with the same
    baseboard.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Not all DT platforms have all the cpus collected under a /cpus node.
    That just happens to be a details of FDT, ePAPR and PowerPC platforms.
    Sparc does something different, but unfortunately the current code
    complains with a warning if /cpus isn't there. This became a problem
    with commit f86e4718, "driver/core cpu: initialize of_node in cpu's
    device structure", which caused the function to get called for all
    architectures.

    This commit is a temporary fix to fail silently if the cpus node isn't
    present. A proper fix will come later to allow arch code to provide a
    custom mechanism for decoding the CPU hwid if the 'reg' property isn't
    appropriate.

    Signed-off-by: Grant Likely
    Cc: David Miller
    Cc: Sudeep KarkadaNagesha
    Cc: Rob Herring

    Grant Likely
     
  • Linus Torvalds
     
  • Pull watchdog fixes from Wim Van Sebroeck:
    "This will fix a deadlock on the ts72xx_wdt driver, fix bitmasks in the
    kempld_wdt driver and fix a section mismatch in the sunxi_wdt driver"

    * git://www.linux-watchdog.org/linux-watchdog:
    watchdog: sunxi: Fix section mismatch
    watchdog: kempld_wdt: Fix bit mask definition
    watchdog: ts72xx_wdt: locking bug in ioctl

    Linus Torvalds
     
  • This driver has a section mismatch, for probe and remove functions,
    leading to the following warning during the compilation.

    WARNING: drivers/watchdog/built-in.o(.data+0x24): Section mismatch in
    reference from the variable sunxi_wdt_driver to the function
    .init.text:sunxi_wdt_probe()
    The variable sunxi_wdt_driver references
    the function __init sunxi_wdt_probe()

    Signed-off-by: Maxime Ripard
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Maxime Ripard
     
  • STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)'
    handles [9:8] bits. Thus, it should be fixed in order to handle
    [5:4] bits.

    Signed-off-by: Jingoo Han
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Jingoo Han
     
  • Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
    interruptible deadlock.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Dan Carpenter
     
  • In ftrace_syscall_enter(),
    syscall_get_arguments(..., 0, n, ...)
    if (i == 0) { ...; n--;}
    memcpy(..., n * sizeof(args[0]));
    If 'number of arguments(n)' is zero and 'argument index(i)' is also zero in
    syscall_get_arguments(), none of arguments should be copied by memcpy().
    Otherwise 'n--' can be a big positive number and unexpected amount of data
    will be copied. Tracing system calls which take no argument, say sync(void),
    may hit this case and eventually make the system corrupted.
    This patch fixes the issue both in syscall_get_arguments() and
    syscall_set_arguments().

    Cc:
    Acked-by: Will Deacon
    Signed-off-by: AKASHI Takahiro
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    AKASHI Takahiro
     
  • Pull ARM SoC fixes from Olof Johansson:
    "A small batch of fixes this week, mostly OMAP related. Nothing stands
    out as particularly controversial.

    Also a fix for a 3.12-rc1 timer regression for Exynos platforms,
    including the Chromebooks"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: exynos: dts: Update 5250 arch timer node with clock frequency
    ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
    ARM: mach-omap2: board-generic: fix undefined symbol
    ARM: dts: Fix pinctrl mask for omap3
    ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
    ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT

    Linus Torvalds
     
  • Without the "clock-frequency" property in arch timer node, could able
    to see the below crash dump.

    [] (unwind_backtrace+0x0/0xf4) from [] (show_stack+0x10/0x14)
    [] (show_stack+0x10/0x14) from [] (dump_stack+0x7c/0xb0)
    [] (dump_stack+0x7c/0xb0) from [] (Ldiv0_64+0x8/0x18)
    [] (Ldiv0_64+0x8/0x18) from [] (clockevents_config.part.2+0x1c/0x74)
    [] (clockevents_config.part.2+0x1c/0x74) from [] (clockevents_config_and_register+0x20/0x2c)
    [] (clockevents_config_and_register+0x20/0x2c) from [] (arch_timer_setup+0xa8/0x134)
    [] (arch_timer_setup+0xa8/0x134) from [] (arch_timer_init+0x1f4/0x24c)
    [] (arch_timer_init+0x1f4/0x24c) from [] (clocksource_of_init+0x34/0x58)
    [] (clocksource_of_init+0x34/0x58) from [] (time_init+0x20/0x2c)
    [] (time_init+0x20/0x2c) from [] (start_kernel+0x1e0/0x39c)

    THis is because the Exynos u-boot, for example on the Chromebooks, doesn't set
    up the CNTFRQ register as expected by arch_timer. Instead, we have to specify
    the frequency in the device tree like this.

    Signed-off-by: Yuvaraj Kumar C D
    [olof: Changed subject, added comment, elaborated on commit message]
    Signed-off-by: Olof Johansson

    Yuvaraj Kumar C D
     
  • …kernel/git/tmlind/linux-omap into fixes

    From Tony Lindgren:

    Few fixes for omap3 related hangs and errors that people have
    noticed now that people are actually using the device tree
    based booting for omap3.

    Also one regression fix for timer compile for dra7xx when
    omap5 is not selected, and a LED regression fix for n900.

    * tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
    ARM: mach-omap2: board-generic: fix undefined symbol
    ARM: dts: Fix pinctrl mask for omap3
    ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
    ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • Pull parisc fixes from Helge Deller:
    "This patchset includes a bugfix to prevent a kernel crash when memory
    in page zero is accessed by the kernel itself, e.g. via
    probe_kernel_read().

    Furthermore we now export flush_cache_page() which is needed
    (indirectly) by the lustre filesystem. The other patches remove
    unused functions and optimizes the page fault handler to only evaluate
    variables if needed, which again protects against possible kernel
    crashes"

    * 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: let probe_kernel_read() capture access to page zero
    parisc: optimize variable initialization in do_page_fault
    parisc: fix interruption handler to respect pagefault_disable()
    parisc: mark parisc_terminate() noreturn and cold.
    parisc: remove unused syscall_ipi() function.
    parisc: kill SMP single function call interrupt
    parisc: Export flush_cache_page() (needed by lustre)

    Linus Torvalds
     
  • Pull slave-dmaengine fixes from Vinod Koul:
    "Another week, time to send another fixes request taking time out of
    extended weekend for the festivities in this part of the world.

    We have two fixes from Sergei for rcar driver and one fixing memory
    leak of edma driver by Geyslan"

    * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
    dma: edma.c: remove edma_desc leakage
    rcar-hpbdma: add parameter to set_slave() method
    rcar-hpbdma: remove shdma_free_irq() calls

    Linus Torvalds
     

13 Oct, 2013

10 commits

  • Signed-off-by: Helge Deller

    Helge Deller
     
  • The attached change defers the initialization of the variables tsk, mm
    and flags until they are needed. As a result, the code won't crash if a
    kernel probe is done with a corrupt context and the code will be better
    optimized.

    Signed-off-by: John David Anglin
    Signed-off-by: Helge Deller

    John David Anglin
     
  • Running an "echo t > /proc/sysrq-trigger" crashes the parisc kernel. The
    problem is, that in print_worker_info() we try to read the workqueue info via
    the probe_kernel_read() functions which use pagefault_disable() to avoid
    crashes like this:
    probe_kernel_read(&pwq, &worker->current_pwq, sizeof(pwq));
    probe_kernel_read(&wq, &pwq->wq, sizeof(wq));
    probe_kernel_read(name, wq->name, sizeof(name) - 1);

    The problem here is, that the first probe_kernel_read(&pwq) might return zero
    in pwq and as such the following probe_kernel_reads() try to access contents of
    the page zero which is read protected and generate a kernel segfault.

    With this patch we fix the interruption handler to call parisc_terminate()
    directly only if pagefault_disable() was not called (in which case
    preempt_count()==0). Otherwise we hand over to the pagefault handler which
    will try to look up the faulting address in the fixup tables.

    Signed-off-by: Helge Deller
    Cc: # v3.0+
    Signed-off-by: John David Anglin
    Signed-off-by: Helge Deller

    Helge Deller
     
  • Signed-off-by: Helge Deller

    Helge Deller
     
  • Signed-off-by: Helge Deller

    Helge Deller
     
  • Commit 9a46ad6d6df3b54 "smp: make smp_call_function_many() use logic
    similar to smp_call_function_single()" has unified the way to handle
    single and multiple cross-CPU function calls. Now only one interrupt
    is needed for architecture specific code to support generic SMP function
    call interfaces, so kill the redundant single function call interrupt.

    Signed-off-by: Jiang Liu
    Cc: Jiang Liu
    Signed-off-by: Helge Deller

    Jiang Liu
     
  • ERROR: "flush_cache_page" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Helge Deller

    Geert Uytterhoeven
     
  • Olga reported that file descriptors opened with O_PATH do not work with
    fstatfs(), found during further development of ksh93's thread support.

    There is no reason to not allow O_PATH file descriptors here (fstatfs is
    very much a path operation), so use "fdget_raw()". See commit
    55815f70147d ("vfs: make O_PATH file descriptors usable for 'fstat()'")
    for a very similar issue reported for fstat() by the same team.

    Reported-and-tested-by: ольга крыжановская
    Acked-by: Al Viro
    Cc: stable@kernel.org # O_PATH introduced in 3.0+
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull ext4 bugfixes from Ted Ts'o:
    "A bug fix and performance regression fix for ext4"

    * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    ext4: fix memory leak in xattr
    ext4: fix performance regression in writeback of random writes

    Linus Torvalds
     
  • Pull btrfs fixes from Chris Mason:
    "We've got more bug fixes in my for-linus branch:

    One of these fixes another corner of the compression oops from last
    time. Miao nailed down some problems with concurrent snapshot
    deletion and drive balancing.

    I kept out one of his patches for more testing, but these are all
    stable"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: fix oops caused by the space balance and dead roots
    Btrfs: insert orphan roots into fs radix tree
    Btrfs: limit delalloc pages outside of find_delalloc_range
    Btrfs: use right root when checking for hash collision

    Linus Torvalds