1. 27 Mar, 2015 8 commits
  2. 24 Mar, 2015 4 commits
    • Tejun Heo's avatar
      libata: remove ATA_FLAG_LOWTAG · 3a028243
      Tejun Heo authored
      sata_sil24 for some reason pukes when tags are allocated round-robin
      which helps tag ordered controllers.  To work around the issue,
      72dd299d ("libata: allow sata_sil24 to opt-out of tag ordered
      submission") introduced ATA_FLAG_LOWTAG which tells libata tag
      allocation to do lowest-first.
      
      However, with the recent switch to blk-mq tag allocation, the liata
      tag allocation code path is no longer used and the workaround is now
      implemented in the block layer and selected by setting
      scsi_host_template->tag_alloc_policy to BLK_TAG_ALLOC_FIFO.  See
      9269e234 ("libata: make sata_sil24 use fifo tag allocator").
      
      This leaves ATA_FLAG_LOWTAG withoout any actual user.  Remove it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Shaohua Li <shli@fb.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      3a028243
    • Andy Shevchenko's avatar
      sata_dwc_460ex: re-use hsdev->dev instead of dwc_dev · db7a657f
      Andy Shevchenko authored
      This patch re-uses hsdev->dev which is allocated on heap. Therefore, the
      private structure, which is global variable, is reduced by one field.
      
      In one case ap->dev is used and there it seems to be right decision.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      db7a657f
    • Andy Shevchenko's avatar
      sata_dwc_460ex: move to generic DMA driver · 8b344485
      Andy Shevchenko authored
      The SATA implementation based on two actually different devices, i.e. SATA and
      DMA controllers.
      
      For Synopsys DesignWare DMA we have already a generic implementation of the
      driver. Thus, the patch converts the code to use DMAEngine framework and
      dw_dmac driver.
      
      In future it will be better to split the devices inside DTS as well like it's
      done on other platforms.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      8b344485
    • Andy Shevchenko's avatar
      sata_dwc_460ex: join messages back · d578514b
      Andy Shevchenko authored
      It it better to have full message on one line. It simplifies to search for line
      in the code by message when debugging.
      
      Note that the lines which will be removed by sequential patch are not fixed
      here.
      
      There is no functional change.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      d578514b
  3. 19 Mar, 2015 2 commits
  4. 18 Mar, 2015 4 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 7b09ac70
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This is a collection of many small fixes.  Most of fixes are for ASoC
        drivers, including the fixes of wrong field usages for boolean kctls.
      
        In addition, there is a fix in ASoC core for adding proper locks for
        component lists, and a fix for a HD-audio regression by the previous
        mono channel fix"
      
      * tag 'sound-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits)
        ALSA: hda - Treat stereo-to-mono mix properly
        ASoC: wm9713: Fix wrong value references for boolean kctl
        ASoC: wm9712: Fix wrong value references for boolean kctl
        ASoC: wm8960: Fix wrong value references for boolean kctl
        ASoC: wm8955: Fix wrong value references for boolean kctl
        ASoC: wm8904: Fix wrong value references for boolean kctl
        ASoC: wm8903: Fix wrong value references for boolean kctl
        ASoC: wm8731: Fix wrong value references for boolean kctl
        ASoC: wm2000: Fix wrong value references for boolean kctl
        ASoC: tas5086: Fix wrong value references for boolean kctl
        ASoC: pcm1681: Fix wrong value references for boolean kctl
        ASoC: es8238: Fix wrong value references for boolean kctl
        ASoC: cs4271: Fix wrong value references for boolean kctl
        ASoC: ak4641: Fix wrong value references for boolean kctl
        ASoC: adav80x: Fix wrong value references for boolean kctl
        ASoC: Fix component lists locking
        ASoC: Intel: remove conflicts when load/unload multiple firmware images
        ASoC: rt286: Change the DMI mapping for Dino
        ASoC: sgtl5000: remove useless register write clearing CHRGPUMP_POWERUP
        ASoC: fsl_ssi: Don't try to round-up for PM divisor calculation
        ...
      7b09ac70
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · ec3fbff0
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "Fix a bug in the ARM XTS implementation that can cause failures in
        decrypting encrypted disks, and fix is a memory overwrite bug that can
        cause a crash which can be triggered from userspace"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: aesni - fix memory usage in GCM decryption
        crypto: arm/aes update NEON AES module to latest OpenSSL version
      ec3fbff0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching · da11508e
      Linus Torvalds authored
      Pull livepatching fix from Jiri Kosina:
      
       - fix for potential race with module loading, from Petr Mladek.
      
         The race is very unlikely to be seen in real world and has been found
         by code inspection, but should be fixed for 4.0 anyway.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
        livepatch: Fix subtle race with coming and going modules
      da11508e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · e63c733d
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
      
       - fixes for pen pen proximity / touch events in wacom driver, from Ping
         Cheng and Benjamin Tissoires
      
       - two new device-specific quirks from Oliver Neukum and Forest
         Wilkinson
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: wacom: check for wacom->shared before following the pointer
        HID: tivo: enable all buttons on the TiVo Slide Pro remote
        HID: add ALWAYS_POLL quirk for a Logitech 0xc007
        HID: wacom: rely on actual touch down count to decide touch_down
        HID: wacom: do not send pen events before touch is up/forced out
      e63c733d
  5. 17 Mar, 2015 11 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c5861658
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Misc fixes from all around the place:
      
         - a KASLR related revert where we ran out of time to get a fix - this
           represents a substantial portion of the diffstat,
      
         - two FPU fixes,
      
         - two x86 platform fixes: an ACPI reduced-hw fix and a NumaChip fix,
      
         - an entry code fix,
      
         - and a VDSO build fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert "x86/mm/ASLR: Propagate base load address calculation"
        x86/fpu: Drop_fpu() should not assume that tsk equals current
        x86/fpu: Avoid math_state_restore() without used_math() in __restore_xstate_sig()
        x86/apic/numachip: Fix sibling map with NumaChip
        x86/platform, acpi: Bypass legacy PIC and PIT in ACPI hardware reduced mode
        x86/asm/entry/32: Fix user_mode() misuses
        x86/vdso: Fix the build on GCC5
      c5861658
    • Linus Torvalds's avatar
      Merge branches 'perf-urgent-for-linus' and 'timers-urgent-for-linus' of... · 13326e5a
      Linus Torvalds authored
      Merge branches 'perf-urgent-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull perf and timer fixes from Ingo Molnar:
       "Two small perf fixes:
         - kernel side context leak fix
         - tooling crash fix
      
        And two clocksource driver fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix context leak in put_event()
        perf annotate: Fix fallback to unparsed disassembler line
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clockevents: sun5i: Fix setup_irq init sequence
        clocksource: efm32: Fix a NULL pointer dereference
      13326e5a
    • Benjamin Tissoires's avatar
      HID: wacom: check for wacom->shared before following the pointer · e2c7d887
      Benjamin Tissoires authored
      486b908d (HID: wacom: do not send pen events before touch is up/forced out)
      introduces a kernel oops when plugging a tablet without touch.
      
      wacom->shared is null for these devices so this leads to a null pointer
      exception.
      
      Change the condition to make it clear that what we need is wacom->shared
      not NULL.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      e2c7d887
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v4.0-rc4' of... · 8e6e44fb
      Linus Torvalds authored
      Merge tag 'regulator-fix-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "The two main fixes here from Javier and Doug both fix issues seen on
        the Exynos-based ARM Chromebooks with reference counting of GPIO
        regulators over system suspend.  The GPIO enable code didn't properly
        take account of this case (a full analysis is in Doug's commit log).
      
        This is fixed by both fixing the reference counting directly and by
        making the resume code skip enables it doesn't need to do.  We could
        skip the change in the resume code but it's a very simple change and
        adds extra robustness against problems in other drivers"
      
      * tag 'regulator-fix-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: tps65910: Add missing #include <linux/of.h>
        regulator: core: Fix enable GPIO reference counting
        regulator: Only enable disabled regulators on resume
      8e6e44fb
    • Linus Torvalds's avatar
      Merge tag 'regmap-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 529d2eb6
      Linus Torvalds authored
      Pull regmap fixes from Mark Brown:
       "A few things here:
      
         - a change from Lars to fix insertion of cache values at the start of
           rather than end of a rbtree block.  This hadn't been noticed before
           since almost everything lists registers in ascending order.
      
         - a fix from Takashi for spurious warnings during cache sync with
           read once registers, a problem which can be very noticeable on
           devices that it affects.
      
         - a fix from Valentin for a tighening of the oneshot IRQ request
           interface which would have broken affected devices"
      
      * tag 'regmap-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: regcache-rbtree: Fix present bitmap resize
        regmap: Skip read-only registers in regcache_sync()
        regmap-irq: set IRQF_ONESHOT flag to ensure IRQ request
      529d2eb6
    • Linus Torvalds's avatar
      Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 4d272f90
      Linus Torvalds authored
      Pull virtio fixes from Rusty Russell:
       "Not entirely surprising: the ongoing QEMU work on virtio 1.0 has
        revealed more minor issues with our virtio 1.0 drivers just introduced
        in the kernel.
      
        (I would normally use my fixes branch for this, but there were a batch
        of them...)"
      
      * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        virtio_mmio: fix access width for mmio
        uapi/virtio_scsi: allow overriding CDB/SENSE size
        virtio_mmio: generation support
        virtio_rpmsg: set DRIVER_OK before using device
        9p/trans_virtio: fix hot-unplug
        virtio-balloon: do not call blocking ops when !TASK_RUNNING
        virtio_blk: fix comment for virtio 1.0
        virtio_blk: typo fix
        virtio_balloon: set DRIVER_OK before using device
        virtio_console: avoid config access from irq
        virtio_console: init work unconditionally
      4d272f90
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 2fc67756
      Linus Torvalds authored
      Pull kvm fixes from Marcelo Tosatti:
       "KVM bug fixes (ARM and x86)"
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        arm/arm64: KVM: Keep elrsr/aisr in sync with software model
        KVM: VMX: Set msr bitmap correctly if vcpu is in guest mode
        arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
        kvm: x86: i8259: return initialized data on invalid-size read
        arm64: KVM: Fix outdated comment about VTCR_EL2.PS
        arm64: KVM: Do not use pgd_index to index stage-2 pgd
        arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting
        kvm: move advertising of KVM_CAP_IRQFD to common code
      2fc67756
    • Kirill A. Shutemov's avatar
      pagemap: do not leak physical addresses to non-privileged userspace · ab676b7d
      Kirill A. Shutemov authored
      As pointed by recent post[1] on exploiting DRAM physical imperfection,
      /proc/PID/pagemap exposes sensitive information which can be used to do
      attacks.
      
      This disallows anybody without CAP_SYS_ADMIN to read the pagemap.
      
      [1] http://googleprojectzero.blogspot.com/2015/03/exploiting-dram-rowhammer-bug-to-gain.html
      
      [ Eventually we might want to do anything more finegrained, but for now
        this is the simple model.   - Linus ]
      Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
      Acked-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Mark Seaborn <mseaborn@chromium.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab676b7d
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v4.0-rc4' of... · 3fc6c5a1
      Takashi Iwai authored
      Merge tag 'asoc-fix-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v4.0
      
      As well as the usual collection of driver specific fixes there's a few
      more generic things:
      
       - Lots of fixes from Takashi for drivers using the wrong field in the
         control union to communicate with userspace, leading to potential
         errors on 64 bit systems.
       - A fix from Lars for locking of the lists of devices we maintain,
         mostly only likely to trigger during device probe and removal.
      3fc6c5a1
    • Petr Mladek's avatar
      livepatch: Fix subtle race with coming and going modules · 8cb2c2dc
      Petr Mladek authored
      There is a notifier that handles live patches for coming and going modules.
      It takes klp_mutex lock to avoid races with coming and going patches but
      it does not keep the lock all the time. Therefore the following races are
      possible:
      
        1. The notifier is called sometime in STATE_MODULE_COMING. The module
           is visible by find_module() in this state all the time. It means that
           new patch can be registered and enabled even before the notifier is
           called. It might create wrong order of stacked patches, see below
           for an example.
      
         2. New patch could still see the module in the GOING state even after
            the notifier has been called. It will try to initialize the related
            object structures but the module could disappear at any time. There
            will stay mess in the structures. It might even cause an invalid
            memory access.
      
      This patch solves the problem by adding a boolean variable into struct module.
      The value is true after the coming and before the going handler is called.
      New patches need to be applied when the value is true and they need to ignore
      the module when the value is false.
      
      Note that we need to know state of all modules on the system. The races are
      related to new patches. Therefore we do not know what modules will get
      patched.
      
      Also note that we could not simply ignore going modules. The code from the
      module could be called even in the GOING state until mod->exit() finishes.
      If we start supporting patches with semantic changes between function
      calls, we need to apply new patches to any still usable code.
      See below for an example.
      
      Finally note that the patch solves only the situation when a new patch is
      registered. There are no such problems when the patch is being removed.
      It does not matter who disable the patch first, whether the normal
      disable_patch() or the module notifier. There is nothing to do
      once the patch is disabled.
      
      Alternative solutions:
      ======================
      
      + reject new patches when a patched module is coming or going; this is ugly
      
      + wait with adding new patch until the module leaves the COMING and GOING
        states; this might be dangerous and complicated; we would need to release
        kgr_lock in the middle of the patch registration to avoid a deadlock
        with the coming and going handlers; also we might need a waitqueue for
        each module which seems to be even bigger overhead than the boolean
      
      + stop modules from entering COMING and GOING states; wait until modules
        leave these states when they are already there; looks complicated; we would
        need to ignore the module that asked to stop the others to avoid a deadlock;
        also it is unclear what to do when two modules asked to stop others and
        both are in COMING state (situation when two new patches are applied)
      
      + always register/enable new patches and fix up the potential mess (registered
        patches order) in klp_module_init(); this is nasty and prone to regressions
        in the future development
      
      + add another MODULE_STATE where the kallsyms are visible but the module is not
        used yet; this looks too complex; the module states are checked on "many"
        locations
      
      Example of patch stacking breakage:
      ===================================
      
      The notifier could _not_ _simply_ ignore already initialized module objects.
      For example, let's have three patches (P1, P2, P3) for functions a() and b()
      where a() is from vmcore and b() is from a module M. Something like:
      
      	a()	b()
      P1	a1()	b1()
      P2	a2()	b2()
      P3	a3()	b3(3)
      
      If you load the module M after all patches are registered and enabled.
      The ftrace ops for function a() and b() has listed the functions in this
      order:
      
      	ops_a->func_stack -> list(a3,a2,a1)
      	ops_b->func_stack -> list(b3,b2,b1)
      
      , so the pointer to b3() is the first and will be used.
      
      Then you might have the following scenario. Let's start with state when patches
      P1 and P2 are registered and enabled but the module M is not loaded. Then ftrace
      ops for b() does not exist. Then we get into the following race:
      
      CPU0					CPU1
      
      load_module(M)
      
        complete_formation()
      
        mod->state = MODULE_STATE_COMING;
        mutex_unlock(&module_mutex);
      
      					klp_register_patch(P3);
      					klp_enable_patch(P3);
      
      					# STATE 1
      
        klp_module_notify(M)
          klp_module_notify_coming(P1);
          klp_module_notify_coming(P2);
          klp_module_notify_coming(P3);
      
      					# STATE 2
      
      The ftrace ops for a() and b() then looks:
      
        STATE1:
      
      	ops_a->func_stack -> list(a3,a2,a1);
      	ops_b->func_stack -> list(b3);
      
        STATE2:
      	ops_a->func_stack -> list(a3,a2,a1);
      	ops_b->func_stack -> list(b2,b1,b3);
      
      therefore, b2() is used for the module but a3() is used for vmcore
      because they were the last added.
      
      Example of the race with going modules:
      =======================================
      
      CPU0					CPU1
      
      delete_module()  #SYSCALL
      
         try_stop_module()
           mod->state = MODULE_STATE_GOING;
      
         mutex_unlock(&module_mutex);
      
      					klp_register_patch()
      					klp_enable_patch()
      
      					#save place to switch universe
      
      					b()     # from module that is going
      					  a()   # from core (patched)
      
         mod->exit();
      
      Note that the function b() can be called until we call mod->exit().
      
      If we do not apply patch against b() because it is in MODULE_STATE_GOING,
      it will call patched a() with modified semantic and things might get wrong.
      
      [jpoimboe@redhat.com: use one boolean instead of two]
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.cz>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      8cb2c2dc
    • Michael S. Tsirkin's avatar
      virtio_mmio: fix access width for mmio · 704a0b5f
      Michael S. Tsirkin authored
      Going over the virtio mmio code, I noticed that it doesn't correctly
      access modern device config values using "natural" accessors: it uses
      readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:
      
      	4.2.2.2 Driver Requirements: MMIO Device Register Layout
      
      	...
      
      	The driver MUST only use 32 bit wide and aligned reads and writes to
      	access the control registers described in table 4.1.
      	For the device-specific configuration space, the driver MUST use
      	8 bit wide accesses for 8 bit wide fields, 16 bit wide and aligned
      	accesses for 16 bit wide fields and 32 bit wide and aligned accesses for
      	32 and 64 bit wide fields.
      
      Borrow code from virtio_pci_modern to do this correctly.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      704a0b5f
  6. 16 Mar, 2015 9 commits
  7. 15 Mar, 2015 2 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 08352086
      Linus Torvalds authored
      Pull drm fix from Dave Airlie:
       "An oops snuck in in an -rc3 patch, this fixes it"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        [PATCH] drm/mm: Fix support 4 GiB and larger ranges
      08352086
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 1ee89c51
      Linus Torvalds authored
      Pull clock framework fixes from Michael Turquette:
       "The clk fixes for 4.0-rc4 comprise three themes.
      
        First are the usual driver fixes for new regressions since v3.19.
      
        Second are fixes to the common clock divider type caused by recent
        changes to how we round clock rates.  This affects many clock drivers
        that use this common code.
      
        Finally there are fixes for drivers that improperly compared struct
        clk pointers (drivers must not deref these pointers).  While some of
        these drivers have done this for a long time, this did not cause a
        problem until we started generating unique struct clk pointers for
        every consumer.  A new function, clk_is_match was introduced to get
        these drivers working again and they are fixed up to no longer deref
        the pointers themselves"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        ASoC: kirkwood: fix struct clk pointer comparing
        ASoC: fsl_spdif: fix struct clk pointer comparing
        ARM: imx: fix struct clk pointer comparing
        clk: introduce clk_is_match
        clk: don't export static symbol
        clk: divider: fix calculation of initial best divider when rounding to closest
        clk: divider: fix selection of divider when rounding to closest
        clk: divider: fix calculation of maximal parent rate for a given divider
        clk: divider: return real rate instead of divider value
        clk: qcom: fix platform_no_drv_owner.cocci warnings
        clk: qcom: fix platform_no_drv_owner.cocci warnings
        clk: qcom: Add PLL4 vote clock
        clk: qcom: lcc-msm8960: Fix PLL rate detection
        clk: qcom: Fix slimbus n and m val offsets
        clk: ti: Fix FAPLL parent enable bit handling
      1ee89c51