20 Oct, 2014

36 commits


19 Oct, 2014

4 commits

  • This breaks the stack end corruption detection facility.

    What that facility does it write a magic value to "end_of_stack()"
    and checking to see if it gets overwritten.

    "end_of_stack()" is "task_thread_info(p) + 1", which for sparc64 is
    the beginning of the FPU register save area.

    So once the user uses the FPU, the magic value is overwritten and the
    debug checks trigger.

    Fix this by making the size explicit.

    Due to the size we use for the fpsaved[], gsr[], and xfsr[] arrays we
    are limited to 7 levels of FPU state saves. So each FPU register set
    is 256 bytes, allocate 256 * 7 for the fpregs area.

    Reported-by: Meelis Roos
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Every path that ends up at do_sparc64_fault() must install a valid
    FAULT_CODE_* bitmask in the per-thread fault code byte.

    Two paths leading to the label winfix_trampoline (which expects the
    FAULT_CODE_* mask in register %g4) were not doing so:

    1) For pre-hypervisor TLB protection violation traps, if we took
    the 'winfix_trampoline' path we wouldn't have %g4 initialized
    with the FAULT_CODE_* value yet. Resulting in using the
    TLB_TAG_ACCESS register address value instead.

    2) In the TSB miss path, when we notice that we are going to use a
    hugepage mapping, but we haven't allocated the hugepage TSB yet, we
    still have to take the window fixup case into consideration and
    in that particular path we leave %g4 not setup properly.

    Errors on this sort were largely invisible previously, but after
    commit 4ccb9272892c33ef1c19a783cfa87103b30c2784 ("sparc64: sun4v TLB
    error power off events") we now have a fault_code mask bit
    (FAULT_CODE_BAD_RA) that triggers due to this bug.

    FAULT_CODE_BAD_RA triggers because this bit is set in TLB_TAG_ACCESS
    (see #1 above) and thus we get seemingly random bus errors triggered
    for user processes.

    Fixes: 4ccb9272892c ("sparc64: sun4v TLB error power off events")
    Reported-by: Meelis Roos
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull slave-dmaengine updates from Vinod Koul:
    "For dmaengine contributions we have:
    - designware cleanup by Andy
    - my series moving device_control users to dmanegine_xxx APIs for
    later removal of device_control API
    - minor fixes spread over drivers mainly mv_xor, pl330, mmp, imx-sdma
    etc"

    * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (60 commits)
    serial: atmel: add missing dmaengine header
    dmaengine: remove FSLDMA_EXTERNAL_START
    dmaengine: freescale: remove FSLDMA_EXTERNAL_START control method
    carma-fpga: move to fsl_dma_external_start()
    carma-fpga: use dmaengine_xxx() API
    dmaengine: freescale: add and export fsl_dma_external_start()
    dmaengine: add dmaengine_prep_dma_sg() helper
    video: mx3fb: use dmaengine_terminate_all() API
    serial: sh-sci: use dmaengine_terminate_all() API
    net: ks8842: use dmaengine_terminate_all() API
    mtd: sh_flctl: use dmaengine_terminate_all() API
    mtd: fsmc_nand: use dmaengine_terminate_all() API
    V4L2: mx3_camer: use dmaengine_pause() API
    dmaengine: coh901318: use dmaengine_terminate_all() API
    pata_arasan_cf: use dmaengine_terminate_all() API
    dmaengine: edma: check for echan->edesc => NULL in edma_dma_pause()
    dmaengine: dw: export probe()/remove() and Co to users
    dmaengine: dw: enable and disable controller when needed
    dmaengine: dw: always export dw_dma_{en,dis}able
    dmaengine: dw: introduce dw_dma_on() helper
    ...

    Linus Torvalds
     
  • Pull second batch of changes for KVM/{arm,arm64} from Marc Zyngier:
    "The most obvious thing is the sizeable MMU changes to support 48bit
    VAs on arm64.

    Summary:

    - support for 48bit IPA and VA (EL2)
    - a number of fixes for devices mapped into guests
    - yet another VGIC fix for BE
    - a fix for CPU hotplug
    - a few compile fixes (disabled VGIC, strict mm checks)"

    [ I'm pulling directly from Marc at the request of Paolo Bonzini, whose
    backpack was stolen at Düsseldorf airport and will do new keys and
    rebuild his web of trust. - Linus ]

    * tag 'kvm-arm-for-3.18-take-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm:
    arm/arm64: KVM: Fix BE accesses to GICv2 EISR and ELRSR regs
    arm: kvm: STRICT_MM_TYPECHECKS fix for user_mem_abort
    arm/arm64: KVM: Ensure memslots are within KVM_PHYS_SIZE
    arm64: KVM: Implement 48 VA support for KVM EL2 and Stage-2
    arm/arm64: KVM: map MMIO regions at creation time
    arm64: kvm: define PAGE_S2_DEVICE as read-only by default
    ARM: kvm: define PAGE_S2_DEVICE as read-only by default
    arm/arm64: KVM: add 'writable' parameter to kvm_phys_addr_ioremap
    arm/arm64: KVM: fix potential NULL dereference in user_mem_abort()
    arm/arm64: KVM: use __GFP_ZERO not memset() to get zeroed pages
    ARM: KVM: fix vgic-disabled build
    arm: kvm: fix CPU hotplug

    Linus Torvalds