1. 01 Aug, 2014 1 commit
    • Russell King's avatar
      Merge tag 'nommu-for-rmk' of git://git.pengutronix.de/git/ukl/linux into devel-stable · c70fbb01
      Russell King authored
      Two different fixes for the same problem making some ARM nommu configurations
      not boot since 3.6-rc1. The problem is that user_addr_max returned the biggest
      available RAM address which makes some copy_from_user variants fail to read
      from XIP memory.
      
      Even in the presence of one of the two fixes the other still makes sense, so
      both patches are included here.
      
      This problem was the last one preventing efm32 boot to a prompt with mainline.
      c70fbb01
  2. 09 Jul, 2014 2 commits
    • Jean Pihet's avatar
      ARM: perf: disable the pagefault handler when reading from user space · 4b2974fa
      Jean Pihet authored
      Under perf, the fp unwinding scheme requires access to user space memory
      and can provoke a pagefault via call to __copy_from_user_inatomic from
      user_backtrace. This unwinding can take place in response to an interrupt
      (__perf_event_overflow). This is undesirable as we may already have
      mmap_sem held for write. One example being a process that calls mprotect
      just as a the PMU counters overflow.
      
      An example that can provoke this behaviour:
      perf record -e event:tocapture --call-graph fp ./application_to_test
      
      This patch addresses this issue by disabling pagefaults briefly in
      user_backtrace (as is done in the other architectures: ARM64, x86, Sparc etc.).
      
      Without the patch a deadlock occurs when __perf_event_overflow is called
      while reading the data from the user space:
      
       [ INFO: possible recursive locking detected ]
       3.16.0-rc2-00038-g0ed7ff6 #46 Not tainted
       ---------------------------------------------
       stress/1634 is trying to acquire lock:
       (&mm->mmap_sem){++++++}, at: [<c001dc04>] do_page_fault+0xa8/0x428
      
       but task is already holding lock:
       (&mm->mmap_sem){++++++}, at: [<c00f4098>] SyS_mprotect+0xa8/0x1c8
      
       other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&mm->mmap_sem);
        lock(&mm->mmap_sem);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
       2 locks held by stress/1634:
       #0:  (&mm->mmap_sem){++++++}, at: [<c00f4098>] SyS_mprotect+0xa8/0x1c8
       #1:  (rcu_read_lock){......}, at: [<c00c29dc>] __perf_event_overflow+0x120/0x294
      
       stack backtrace:
       CPU: 1 PID: 1634 Comm: stress Not tainted 3.16.0-rc2-00038-g0ed7ff6 #46
       [<c0017c8c>] (unwind_backtrace) from [<c0012eec>] (show_stack+0x20/0x24)
       [<c0012eec>] (show_stack) from [<c04de914>] (dump_stack+0x7c/0x98)
       [<c04de914>] (dump_stack) from [<c006a360>] (__lock_acquire+0x1484/0x1cf0)
       [<c006a360>] (__lock_acquire) from [<c006b14c>] (lock_acquire+0xa4/0x11c)
       [<c006b14c>] (lock_acquire) from [<c04e3880>] (down_read+0x40/0x7c)
       [<c04e3880>] (down_read) from [<c001dc04>] (do_page_fault+0xa8/0x428)
       [<c001dc04>] (do_page_fault) from [<c00084ec>] (do_DataAbort+0x44/0xa8)
       [<c00084ec>] (do_DataAbort) from [<c0013a1c>] (__dabt_svc+0x3c/0x60)
       Exception stack(0xed7c5ae0 to 0xed7c5b28)
       5ae0: ed7c5b5c b6dadff4 ffffffec 00000000 b6dadff4 ebc08000 00000000 ebc08000
       5b00: 0000007e 00000000 ed7c4000 ed7c5b94 00000014 ed7c5b2c c001a438 c0236c60
       5b20: 00000013 ffffffff
       [<c0013a1c>] (__dabt_svc) from [<c0236c60>] (__copy_from_user+0xa4/0x3a4)
      Acked-by: default avatarSteve Capper <steve.capper@linaro.org>
      Signed-off-by: default avatarJean Pihet <jean.pihet@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      4b2974fa
    • Jean Pihet's avatar
      ARM: perf: Check that current->mm is alive before getting user callchain · a7cc9100
      Jean Pihet authored
      An event may occur when an mm is already released.
      
      As per commit 20afc60f
       'x86, perf: Check that current->mm is alive before getting user callchain'
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarJean Pihet <jean.pihet@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      a7cc9100
  3. 02 Jul, 2014 8 commits
  4. 01 Jul, 2014 2 commits
    • Uwe Kleine-König's avatar
      ARM: make user_addr_max more robust · 83de911c
      Uwe Kleine-König authored
      With CONFIG_MMU=y get_fs() returns current_thread_info()->addr_limit
      which is initialized as USER_DS (which in turn is defined to TASK_SIZE)
      for userspace processes. At least theoretically
      current_thread_info()->addr_limit is changable by set_fs() to a
      different limit, so checking for KERNEL_DS is more robust.
      
      With !CONFIG_MMU get_fs returns KERNEL_DS. To see what the old variant
      did you'd have to find out that USER_DS == KERNEL_DS which isn't needed
      any more with the variant this patch introduces. So it's a bit easier to
      understand, too.
      
      Also if the limit was changed this limit should be returned, not
      TASK_SIZE.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      83de911c
    • Uwe Kleine-König's avatar
      ARM: nommu: don't limit TASK_SIZE · 03eca200
      Uwe Kleine-König authored
      With TASK_SIZE set to the maximal RAM address booting in some XIP
      configurations fails (e.g. on efm32 DK3750). The problem is that
      strncpy_from_user et al. check for the address not being above TASK_SIZE
      (since 8c56cc8b (ARM: 7449/1: use generic strnlen_user and
      strncpy_from_user functions)) and this makes booting fail if the XIP
      flash is above the RAM address space.
      
      This change is in line with blackfin, frv and m68k which also use
      0xffffffff for TASK_SIZE with !MMU.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      03eca200
  5. 29 Jun, 2014 10 commits
  6. 28 Jun, 2014 15 commits
    • Linus Torvalds's avatar
      Merge tag 'spi-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 24b414d5
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A few driver specific fixes, the biggest one being a fix for the newly
        added Qualcomm SPI controller driver to make it not use its internal
        chip select due to hardware bugs, replacing it with GPIOs"
      
      * tag 'spi-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: qup: Remove chip select function
        spi: qup: Fix order of spi_register_master
        spi: sh-sci: fix use-after-free in sh_sci_spi_remove()
        spi/pxa2xx: fix incorrect SW mode chipselect setting for BayTrail LPSS SPI
      24b414d5
    • Linus Torvalds's avatar
      Merge tag 'regulator-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 4194976b
      Linus Torvalds authored
      Pull regulator fixes from Mark Brown:
       "Several driver specific fixes here, the palmas fixes being especially
        important for a range of boards - the recent updates to support new
        devices have introduced several regressions"
      
      * tag 'regulator-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: tps65218: Correct the the config register for LDO1
        regulator: tps65218: Add the missing of_node assignment in probe
        regulator: palmas: fix typo in enable_reg calculation
        regulator: bcm590xx: fix vbus name
        regulator: palmas: Fix SMPS enable/disable/is_enabled
      4194976b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · eb477e03
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "Mostly minor fixes this time around.  The highlights include:
      
         - iscsi-target CHAP authentication fixes to enforce explicit key
           values (Tejas Vaykole + rahul.rane)
         - fix a long-standing OOPs in target-core when a alua configfs
           attribute is accessed after port symlink has been removed.
           (Sebastian Herbszt)
         - fix a v3.10.y iscsi-target regression causing the login reject
           status class/detail to be ignored (Christoph Vu-Brugier)
         - fix a v3.10.y iscsi-target regression to avoid rejecting an
           existing ITT during Data-Out when data-direction is wrong (Santosh
           Kulkarni + Arshad Hussain)
         - fix a iscsi-target related shutdown deadlock on UP kernels (Mikulas
           Patocka)
         - fix a v3.16-rc1 build issue with vhost-scsi + !CONFIG_NET (MST)"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        iscsi-target: fix iscsit_del_np deadlock on unload
        iovec: move memcpy_from/toiovecend to lib/iovec.c
        iscsi-target: Avoid rejecting incorrect ITT for Data-Out
        tcm_loop: Fix memory leak in tcm_loop_submission_work error path
        iscsi-target: Explicily clear login response PDU in exception path
        target: Fix left-over se_lun->lun_sep pointer OOPs
        iscsi-target; Enforce 1024 byte maximum for CHAP_C key value
        iscsi-target: Convert chap_server_compute_md5 to use kstrtoul
      eb477e03
    • Mark Brown's avatar
    • Mark Brown's avatar
      Merge remote-tracking branches 'regulator/fix/bcm590xx',... · 11767484
      Mark Brown authored
      Merge remote-tracking branches 'regulator/fix/bcm590xx', 'regulator/fix/palmas' and 'regulator/fix/tps65218' into regulator-linus
      11767484
    • Mikulas Patocka's avatar
      iscsi-target: fix iscsit_del_np deadlock on unload · 81a9c5e7
      Mikulas Patocka authored
      On uniprocessor preemptible kernel, target core deadlocks on unload. The
      following events happen:
      * iscsit_del_np is called
      * it calls send_sig(SIGINT, np->np_thread, 1);
      * the scheduler switches to the np_thread
      * the np_thread is woken up, it sees that kthread_should_stop() returns
        false, so it doesn't terminate
      * the np_thread clears signals with flush_signals(current); and goes back
        to sleep in iscsit_accept_np
      * the scheduler switches back to iscsit_del_np
      * iscsit_del_np calls kthread_stop(np->np_thread);
      * the np_thread is waiting in iscsit_accept_np and it doesn't respond to
        kthread_stop
      
      The deadlock could be resolved if the administrator sends SIGINT signal to
      the np_thread with killall -INT iscsi_np
      
      The reproducible deadlock was introduced in commit
      db6077fd, but the thread-stopping code was
      racy even before.
      
      This patch fixes the problem. Using kthread_should_stop to stop the
      np_thread is unreliable, so we test np_thread_state instead. If
      np_thread_state equals ISCSI_NP_THREAD_SHUTDOWN, the thread exits.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      81a9c5e7
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 3e7b256c
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
      
       - fix VT-d regression with handling multiple RMRR entries per device
      
       - fix a small race that was left in the mmu_notifier handling in the
         AMD IOMMUv2 driver
      
      * tag 'iommu-fixes-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix small race between invalidate_range_end/start
        iommu/vt-d: fix bug in handling multiple RMRRs for the same PCI device
      3e7b256c
    • Linus Torvalds's avatar
      Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d1fc98ba
      Linus Torvalds authored
      Pull x86 fixes from Peter Anvin:
       "A pile of fixes related to the VDSO, EFI and 32-bit badsys handling.
      
        It turns out that removing the section headers from the VDSO breaks
        gdb, so this puts back most of them.  A very simple typo broke
        rt_sigreturn on some versions of glibc, with obviously disastrous
        results.  The rest is pretty much fixes for the corresponding fallout.
      
        The EFI fixes fixes an arithmetic overflow on 32-bit systems and
        quiets some build warnings.
      
        Finally, when invoking an invalid system call number on x86-32, we
        bypass a bunch of handling, which can make the audit code oops"
      
      * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi-pstore: Fix an overflow on 32-bit builds
        x86/vdso: Error out in vdso2c if DT_RELA is present
        x86/vdso: Move DISABLE_BRANCH_PROFILING into the vdso makefile
        x86_32, signal: Fix vdso rt_sigreturn
        x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508)
        x86/vdso: Create .build-id links for unstripped vdso files
        x86/vdso: Remove some redundant in-memory section headers
        x86/vdso: Improve the fake section headers
        x86/vdso2c: Use better macros for ELF bitness
        x86/vdso: Discard the __bug_table section
        efi: Fix compiler warnings (unused, const, type)
      d1fc98ba
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · c9a60666
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "This is dominated by a large number of changes necessary for the MIPS
        BPF code.  code.  Aside of that there are
      
         - a fix for the MSC system controller support code.
         - a Turbochannel fix.
         - a recordmcount fix that's MIPS-specific.
         - barrier fixes to smp-cps / pm-cps after unrelated changes elsewhere
           in the kernel.
         - revert support for MSA registers in the signal frames.  The
           reverted patch did modify the signal stack frame which of course is
           inacceptable.
         - fix math-emu build breakage with older compilers.
         - some related cleanup.
         - fix Lasat build error if CONFIG_CRC32 isn't set to y by the user"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (27 commits)
        MIPS: Lasat: Fix build error if CRC32 is not enabled.
        TC: Handle device_register() errors.
        MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region
        MIPS: bpf: Fix stack space allocation for BPF memwords on MIPS64
        MIPS: BPF: Use 32 or 64-bit load instruction to load an address to register
        MIPS: bpf: Fix PKT_TYPE case for big-endian cores
        MIPS: BPF: Prevent kernel fall over for >=32bit shifts
        MIPS: bpf: Drop update_on_xread and always initialize the X register
        MIPS: bpf: Fix is_range() semantics
        MIPS: bpf: Use pr_debug instead of pr_warn for unhandled opcodes
        MIPS: bpf: Fix return values for VLAN_TAG_PRESENT case
        MIPS: bpf: Use correct mask for VLAN_TAG case
        MIPS: bpf: Fix branch conditional for BPF_J{GT/GE} cases
        MIPS: bpf: Add SEEN_SKB to flags when looking for the PKT_TYPE
        MIPS: bpf: Use 'andi' instead of 'and' for the VLAN cases
        MIPS: bpf: Return error code if the offset is a negative number
        MIPS: bpf: Use the LO register to get division's quotient
        MIPS: mm: uasm: Fix lh micro-assembler instruction
        MIPS: uasm: Add SLT uasm instruction
        MIPS: uasm: Add s3s1s2 instruction builder
        ...
      c9a60666
    • Linus Torvalds's avatar
      Merge tag 'arc-fixes-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 1857a5b6
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
       "Some SMP changes, a ptrace request for NPTL debugging, bunch of build
        breakages/warnings"
      
      * tag 'arc-fixes-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: [SMP] Enable icache coherency
        ARC: [SMP] Fix IPI IRQ registration
        ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
        ARC: optimize kernel bss clearing in early boot code
        ARC: Fix build breakage for !CONFIG_ARC_DW2_UNWIND
        ARC: fix build warning in devtree
        ARC: remove checks for CONFIG_ARC_MMU_V4
      1857a5b6
    • Linus Torvalds's avatar
      Merge tag 'compress-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 8dd68eb3
      Linus Torvalds authored
      Pull compress bugfix from Greg KH:
       "Here is another lz4 bugfix for 3.16-rc3 that resolves a reported issue
        with that compression algorithm"
      
      * tag 'compress-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        lz4: fix another possible overrun
      8dd68eb3
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.16-rc1-tag' of... · 772205d8
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb
      
      Pull swiotlb bugfix from Konrad Rzeszutek Wilk:
       "One bug-fix that had been in tree for quite some time.  We had assumed
        that the physical address zero was invalid and would fail it.  But
        that is not true and on some architectures it is not reserved and
        valid.  This fixes it"
      
      * tag 'stable/for-linus-3.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
        swiotlb: don't assume PA 0 is invalid
      772205d8
    • Linus Torvalds's avatar
      Merge tag 'sound-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · cf0d1356
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Here includes a few patchset for fixing mostly HD-audio issues in
        addition to a patch assuring the compress API bytes alignment and a
        fix for the die-hard existing race condition at USB-audio
        disconnection.  The volume looks big in Realtek HD-audio code, but
        it's just a translation of the fixup tables, and the actual changes
        are rather trivial"
      
      * tag 'sound-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - restore BCLK M/N values when resuming HSW/BDW display controller
        ALSA: usb-audio: Fix races at disconnection and PCM closing
        ALSA: hda - Adjust speaker HPF and add LED support for HP Spectre 13
        ALSA: hda - Make the pin quirk tables use the SND_HDA_PIN_QUIRK macro
        ALSA: hda - Make a SND_HDA_PIN_QUIRK macro
        ALSA: hda - Add pin quirk for Dell XPS 15
        ALSA: hda - hdmi: call overridden init on resume
        ALSA: hda - Fix usage of "model" module parameter
        ALSA: compress: fix the struct alignment to 4 bytes
      cf0d1356
    • Linus Torvalds's avatar
      Merge tag 'mfd-fixes-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 5ded6ea4
      Linus Torvalds authored
      Pull MFD fixes from Lee Jones:
       "Couple of simple fixes due for the v3.16 -rcs"
      
      * tag 'mfd-fixes-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
        mfd: ab8500: Fix dt irq mapping
        mfd: davinci: Voicecodec needs regmap_mmio
        mfd: STw481x: Allow modular build
        mfd: UCB1x00: Enable modular build
      5ded6ea4
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · c163b524
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Exynos, i915 and msm fixes and one core fix.
      
        exynos:
           hdmi power off and mixer issues
      
        msm:
           iommu, build fixes,
      
        i915:
           regression races and warning fixes"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
        drm/i915: vlv_prepare_pll is only needed in case of non DSI interfaces
        drm: fix NULL pointer access by wrong ioctl
        drm/exynos: enable vsync interrupt while waiting for vblank
        drm/exynos: soft reset mixer before reconfigure after power-on
        drm/exynos: allow multiple layer updates per vsync for mixer
        drm/i915: Hold the table lock whilst walking the file's idr and counting the objects in debugfs
        drm/i915: BDW: Adding Reserved PCI IDs.
        drm/i915: Only mark the ctx as initialised after a SET_CONTEXT operation
        drm/exynos: stop mixer before gating clocks during poweroff
        drm/exynos: set power state variable after enabling clocks and power
        drm/exynos: disable unused windows on apply
        drm/exynos: Fix de-registration ordering
        drm/exynos: change zero to NULL for sparse
        drm/exynos: dpi: Fix NULL pointer dereference with legacy bindings
        drm/exynos: hdmi: fix power order issue
        drm/i915: default to having backlight if VBT not available
        drm/i915: cache hw power well enabled state
        drm/msm: fix IOMMU cleanup for -EPROBE_DEFER
        drm/msm: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE)
        drm/msm/hdmi: set hdp clock rate before prepare_enable
        ...
      c163b524
  7. 27 Jun, 2014 2 commits