1. 10 Jul, 2015 6 commits
    • James Morris's avatar
    • Stephen Smalley's avatar
      selinux: fix mprotect PROT_EXEC regression caused by mm change · 892e8cac
      Stephen Smalley authored
      commit 66fc1303 ("mm: shmem_zero_setup
      skip security check and lockdep conflict with XFS") caused a regression
      for SELinux by disabling any SELinux checking of mprotect PROT_EXEC on
      shared anonymous mappings.  However, even before that regression, the
      checking on such mprotect PROT_EXEC calls was inconsistent with the
      checking on a mmap PROT_EXEC call for a shared anonymous mapping.  On a
      mmap, the security hook is passed a NULL file and knows it is dealing
      with an anonymous mapping and therefore applies an execmem check and no
      file checks.  On a mprotect, the security hook is passed a vma with a
      non-NULL vm_file (as this was set from the internally-created shmem
      file during mmap) and therefore applies the file-based execute check
      and no execmem check.  Since the aforementioned commit now marks the
      shmem zero inode with the S_PRIVATE flag, the file checks are disabled
      and we have no checking at all on mprotect PROT_EXEC.  Add a test to
      the mprotect hook logic for such private inodes, and apply an execmem
      check in that case.  This makes the mmap and mprotect checking
      consistent for shared anonymous mappings, as well as for /dev/zero and
      ashmem.
      
      Cc: <stable@vger.kernel.org> # 4.1.x
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      892e8cac
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 1604f871
      Linus Torvalds authored
      Pull arm64 fixes and clean-up from Catalin Marinas:
       - ACPI fix when checking the validity of the GICC MADT subtable
       - handle debug exceptions in the el*_inv exception entries
       - remove pointless register assignment in two compat syscall wrappers
       - unnecessary include path
       - defconfig update
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: entry32: remove pointless register assignment
        arm64: entry: handle debug exceptions in el*_inv
        arm64: Keep the ARM64 Kconfig selects sorted
        ACPI / ARM64 : use the new BAD_MADT_GICC_ENTRY macro
        ACPI / ARM64: add BAD_MADT_GICC_ENTRY() macro
        arm64: defconfig: Add Ceva ahci to the defconfig
        arm64: remove another unnecessary libfdt include path
      1604f871
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 3cdeb9d1
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       - opal-prd mmap fix from Vaidy
       - set kernel taint for MCEs from Daniel
       - alignment exception description from Anton
       - ppc4xx_hsta_msi build fix from Daniel
       - opal-elog interrupt fix from Alistair
       - core_idle_state race fix from Shreyas
       - hv-24x7 lockdep fix from Sukadev
       - multiple cxl fixes from Daniel, Ian, Mikey & Maninder
       - update MAINTAINERS to point at shared tree
      
      * tag 'powerpc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        cxl: Check if afu is not null in cxl_slbia
        powerpc: Update MAINTAINERS to point at shared tree
        powerpc/perf/24x7: Fix lockdep warning
        cxl: Fix off by one error allowing subsequent mmap page to be accessed
        cxl: Fail mmap if requested mapping is larger than assigned problem state area
        cxl: Fix refcounting in kernel API
        powerpc/powernv: Fix race in updating core_idle_state
        powerpc/powernv: Fix opal-elog interrupt handler
        powerpc/ppc4xx_hsta_msi: Include ppc-pci.h to fix reference to hose_list
        powerpc: Add plain English description for alignment exception oopses
        cxl: Test the correct mmio space before unmapping
        powerpc: Set the correct kernel taint on machine check errors
        cxl/vphb.c: Use phb pointer after NULL check
        powerpc/powernv: Fix vma page prot flags in opal-prd driver
      3cdeb9d1
    • Mark Rutland's avatar
      arm64: entry32: remove pointless register assignment · ad2daa85
      Mark Rutland authored
      We currently set x27 in compat_sys_sigreturn_wrapper and
      compat_sys_rt_sigreturn_wrapper, similarly to what we do with r8/why on
      32-bit ARM, in an attempt to prevent sigreturns from being restarted.
      
      However, on arm64 we have always used pt_regs::syscallno for syscall
      restarting (for both native and compat tasks), and x27 is never
      inspected again before being overwritten in kernel_exit.
      
      This patch removes the pointless register assignments.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      ad2daa85
    • Daniel Axtens's avatar
      cxl: Check if afu is not null in cxl_slbia · 2c069a11
      Daniel Axtens authored
      The pointer to an AFU in the adapter's list of AFUs can be null
      if we're in the process of removing AFUs. The afu_list_lock
      doesn't guard against this.
      
      Say we have 2 slices, and we're in the process of removing cxl.
       - We remove the AFUs in order (see cxl_remove). In cxl_remove_afu
         for AFU 0, we take the lock, set adapter->afu[0] = NULL, and
         release the lock.
       - Then we get an slbia. In cxl_slbia we take the lock, and set
         afu = adapter->afu[0], which is NULL.
       - Therefore our attempt to check afu->enabled will blow up.
      
      Therefore, check if afu is a null pointer before dereferencing it.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Acked-by: default avatarMichael Neuling <mikey@neuling.org>
      Acked-by: default avatarIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      2c069a11
  2. 09 Jul, 2015 17 commits
  3. 08 Jul, 2015 8 commits
  4. 07 Jul, 2015 9 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · d6ac4ffc
      Linus Torvalds authored
      Pull ARM updates from Russell King:
       "These are late by a week; they should have been merged during the
        merge window, but unfortunately, the ARM kernel build/boot farms were
        indicating random failures, and it wasn't clear whether the cause was
        something in these changes or something during the merge window.
      
        This is a set of merge window fixes with some documentation additions"
      
      * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: avoid unwanted GCC memset()/memcpy() optimisations for IO variants
        ARM: pgtable: document mapping types
        ARM: io: convert ioremap*() to functions
        ARM: io: fix ioremap_wt() implementation
        ARM: io: document ARM specific behaviour of ioremap*() implementations
        ARM: fix lockdep unannotated irqs-off warning
        ARM: 8397/1: fix vdsomunge not to depend on glibc specific error.h
        ARM: add helpful message when truncating physical memory
        ARM: add help text for HIGHPTE configuration entry
        ARM: fix DEBUG_SET_MODULE_RONX build dependencies
        ARM: 8396/1: use phys_addr_t in pfn_to_kaddr()
        ARM: 8394/1: update memblock limit after mapping lowmem
        ARM: 8393/1: smp: Fix suspicious RCU usage with ipi tracepoints
      d6ac4ffc
    • Tomas Winkler's avatar
      mei: nfc: fix deadlock on shutdown/suspend path · 4f273959
      Tomas Winkler authored
      In function mei_nfc_host_exit mei_cl_remove_device cannot be called
      under the device mutex as device removing flow invokes the device driver
      remove handler that calls in turn to mei_cl_disable_device which
      naturally acquires the device mutex.
      
      Also remove mei_cl_bus_remove_devices which has the same issue, but is
      never executed as currently the only device on the mei client bus is NFC
      and a new device cannot be easily added till the bus revamp is
      completed.
      
      This fixes regression caused by commit be9b720a ("mei_phy: move all
      nfc logic from mei driver to nfc")
      
      Prior to this change the nfc driver remove handler called to no-op
      disable function while actual nfc device was disabled directly from the
      mei driver.
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4f273959
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-scan' · 8076ca48
      Rafael J. Wysocki authored
      * acpi-scan:
        ata: ahci_platform: Add ACPI _CLS matching
        ACPI / scan: Add support for ACPI _CLS device matching
      8076ca48
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pnp', 'acpi-soc', 'pm-domains' and 'pm-sleep' · d0aee67f
      Rafael J. Wysocki authored
      * acpi-pnp:
        ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage
      
      * acpi-soc:
        ACPI / LPSS: Fix up acpi_lpss_create_device()
      
      * pm-domains:
        PM / Domains: Avoid infinite loops in attach/detach code
      
      * pm-sleep:
        PM / hibernate: clarify resume documentation
      d0aee67f
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-wakeirq' · 3fc7aeeb
      Rafael J. Wysocki authored
      * pm-wakeirq:
        PM / wakeirq: Avoid setting power.wakeirq too hastily
      3fc7aeeb
    • Catalin Marinas's avatar
      arm64: Keep the ARM64 Kconfig selects sorted · ef37566c
      Catalin Marinas authored
      Move EDAC_SUPPORT to the right place.
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      ef37566c
    • Al Stone's avatar
      ACPI / ARM64 : use the new BAD_MADT_GICC_ENTRY macro · 99e3e3ae
      Al Stone authored
      For those parts of the arm64 ACPI code that need to check GICC subtables
      in the MADT, use the new BAD_MADT_GICC_ENTRY macro instead of the previous
      BAD_MADT_ENTRY.  The new macro takes into account differences in the size
      of the GICC subtable that the old macro did not; this caused failures even
      though the subtable entries are valid.
      
      Fixes: aeb823bb ("ACPICA: ACPI 6.0: Add changes for FADT table.")
      Signed-off-by: default avatarAl Stone <al.stone@linaro.org>
      Reviewed-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatar"Rafael J. Wysocki" <rjw@rjwysocki.net>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      99e3e3ae
    • Al Stone's avatar
      ACPI / ARM64: add BAD_MADT_GICC_ENTRY() macro · b6cfb277
      Al Stone authored
      The BAD_MADT_ENTRY() macro is designed to work for all of the subtables
      of the MADT.  In the ACPI 5.1 version of the spec, the struct for the
      GICC subtable (struct acpi_madt_generic_interrupt) is 76 bytes long; in
      ACPI 6.0, the struct is 80 bytes long.  But, there is only one definition
      in ACPICA for this struct -- and that is the 6.0 version.  Hence, when
      BAD_MADT_ENTRY() compares the struct size to the length in the GICC
      subtable, it fails if 5.1 structs are in use, and there are systems in
      the wild that have them.
      
      This patch adds the BAD_MADT_GICC_ENTRY() that checks the GICC subtable
      only, accounting for the difference in specification versions that are
      possible.  The BAD_MADT_ENTRY() will continue to work as is for all other
      MADT subtables.
      
      This code is being added to an arm64 header file since that is currently
      the only architecture using the GICC subtable of the MADT.  As a GIC is
      specific to ARM, it is also unlikely the subtable will be used elsewhere.
      
      Fixes: aeb823bb ("ACPICA: ACPI 6.0: Add changes for FADT table.")
      Signed-off-by: default avatarAl Stone <al.stone@linaro.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatar"Rafael J. Wysocki" <rjw@rjwysocki.net>
      [catalin.marinas@arm.com: extra brackets around macro arguments]
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      b6cfb277
    • Russell King's avatar
      06be5eef