1. 16 Sep, 2016 3 commits
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 008f08d6
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Here are a couple of bugfixes for v4.8-rc.
      
        Most of them have actually been around for a while this time but for
        some reason didn't get applied early on.  The shmobile regulator fix
        is the only one that isn't completely obvious.
      
        Device tree changes:
         - archtimer interrupts must be level triggered (multiple platforms)
         - fix for USB and MMC clocks on STiH410
         - fix split DT repository in case of raspberry-pi 3
         - a new use of skeleton.dtsi on arm64 has crept in after that was
           removed.
      
        defconfig updates:
         - xilinx vdma has a new Kconfig symbol name
         - keystone requires CONFIG_NOP_USB_XCEIV since v4.8-rc1
      
        Code fixes:
         - fix regulator quirk on shmobile
         - suspend-to-ram regression on EXYNOS
      
        Maintainer updates:
         - Javier Martinez Canillas is now a reviewer for Samsung EXYNOS"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: keystone: defconfig: Fix USB configuration
        arm64: dts: Fix broken architected timer interrupt trigger
        ARM: multi_v7_defconfig: update XILINX_VDMA
        ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
        ARM: dts: Remove use of skeleton.dtsi from bcm283x.dtsi
        ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
        ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
        ARM: shmobile: fix regulator quirk for Gen2
        ARM: EXYNOS: Clear OF_POPULATED flag from PMU node in IRQ init callback
        MAINTAINERS: Add myself as reviewer for Samsung Exynos support
      008f08d6
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · cac4662a
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Most of this update are fixes primarily discovered from testing on the
        older StrongARM 1110 and PXA systems, as a result of recent interest
        from several people in these platforms:
      
         - Locomo interrupt handling incorrectly stores the handler data in
           the chip's private data slot: when Locomo is combined with an
           interrupt controller who's chip uses the chip private data, this
           leads to an oops.
      
         - SA1111 was missing a call to clk_disable() to clean up after a
           failed probe.
      
         - SA1111 and PCMCIA suspend/resume was broken:
      
           The PCMCIA "ds" layer was using the legacy bus suspend/resume
           methods, which the core PM code is no longer calling as a result of
           device_pm_check_callbacks() introduced in commit aa8e54b5
           ("PM / sleep: Go direct_complete if driver has no callbacks").
      
           SA1111 was broken due to changes to PCMCIA which makes PCMCIA
           suspend itself later than the SA1111 code expects, and resume
           before the SA1111 code has initialised access to the pcmcia
           sub-device.
      
         - the default SA1111 interrupt mask polarity got messed up when it
           was converted to use a dynamic interrupt base number for its
           interrupts.
      
         - fix platform_get_irq() error code propagation, which was causing
           problems on platforms where the interrupt may not be available at
            probe time in DT setups.
      
         - fix the lack of clock to PCMCIA code on PXA platforms, which was
           omitted in conversions of PXA to CCF.
      
         - fix an oops in the PXA PCMCIA code caused by a previous commit not
           realising that Lubbock is different from the rest of the PXA PCMCIA
           drivers.
      
         - ensure that SA1111 low-level PCMCIA drivers propagate their error
           codes to the main probe function, rather than the driver silently
           accepting a failure.
      
         - fix the sa11xx debugfs reporting of timing information, which
           always indicated zero due to the clock being a factor of 1000 out.
      
         - fix the polarity of the status change signal reported from the
           sockets.
      
        Lastly, one ARM specific commit from Stefan Agner fixing the LPAE
        cache attributes"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: pxa/lubbock: add pcmcia clock
        ARM: locomo: fix locomo irq handling
        ARM: 8612/1: LPAE: initialize cache policy correctly
        ARM: sa1111: fix missing clk_disable()
        ARM: sa1111: fix pcmcia suspend/resume
        ARM: sa1111: fix pcmcia interrupt mask polarity
        ARM: sa1111: fix error code propagation in sa1111_probe()
        pcmcia: lubbock: fix sockets configuration
        pcmcia: sa1111: fix propagation of lowlevel board init return code
        pcmcia: soc_common: fix SS_STSCHG polarity
        pcmcia: sa11xx_base: add units to the timing information
        pcmcia: sa11xx_base: fix reporting of timing information
        pcmcia: ds: fix suspend/resume
      cac4662a
    • Arnd Bergmann's avatar
      Merge tag 'samsung-fixes-4.8-2' of... · 64086491
      Arnd Bergmann authored
      Merge tag 'samsung-fixes-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into fixes
      
      Pull "ARM: exynos: Fixes for v4.8, secound round" from Krzysztof Kozłowski:
      
      1. A recent change in populating irqchip devices from Device Tree
         broke Suspend to RAM on Exynos boards due to lack of probing of
         PMU (Power Management Unit) driver.  Multiple drivers attach to
         the PMU's DT node: irqchip, clock controller and PMU platform
         driver for handling suspend.  The new irqchip code marked the
         PMU's DT node as OF_POPULATED but we need to attach to this
         node also PMU platform driver.
      
      2. Add Javier as additional reviewer for Exynos patches.
      
      * tag 'samsung-fixes-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
        ARM: EXYNOS: Clear OF_POPULATED flag from PMU node in IRQ init callback
        MAINTAINERS: Add myself as reviewer for Samsung Exynos support
      64086491
  2. 15 Sep, 2016 8 commits
    • Jann Horn's avatar
      aio: mark AIO pseudo-fs noexec · 22f6b4d3
      Jann Horn authored
      This ensures that do_mmap() won't implicitly make AIO memory mappings
      executable if the READ_IMPLIES_EXEC personality flag is set.  Such
      behavior is problematic because the security_mmap_file LSM hook doesn't
      catch this case, potentially permitting an attacker to bypass a W^X
      policy enforced by SELinux.
      
      I have tested the patch on my machine.
      
      To test the behavior, compile and run this:
      
          #define _GNU_SOURCE
          #include <unistd.h>
          #include <sys/personality.h>
          #include <linux/aio_abi.h>
          #include <err.h>
          #include <stdlib.h>
          #include <stdio.h>
          #include <sys/syscall.h>
      
          int main(void) {
              personality(READ_IMPLIES_EXEC);
              aio_context_t ctx = 0;
              if (syscall(__NR_io_setup, 1, &ctx))
                  err(1, "io_setup");
      
              char cmd[1000];
              sprintf(cmd, "cat /proc/%d/maps | grep -F '/[aio]'",
                  (int)getpid());
              system(cmd);
              return 0;
          }
      
      In the output, "rw-s" is good, "rwxs" is bad.
      Signed-off-by: default avatarJann Horn <jann@thejh.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      22f6b4d3
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 024c7e37
      Linus Torvalds authored
      Pull kvm fix from Paolo Bonzini:
       "One fix for an x86 regression in VM migration, mostly visible with
        Windows because it uses RTC periodic interrupts"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvm: x86: correctly reset dest_map->vector when restoring LAPIC state
      024c7e37
    • Darrick J. Wong's avatar
      vfs: cap dedupe request structure size at PAGE_SIZE · b71dbf10
      Darrick J. Wong authored
      Kirill A Shutemov reports that the kernel doesn't try to cap dest_count
      in any way, and uses the number to allocate kernel memory.  This causes
      high order allocation warnings in the kernel log if someone passes in a
      big enough value.  We should clamp the allocation at PAGE_SIZE to avoid
      stressing the VM.
      
      The two existing users of the dedupe ioctl never send more than 120
      requests, so we can safely clamp dest_range at PAGE_SIZE, because with
      4k pages we can handle up to 127 dedupe candidates.  Given the max
      extent length of 16MB, we can end up doing 2GB of IO which is plenty.
      
      [ Note: the "offsetof()" can't overflow, because 'count' is just a
        16-bit integer.  That's not obvious in the limited context of the
        patch, so I'm noting it here because it made me go look.  - Linus ]
      Reported-by: default avatar"Kirill A. Shutemov" <kirill@shutemov.name>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b71dbf10
    • Darrick J. Wong's avatar
      vfs: fix return type of ioctl_file_dedupe_range · 5297e0f0
      Darrick J. Wong authored
      All the VFS functions in the dedupe ioctl path return int status, so
      the ioctl handler ought to as well.
      
      Found by Coverity, CID 1350952.
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5297e0f0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 46626600
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A set of fixes for the current series in the realm of block.
      
        Like the previous pull request, the meat of it are fixes for the nvme
        fabrics/target code.  Outside of that, just one fix from Gabriel for
        not doing a queue suspend if we didn't get the admin queue setup in
        the first place"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        nvme-rdma: add back dependency on CONFIG_BLOCK
        nvme-rdma: fix null pointer dereference on req->mr
        nvme-rdma: use ib_client API to detect device removal
        nvme-rdma: add DELETING queue flag
        nvme/quirk: Add a delay before checking device ready for memblaze device
        nvme: Don't suspend admin queue that wasn't created
        nvme-rdma: destroy nvme queue rdma resources on connect failure
        nvme_rdma: keep a ref on the ctrl during delete/flush
        iw_cxgb4: block module unload until all ep resources are released
        iw_cxgb4: call dev_put() on l2t allocation failure
      46626600
    • Al Viro's avatar
      fix minor infoleak in get_user_ex() · 1c109fab
      Al Viro authored
      get_user_ex(x, ptr) should zero x on failure.  It's not a lot of a leak
      (at most we are leaking uninitialized 64bit value off the kernel stack,
      and in a fairly constrained situation, at that), but the fix is trivial,
      so...
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      [ This sat in different branch from the uaccess fixes since mid-August ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c109fab
    • Paolo Bonzini's avatar
      kvm: x86: correctly reset dest_map->vector when restoring LAPIC state · b0eaf450
      Paolo Bonzini authored
      When userspace sends KVM_SET_LAPIC, KVM schedules a check between
      the vCPU's IRR and ISR and the IOAPIC redirection table, in order
      to re-establish the IOAPIC's dest_map (the list of CPUs servicing
      the real-time clock interrupt with the corresponding vectors).
      
      However, __rtc_irq_eoi_tracking_restore_one was forgetting to
      set dest_map->vectors.  Because of this, the IOAPIC did not process
      the real-time clock interrupt EOI, ioapic->rtc_status.pending_eoi
      got stuck at a non-zero value, and further RTC interrupts were
      reported to userspace as coalesced.
      
      Fixes: 9e4aabe2
      Fixes: 4d99ba89
      Cc: stable@vger.kernel.org
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: David Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b0eaf450
    • Roger Quadros's avatar
      ARM: keystone: defconfig: Fix USB configuration · a6805884
      Roger Quadros authored
      Simply enabling CONFIG_KEYSTONE_USB_PHY doesn't work anymore
      as it depends on CONFIG_NOP_USB_XCEIV. We need to enable
      that as well.
      
      This fixes USB on Keystone boards from v4.8-rc1 onwards.
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Acked-by: default avatarSantosh Shilimkar <ssantosh@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      a6805884
  3. 14 Sep, 2016 7 commits
  4. 13 Sep, 2016 22 commits