1. 15 Apr, 2016 8 commits
  2. 14 Apr, 2016 6 commits
    • Mike Snitzer's avatar
      dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros · 9567366f
      Mike Snitzer authored
      The READ_LOCK macro was incorrectly returning -EINVAL if
      dm_bm_is_read_only() was true -- it will always be true once the cache
      metadata transitions to read-only by dm_cache_metadata_set_read_only().
      
      Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0).
      Also, all accesses of the 'cmd' argument passed to these related macros
      are now encapsulated in parenthesis.
      
      A follow-up patch can be developed to eliminate the use of macros in
      favor of pure C code.  Avoiding that now given that this needs to apply
      to stable@.
      Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Fixes: d14fcf3d ("dm cache: make sure every metadata function checks fail_io")
      Cc: stable@vger.kernel.org
      9567366f
    • Linus Torvalds's avatar
      /proc/iomem: only expose physical resource addresses to privileged users · 51d7b120
      Linus Torvalds authored
      In commit c4004b02 ("x86: remove the kernel code/data/bss resources
      from /proc/iomem") I was hoping to remove the phyiscal kernel address
      data from /proc/iomem entirely, but that had to be reverted because some
      system programs actually use it.
      
      This limits all the detailed resource information to properly
      credentialed users instead.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51d7b120
    • Linus Torvalds's avatar
      pci-sysfs: use proper file capability helper function · ab0fa82b
      Linus Torvalds authored
      The PCI config access checked the file capabilities correctly, but used
      the itnernal security capability check rather than the helper function
      that is actually meant for that.
      
      The security_capable() has unusual return values and is not meant to be
      used elsewhere (the only other use is in the capability checking
      functions that we actually intend people to use, and this odd PCI usage
      really stood out when looking around the capability code.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab0fa82b
    • Linus Torvalds's avatar
      Make file credentials available to the seqfile interfaces · 34dbbcdb
      Linus Torvalds authored
      A lot of seqfile users seem to be using things like %pK that uses the
      credentials of the current process, but that is actually completely
      wrong for filesystem interfaces.
      
      The unix semantics for permission checking files is to check permissions
      at _open_ time, not at read or write time, and that is not just a small
      detail: passing off stdin/stdout/stderr to a suid application and making
      the actual IO happen in privileged context is a classic exploit
      technique.
      
      So if we want to be able to look at permissions at read time, we need to
      use the file open credentials, not the current ones.  Normal file
      accesses can just use "f_cred" (or any of the helper functions that do
      that, like file_ns_capable()), but the seqfile interfaces do not have
      any such options.
      
      It turns out that seq_file _does_ save away the user_ns information of
      the file, though.  Since user_ns is just part of the full credential
      information, replace that special case with saving off the cred pointer
      instead, and suddenly seq_file has all the permission information it
      needs.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      34dbbcdb
    • Linus Torvalds's avatar
      Revert "x86: remove the kernel code/data/bss resources from /proc/iomem" · 4046d6e8
      Linus Torvalds authored
      This reverts commit c4004b02.
      
      Sadly, my hope that nobody would actually use the special kernel entries
      in /proc/iomem were dashed by kexec.  Which reads /proc/iomem explicitly
      to find the kernel base address.  Nasty.
      
      Anyway, that means we can't do the sane and simple thing and just remove
      the entries, and we'll instead have to mask them out based on permissions.
      Reported-by: default avatarZhengyu Zhang <zhezhang@redhat.com>
      Reported-by: default avatarDave Young <dyoung@redhat.com>
      Reported-by: default avatarFreeman Zhang <freeman.zhang1992@gmail.com>
      Reported-by: default avatarEmrah Demir <ed@abdsec.com>
      Reported-by: default avatarBaoquan He <bhe@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4046d6e8
    • Stefan Agner's avatar
      pwm: fsl-ftm: Use flat regmap cache · ad06fdee
      Stefan Agner authored
      Use flat regmap cache to avoid lockdep warning at probe:
      
      [    0.697285] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2755 lockdep_trace_alloc+0x15c/0x160()
      [    0.697449] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
      
      The RB-tree regmap cache needs to allocate new space on first writes.
      However, allocations in an atomic context (e.g. when a spinlock is held)
      are not allowed. The function regmap_write calls map->lock, which
      acquires a spinlock in the fast_io case. Since the pwm-fsl-ftm driver
      uses MMIO, the regmap bus of type regmap_mmio is being used which has
      fast_io set to true.
      
      The MMIO space of the pwm-fsl-ftm driver is reasonable condense, hence
      using the much faster flat regmap cache is anyway the better choice.
      Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
      Cc: Mark Brown <broonie@kernel.org>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      ad06fdee
  3. 13 Apr, 2016 8 commits
    • Linus Torvalds's avatar
      Merge tag 'sh-fixes-4.6-rc1' of git://git.libc.org/linux-sh · 90de6800
      Linus Torvalds authored
      Pull arch/sh fixes from Rich Felker:
       "Fixes for two arch/sh build regressions that appeared in 4.6-rc1, one
        introduced by me, and one caused by changes elsewhere"
      
      * tag 'sh-fixes-4.6-rc1' of git://git.libc.org/linux-sh:
        sh: fix function signature of cpu_coregroup_mask to match pointer type
        sh: fix smp-shx3 build regression from removal of arch localtimer
      90de6800
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 5b523ff2
      Linus Torvalds authored
      Pull m68knommu/coldfire fix from Greg Ungerer:
       "Only a single change that removes a local arch specific gpio bus sysfs
        device that now clashes with the generic gpio bus sysfs device
        interface"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k/gpio: remove arch specific sysfs bus device
      5b523ff2
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · e0127662
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A batch of fixes for -rc4, for various platforms.
      
        Nothing really substantial and worth pointing out in particular; small
        fixes for various bugs, see shortlog for details"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: sa1100: remove references to the defunct handhelds.org
        bus: uniphier-system-bus: fix condition of overlap check
        ARM: uniphier: drop weird sizeof()
        ARM: dts: am335x-baltos-ir5221: fix cpsw_emac0 link type
        ARM: OMAP: Correct interrupt type for ARM TWD
        ARM: DRA722: Add ID detect for Silicon Rev 2.0
        ARM: dts: am43xx: fix edma memcpy channel allocation
        ARM: dts: AM43x-epos: Fix clk parent for synctimer
        ARM: OMAP2: Fix up interconnect barrier initialization for DRA7
        documentation: Fix pinctrl documentation for Meson8 / Meson8b
        ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b
        ARM: mvebu: Correct unit address for linksys
        bus: mvebu-mbus: use %pa to print phys_addr_t
        arm64: dts: vulcan: Update PCI ranges
        ARM: u8500_defconfig: turn on the Synaptics RMI4 driver
        ARM: pxa: fix the number of DMA requestor lines
        ARM: OMAP2+: hwmod: Fix updating of sysconfig register
        ARM: OMAP2+: Use srst_udelay for USB on dm814x
      e0127662
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 5e1b59ab
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "ARM fixes:
         - Wrong indentation in the PMU code from the merge window
         - A long-time bug occuring with running ntpd on the host, candidate
           for stable
         - Properly handle (and warn about) the unsupported configuration of
           running on systems with less than 40 bits of PA space
         - More fixes to the PM and hotplug notifier stuff from the merge
           window
      
        x86:
         - leak of guest xcr0 (typically shows up as SIGILL)
         - new maintainer (who is sending the pull request too)
         - fix for merge window regression
         - fix for guest CPUID"
      
      Paolo Bonzini points out:
       "For the record, this tag is signed by me because I prepared the pull
        request.  Further pull requests for 4.6 will be signed and sent out by
        Radim directly"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: mask CPUID(0xD,0x1).EAX against host value
        kvm: x86: do not leak guest xcr0 into host interrupt handlers
        KVM: MMU: fix permission_fault()
        KVM: new maintainer on the block
        arm64: KVM: unregister notifiers in hyp mode teardown path
        arm64: KVM: Warn when PARange is less than 40 bits
        KVM: arm/arm64: Handle forward time correction gracefully
        arm64: KVM: Add braces to multi-line if statement in virtual PMU code
      5e1b59ab
    • Takashi Iwai's avatar
      ALSA: hda - Fix inconsistent monitor_present state until repoll · c44da62b
      Takashi Iwai authored
      While the previous commit fixed the missing monitor_present flag
      update, it may be still in an inconsistent state while the driver
      repolls: the flag itself is updated, but the eld_valid flag and the
      contents don't follow until the repoll finishes (and may be repeated
      for a few times).
      
      The basic problem is that pin_eld->monitor_present is updated in the
      caller side.  This should have been updated only in update_eld().  So,
      the proper fix is to avoid accessing pin_eld but only spec->temp_eld.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c44da62b
    • Hyungwon Hwang's avatar
      ALSA: hda - Fix regression of monitor_present flag in eld proc file · 023d8218
      Hyungwon Hwang authored
      The commit [bd481285: ALSA: hda - Fix forgotten HDMI
      monitor_present update] covered the missing update of monitor_present
      flag, but this caused a regression for devices without the i915 eld
      notifier.  Since the old code supposed that pin_eld->monitor_present
      was updated by the caller side, the hdmi_present_sense_via_verbs()
      doesn't update the temporary eld->monitor_present but only
      pin_eld->monitor_present, which is now overridden in update_eld().
      
      The fix is to update pin_eld->monitor_present as well before calling
      update_eld().
      
      Note that this may still leave monitor_present flag in an inconsistent
      state when the driver repolls, but this is at least the old behavior.
      More proper fix will follow in the later patch.
      
      Fixes: bd481285 ('ALSA: hda - Fix forgotten HDMI monitor_present update')
      Signed-off-by: default avatarHyungwon Hwang <hyungwon.hwang7@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      023d8218
    • Jaegeuk Kim's avatar
      ext4/fscrypto: avoid RCU lookup in d_revalidate · 03a8bb0e
      Jaegeuk Kim authored
      As Al pointed, d_revalidate should return RCU lookup before using d_inode.
      This was originally introduced by:
      commit 34286d66 ("fs: rcu-walk aware d_revalidate method").
      Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: stable <stable@vger.kernel.org>
      03a8bb0e
    • James Morris's avatar
      Merge tag 'keys-fixes-20160412' of... · 58976eef
      James Morris authored
      Merge tag 'keys-fixes-20160412' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into for-linus
      58976eef
  4. 12 Apr, 2016 13 commits
  5. 11 Apr, 2016 5 commits