Skip to content
  1. Jul 14, 2018
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 4659fc84
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Things have been quite slow, only 6 RC patches have been sent to the
        list. Regression, user visible bugs, and crashing fixes:
      
         - cxgb4 could wrongly fail MR creation due to a typo
      
         - various crashes if the wrong QP type is mixed in with APIs that
           expect other types
      
         - syzkaller oops
      
         - using ERR_PTR and NULL together cases HFI1 to crash in some cases
      
         - mlx5 memory leak in error unwind"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path
        RDMA/uverbs: Don't fail in creation of multiple flows
        IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values
        RDMA/uverbs: Fix slab-out-of-bounds in ib_uverbs_ex_create_flow
        RDMA/uverbs: Protect from attempts to create flows on unsupported QP
        iw_cxgb4: correctly enforce the max reg_mr depth
      4659fc84
    • Linus Torvalds's avatar
      Merge tag 'vfio-v4.18-rc5' of git://github.com/awilliam/linux-vfio · 2a7e1211
      Linus Torvalds authored
      Pull VFIO fix from Alex Williamson:
       "Fix deadlock in mbochs sample driver (Alexey Khoroshilov)"
      
      * tag 'vfio-v4.18-rc5' of git://github.com/awilliam/linux-vfio:
        sample: vfio-mdev: avoid deadlock in mdev_access()
      2a7e1211
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.18-2' of... · 79facf30
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - update Kbuild and Kconfig documents
      
       - sanitize -I compiler option handling
      
       - update extract-vmlinux script to recognize LZ4 and ZSTD
      
       - fix tools Makefiles
      
       - update tags.sh to handle __ro_after_init
      
       - suppress warnings in case getconf does not recognize LFS_* parameters
      
      * tag 'kbuild-fixes-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: suppress warnings from 'getconf LFS_*'
        scripts/tags.sh: add __ro_after_init
        tools: build: Use HOSTLDFLAGS with fixdep
        tools: build: Fixup host c flags
        tools build: fix # escaping in .cmd files for future Make
        scripts: teach extract-vmlinux about LZ4 and ZSTD
        kbuild: remove duplicated comments about PHONY
        kbuild: .PHONY is not a variable, but PHONY is
        kbuild: do not drop -I without parameter
        kbuild: document the KBUILD_KCONFIG env. variable
        kconfig: update user kconfig tools doc.
        kbuild: delete INSTALL_FW_PATH from kbuild documentation
        kbuild: update ARCH alias info for sparc
        kbuild: update ARCH alias info for sh
      79facf30
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 9d2e3489
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Catalin's out enjoying the sunshine, so I'm sending the fixes for a
        couple of weeks (although there hopefully won't be any more!).
      
        We've got a revert of a previous fix because it broke the build with
        some distro toolchains and a preemption fix when detemining whether or
        not the SIMD unit is in use.
      
        Summary:
      
         - Revert back to the 'linux' target for LD, as 'elf' breaks some
           distributions
      
         - Fix preemption race when testing whether the vector unit is in use
           or not"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: neon: Fix function may_use_simd() return error status
        Revert "arm64: Use aarch64elf and aarch64elfb emulation mode variants"
      9d2e3489
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · e6ef7607
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A couple of small fixes this time around from Steven for an
        interaction between ftrace and kernel read-only protection, and
        Vladimir for nommu"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8780/1: ftrace: Only set kernel memory back to read-only after boot
        ARM: 8775/1: NOMMU: Use instr_sync instead of plain isb in common code
      e6ef7607
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.18-rc3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 35a84f34
      Linus Torvalds authored
      Pull tracing fixlet from Steven Rostedt:
       "Joel Fernandes asked to add a feature in tracing that Android had its
        own patch internally for. I took it back in 4.13. Now he realizes that
        he had a mistake, and swapped the values from what Android had. This
        means that the old Android tools will break when using a new kernel
        that has the new feature on it.
      
        The options are:
      
         1. To swap it back to what Android wants.
         2. Add a command line option or something to do the swap
         3. Just let Android carry a patch that swaps it back
      
        Since it requires setting a tracing option to enable this anyway, I
        doubt there are other users of this than Android. Thus, I've decided
        to take option 1. If someone else is actually depending on the order
        that is in the kernel, then we will have to revert this change and go
        to option 2 or 3"
      
      * tag 'trace-v4.18-rc3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Reorder display of TGID to be after PID
      35a84f34
    • Linus Torvalds's avatar
      Merge tag 'sound-4.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · a0092e5e
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just a few HD-auio fixes: one fix for a possible mutex deadlock at
        HDMI hotplug handling is somewhat subtle and delicate, while the rest
        are usual device-specific quirks"
      
      * tag 'sound-4.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/ca0132: Update a pci quirk device name
        ALSA: hda/ca0132: Add Recon3Di quirk for Gigabyte G1.Sniper Z97
        ALSA: hda/realtek - two more lenovo models need fixup of MIC_LOCATION
        ALSA: hda - Handle pm failure during hotplug
      a0092e5e
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-fixes-4.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 4596f554
      Linus Torvalds authored
      Pull libnvdimm fixes from Dave Jiang:
      
       - ensure that a variable passed in by reference to acpi_nfit_ctl is
         always set to a value. An incremental patch is provided due to notice
         from testing in -next. The rest of the commits did not exhibit
         issues.
      
       - fix a return path in nsio_rw_bytes() that was not returning "bytes
         remain" as expected for the function.
      
       - address an issue where applications polling on scrub-completion for
         the NVDIMM may falsely wakeup and read the wrong state value and
         cause hang.
      
       - change the test unit persistent capability attribute to fix up a
         broken assumption in the unit test infrastructure wrt the
         'write_cache' attribute
      
       - ratelimit dev_info() in the dax device check_vma() function since
         this is easily triggered from userspace
      
      * tag 'libnvdimm-fixes-4.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nfit: fix unchecked dereference in acpi_nfit_ctl
        acpi, nfit: Fix scrub idle detection
        tools/testing/nvdimm: advertise a write cache for nfit_test
        acpi/nfit: fix cmd_rc for acpi_nfit_ctl to always return a value
        dev-dax: check_vma: ratelimit dev_info-s
        libnvdimm, pmem: Fix memcpy_mcsafe() return code handling in nsio_rw_bytes()
      4596f554
  2. Jul 13, 2018
    • Joel Fernandes (Google)'s avatar
      tracing: Reorder display of TGID to be after PID · f8494fa3
      Joel Fernandes (Google) authored
      Currently ftrace displays data in trace output like so:
      
                                             _-----=> irqs-off
                                            / _----=> need-resched
                                           | / _---=> hardirq/softirq
                                           || / _--=> preempt-depth
                                           ||| /     delay
                  TASK-PID   CPU    TGID   ||||    TIMESTAMP  FUNCTION
                     | |       |      |    ||||       |         |
                  bash-1091  [000] ( 1091) d..2    28.313544: sched_switch:
      
      However Android's trace visualization tools expect a slightly different
      format due to an out-of-tree patch patch that was been carried for a
      decade, notice that the TGID and CPU fields are reversed:
      
                                             _-----=> irqs-off
                                            / _----=> need-resched
                                           | / _---=> hardirq/softirq
                                           || / _--=> preempt-depth
                                           ||| /     delay
                  TASK-PID    TGID   CPU   ||||    TIMESTAMP  FUNCTION
                     | |        |      |   ||||       |         |
                  bash-1091  ( 1091) [002] d..2    64.965177: sched_switch:
      
      From kernel v4.13 onwards, during which TGID was introduced, tracing
      with systrace on all Android kernels will break (most Android kernels
      have been on 4.9 with Android patches, so this issues hasn't been seen
      yet). From v4.13 onwards things will break.
      
      The chrome browser's tracing tools also embed the systrace viewer which
      uses the legacy TGID format and updates to that are known to be
      difficult to make.
      
      Considering this, I suggest we make this change to the upstream kernel
      and backport it to all Android kernels. I believe this feature is merged
      recently enough into the upstream kernel that it shouldn't be a problem.
      Also logically, IMO it makes more sense to group the TGID with the
      TASK-PID and the CPU after these.
      
      Link: http://lkml.kernel.org/r/20180626000822.113931-1-joel@joelfernandes.org
      
      
      
      Cc: jreck@google.com
      Cc: tkjos@google.com
      Cc: stable@vger.kernel.org
      Fixes: 441dae8f ("tracing: Add support for display of tgid in trace output")
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      f8494fa3
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-4.18-rc5' of git://git.infradead.org/linux-mtd · 63f04777
      Linus Torvalds authored
      Pull MTD fix from Boris Brezillon:
       "A SPI NOR fix to fix a timeout in the cadence QSPI controller driver"
      
      * tag 'mtd/fixes-for-4.18-rc5' of git://git.infradead.org/linux-mtd:
        mtd: spi-nor: cadence-quadspi: Fix direct mode write timeouts
      63f04777
  3. Jul 12, 2018
  4. Jul 11, 2018
    • Vladimir Murzin's avatar
      ARM: 8775/1: NOMMU: Use instr_sync instead of plain isb in common code · cea39477
      Vladimir Murzin authored
      
      
      Greg reported that commit 3c241210 ("ARM: 8756/1: NOMMU: Postpone
      MPU activation till __after_proc_init") is causing breakage for the
      old Versatile platform in no-MMU mode (with out-of-tree patches):
      
        AS      arch/arm/kernel/head-nommu.o
      arch/arm/kernel/head-nommu.S: Assembler messages:
      arch/arm/kernel/head-nommu.S:180: Error: selected processor does not support `isb' in ARM mode
      scripts/Makefile.build:417: recipe for target 'arch/arm/kernel/head-nommu.o' failed
      make[2]: *** [arch/arm/kernel/head-nommu.o] Error 1
      Makefile:1034: recipe for target 'arch/arm/kernel' failed
      make[1]: *** [arch/arm/kernel] Error 2
      
      Since the code is common for all NOMMU builds usage of the isb was a
      bad idea (please, note that isb also used in MPU related code which is
      fine because MPU has dependency on CPU_V7/CPU_V7M), instead use more
      robust instr_sync assembler macro.
      
      Fixes: 3c241210 ("ARM: 8756/1: NOMMU: Postpone MPU activation till __after_proc_init")
      Reported-by: default avatarGreg Ungerer <gerg@kernel.org>
      Tested-by: default avatarGreg Ungerer <gerg@kernel.org>
      Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      cea39477
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_4.18_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 1e09177a
      Linus Torvalds authored
      Pull MIPS fixes from Paul Burton:
       "A couple more MIPS fixes for 4.18:
      
         - Use async IPIs for arch_trigger_cpumask_backtrace() in order to
           avoid warnings & deadlocks, fixing a problem introduced in v3.19
           with the fix trivial to backport as far as v4.9.
      
         - Fix ioremap()'s MMU/TLB backed path to avoid spuriously rejecting
           valid requests due to an incorrect belief that the memory region is
           backed by potentially-in-use RAM. This fixes a regression in v4.2"
      
      * tag 'mips_fixes_4.18_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: Fix ioremap() RAM check
        MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
        MIPS: Call dump_stack() from show_regs()
      1e09177a
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2018-07-10' of git://anongit.freedesktop.org/drm/drm · 30c2c32d
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This just contains some etnaviv fixes and a MAINTAINERS update for the
        new drm tree locations"
      
      * tag 'drm-fixes-2018-07-10' of git://anongit.freedesktop.org/drm/drm:
        MAINTAINERS: update drm tree
        drm/etnaviv: bring back progress check in job timeout handler
        drm/etnaviv: Fix driver unregistering
        drm/etnaviv: Check for platform_device_register_simple() failure
      30c2c32d
  5. Jul 10, 2018
  6. Jul 09, 2018
    • Gustavo A. R. Silva's avatar
      HID: hiddev: fix potential Spectre v1 · 4f65245f
      Gustavo A. R. Silva authored
      uref->field_index, uref->usage_index, finfo.field_index and cinfo.index can be
      indirectly controlled by user-space, hence leading to a potential exploitation
      of the Spectre variant 1 vulnerability.
      
      This issue was detected with the help of Smatch:
      
      drivers/hid/usbhid/hiddev.c:473 hiddev_ioctl_usage() warn: potential spectre issue 'report->field' (local cap)
      drivers/hid/usbhid/hiddev.c:477 hiddev_ioctl_usage() warn: potential spectre issue 'field->usage' (local cap)
      drivers/hid/usbhid/hiddev.c:757 hiddev_ioctl() warn: potential spectre issue 'report->field' (local cap)
      drivers/hid/usbhid/hiddev.c:801 hiddev_ioctl() warn: potential spectre issue 'hid->collection' (local cap)
      
      Fix this by sanitizing such structure fields before using them to index
      report->field, field->usage and hid->collection
      
      Notice that given that speculation windows are large, the policy is
      to kill the speculation on the first load and not worry if it can be
      completed with a dependent load/store [1].
      
      [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
      
      
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      4f65245f
    • Jason Andryuk's avatar
      HID: i2c-hid: Fix "incomplete report" noise · ef6eaf27
      Jason Andryuk authored
      
      
      Commit ac75a041 ("HID: i2c-hid: fix size check and type usage") started
      writing messages when the ret_size is <= 2 from i2c_master_recv.  However, my
      device i2c-DLL07D1 returns 2 for a short period of time (~0.5s) after I stop
      moving the pointing stick or touchpad.  It varies, but you get ~50 messages
      each time which spams the log hard.
      
      [  95.925055] i2c_hid i2c-DLL07D1:01: i2c_hid_get_input: incomplete report (83/2)
      
      This has also been observed with a i2c-ALP0017.
      
      [ 1781.266353] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
      
      Only print the message when ret_size is totally invalid and less than 2 to cut
      down on the log spam.
      
      Fixes: ac75a041 ("HID: i2c-hid: fix size check and type usage")
      Reported-by: default avatarJohn Smith <john-s-84@gmx.net>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJason Andryuk <jandryuk@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      ef6eaf27