1. 02 Apr, 2018 8 commits
    • Linus Torvalds's avatar
      Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 86bbbeba
      Linus Torvalds authored
      Pull x86 RAS updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - AMD MCE support/decoding improvements (Yazen Ghannam)
      
         - general MCE header cleanups and reorganization (Borislav Petkov)"
      
      * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert "x86/mce/AMD: Collect error info even if valid bits are not set"
        x86/MCE: Cleanup and complete struct mce fields definitions
        x86/mce/AMD: Carve out SMCA get_block_address() code
        x86/mce/AMD: Get address from already initialized block
        x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type
        x86/mce/AMD: Pass the bank number to smca_get_bank_type()
        x86/mce/AMD: Collect error info even if valid bits are not set
        x86/mce: Issue the 'mcelog --ascii' message only on !AMD
        x86/mce: Convert 'struct mca_config' bools to a bitfield
        x86/mce: Put private structures and definitions into the internal header
      86bbbeba
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 486adcea
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "The main kernel side changes were:
      
         - Modernize the kprobe and uprobe creation/destruction tooling ABIs:
      
           The existing text based APIs (kprobe_events and uprobe_events in
           tracefs), are naive, limited ABIs in that they require user-space
           to clean up after themselves, which is both difficult and fragile
           if the tool is buggy or exits unexpectedly. In other words they are
           not really suited for modern, robust tooling.
      
           So introduce a modern, file descriptor based ABI that does not have
           these limitations: introduce the 'perf_kprobe' and 'perf_uprobe'
           PMUs and extend the perf_event_open() syscall to create events with
           a kprobe/uprobe attached to them. These [k,u]probe are associated
           with this file descriptor, so they are not available in tracefs.
      
           (Song Liu)
      
         - Intel Cannon Lake CPU support (Harry Pan)
      
         - Intel PT cleanups (Alexander Shishkin)
      
         - Improve the performance of pinned/flexible event groups by using RB
           trees (Alexey Budankov)
      
         - Add PERF_EVENT_IOC_MODIFY_ATTRIBUTES which allows the modification
           of hardware breakpoints, which new ABI variant massively speeds up
           existing tooling that uses hardware breakpoints to instrument (and
           debug) memory usage.
      
           (Milind Chabbi, Jiri Olsa)
      
         - Various Intel PEBS handling fixes and improvements, and other Intel
           PMU improvements (Kan Liang)
      
         - Various perf core improvements and optimizations (Peter Zijlstra)
      
         - ... misc cleanups, fixes and updates.
      
        There's over 200 tooling commits, here's an (imperfect) list of
        highlights:
      
         - 'perf annotate' improvements:
      
            * Recognize and handle jumps to other functions as calls, which
              improves the navigation along jumps and back. (Arnaldo Carvalho
              de Melo)
      
            * Add the 'P' hotkey in TUI annotation to dump annotation output
              into a file, to ease e-mail reporting of annotation details.
              (Arnaldo Carvalho de Melo)
      
            * Add an IPC/cycles column to the TUI (Jin Yao)
      
            * Improve s390 assembly annotation (Thomas Richter)
      
            * Refactor the output formatting logic to better separate it into
              interactive and non-interactive features and add the --stdio2
              output variant to demonstrate this. (Arnaldo Carvalho de Melo)
      
         - 'perf script' improvements:
      
            * Add Python 3 support (Jaroslav Škarvada)
      
            * Add --show-round-event (Jiri Olsa)
      
         - 'perf c2c' improvements:
      
            * Add NUMA analysis support (Jiri Olsa)
      
         - 'perf trace' improvements:
      
            * Improve PowerPC support (Ravi Bangoria)
      
         - 'perf inject' improvements:
      
            * Integrate ARM CoreSight traces (Robert Walker)
      
         - 'perf stat' improvements:
      
            * Add the --interval-count option (yuzhoujian)
      
            * Add the --timeout option (yuzhoujian)
      
         - 'perf sched' improvements (Changbin Du)
      
         - Vendor events improvements :
      
            * Add IBM s390 vendor events (Thomas Richter)
      
            * Add and improve arm64 vendor events (John Garry, Ganapatrao
              Kulkarni)
      
            * Update POWER9 vendor events (Sukadev Bhattiprolu)
      
         - Intel PT tooling improvements (Adrian Hunter)
      
         - PMU handling improvements (Agustin Vega-Frias)
      
         - Record machine topology in perf.data (Jiri Olsa)
      
         - Various overwrite related cleanups (Kan Liang)
      
         - Add arm64 dwarf post unwind support (Kim Phillips, Jean Pihet)
      
         - ... and lots of other changes, cleanups and fixes, see the shortlog
           and Git history for details"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (262 commits)
        perf/x86/intel: Enable C-state residency events for Cannon Lake
        perf/x86/intel: Add Cannon Lake support for RAPL profiling
        perf/x86/pt, coresight: Clean up address filter structure
        perf vendor events s390: Add JSON files for IBM z14
        perf vendor events s390: Add JSON files for IBM z13
        perf vendor events s390: Add JSON files for IBM zEC12 zBC12
        perf vendor events s390: Add JSON files for IBM z196
        perf vendor events s390: Add JSON files for IBM z10EC z10BC
        perf mmap: Be consistent when checking for an unmaped ring buffer
        perf mmap: Fix accessing unmapped mmap in perf_mmap__read_done()
        perf build: Fix check-headers.sh opts assignment
        perf/x86: Update rdpmc_always_available static key to the modern API
        perf annotate: Use absolute addresses to calculate jump target offsets
        perf annotate: Defer searching for comma in raw line till it is needed
        perf annotate: Support jumping from one function to another
        perf annotate: Add "_local" to jump/offset validation routines
        perf python: Reference Py_None before returning it
        perf annotate: Mark jumps to outher functions with the call arrow
        perf annotate: Pass function descriptor to its instruction parsing routines
        perf annotate: No need to calculate notes->start twice
        ...
      486adcea
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 701f3b31
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "The main changes in the locking subsystem in this cycle were:
      
         - Add the Linux Kernel Memory Consistency Model (LKMM) subsystem,
           which is an an array of tools in tools/memory-model/ that formally
           describe the Linux memory coherency model (a.k.a.
           Documentation/memory-barriers.txt), and also produce 'litmus tests'
           in form of kernel code which can be directly executed and tested.
      
           Here's a high level background article about an earlier version of
           this work on LWN.net:
      
              https://lwn.net/Articles/718628/
      
           The design principles:
      
            "There is reason to believe that Documentation/memory-barriers.txt
             could use some help, and a major purpose of this patch is to
             provide that help in the form of a design-time tool that can
             produce all valid executions of a small fragment of concurrent
             Linux-kernel code, which is called a "litmus test". This tool's
             functionality is roughly similar to a full state-space search.
             Please note that this is a design-time tool, not useful for
             regression testing. However, we hope that the underlying
             Linux-kernel memory model will be incorporated into other tools
             capable of analyzing large bodies of code for regression-testing
             purposes."
      
           [...]
      
            "A second tool is klitmus7, which converts litmus tests to
             loadable kernel modules for direct testing. As with herd7, the
             klitmus7 code is freely available from
      
               http://diy.inria.fr/sources/index.html
      
             (and via "git" at https://github.com/herd/herdtools7)"
      
           [...]
      
           Credits go to:
      
            "This patch was the result of a most excellent collaboration
             founded by Jade Alglave and also including Alan Stern, Andrea
             Parri, and Luc Maranget."
      
           ... and to the gents listed in the MAINTAINERS entry:
      
              LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
              M:      Alan Stern <stern@rowland.harvard.edu>
              M:      Andrea Parri <parri.andrea@gmail.com>
              M:      Will Deacon <will.deacon@arm.com>
              M:      Peter Zijlstra <peterz@infradead.org>
              M:      Boqun Feng <boqun.feng@gmail.com>
              M:      Nicholas Piggin <npiggin@gmail.com>
              M:      David Howells <dhowells@redhat.com>
              M:      Jade Alglave <j.alglave@ucl.ac.uk>
              M:      Luc Maranget <luc.maranget@inria.fr>
              M:      "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      
           The LKMM project already found several bugs in Linux locking
           primitives and improved the understanding and the documentation of
           the Linux memory model all around.
      
         - Add KASAN instrumentation to atomic APIs (Dmitry Vyukov)
      
         - Add RWSEM API debugging and reorganize the lock debugging Kconfig
           (Waiman Long)
      
         - ... misc cleanups and other smaller changes"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
        locking/Kconfig: Restructure the lock debugging menu
        locking/Kconfig: Add LOCK_DEBUGGING_SUPPORT to make it more readable
        locking/rwsem: Add DEBUG_RWSEMS to look for lock/unlock mismatches
        lockdep: Make the lock debug output more useful
        locking/rtmutex: Handle non enqueued waiters gracefully in remove_waiter()
        locking/atomic, asm-generic, x86: Add comments for atomic instrumentation
        locking/atomic, asm-generic: Add KASAN instrumentation to atomic operations
        locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h
        locking/atomic, asm-generic: Add asm-generic/atomic-instrumented.h
        locking/xchg/alpha: Remove superfluous memory barriers from the _local() variants
        tools/memory-model: Finish the removal of rb-dep, smp_read_barrier_depends(), and lockless_dereference()
        tools/memory-model: Add documentation of new litmus test
        tools/memory-model: Remove mention of docker/gentoo image
        locking/memory-barriers: De-emphasize smp_read_barrier_depends() some more
        locking/lockdep: Show unadorned pointers
        mutex: Drop linkage.h from mutex.h
        tools/memory-model: Remove rb-dep, smp_read_barrier_depends, and lockless_dereference
        tools/memory-model: Convert underscores to hyphens
        tools/memory-model: Add a S lock-based external-view litmus test
        tools/memory-model: Add required herd7 version to README file
        ...
      701f3b31
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8747a291
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "The main RCU subsystem changes in this cycle were:
      
        - Miscellaneous fixes, perhaps most notably removing obsolete code
          whose only purpose in life was to gather information for the
          now-removed RCU debugfs facility. Other notable changes include
          removing NO_HZ_FULL_ALL in favor of the nohz_full kernel boot
          parameter, minor optimizations for expedited grace periods, some
          added tracing, creating an RCU-specific workqueue using Tejun's new
          WQ_MEM_RECLAIM flag, and several cleanups to code and comments.
      
        - SRCU cleanups and optimizations.
      
        - Torture-test updates, perhaps most notably the adding of ARMv8
          support, but also including numerous cleanups and usability fixes"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits)
        rcu: Create RCU-specific workqueues with rescuers
        torture: Provide more sensible nreader/nwriter defaults for rcuperf
        torture: Grace periods do not piggyback off of themselves
        torture: Adjust rcuperf trace processing to allow for workqueues
        torture: Default jitter off when running rcuperf
        torture: Specify qemu memory size with --memory argument
        rcutorture: Add basic ARM64 support to run scripts
        rcutorture: Update kvm.sh header comment
        rcutorture: Record which grace-period primitives are tested
        rcutorture: Re-enable testing of dynamic expediting
        rcutorture: Avoid fake-writer use of undefined primitives
        rcutorture: Abstract function and module names
        rcutorture: Replace multi-instance kzalloc() with kcalloc()
        rcu: Remove SRCU throttling
        srcu: Remove dead code in srcu_gp_end()
        srcu: Reduce scans of srcu_data in counter wrap check
        srcu: Prevent sdp->srcu_gp_seq_needed_exp counter wrap
        srcu: Abstract function name
        rcu: Make expedited RCU CPU selection avoid unnecessary stores
        rcu: Trace expedited GP delays due to transitioning CPUs
        ...
      8747a291
    • Linus Torvalds's avatar
      Merge branch 'core-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cc67ccec
      Linus Torvalds authored
      Pull header file cleanup from Ingo Molnar:
       "Reduce <linux/interrupt.h> dependencies: a single change that drops
        two #includes from this frequently used kernel header"
      
      * 'core-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        headers: Drop two #included headers from <linux/interrupt.h>
      cc67ccec
    • Linus Torvalds's avatar
      Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 61d1757f
      Linus Torvalds authored
      Pull debugobjects updates from Ingo Molnar:
       "Misc improvements:
      
         - add better instrumentation/debugging
      
         - optimize the freeing logic improve performance"
      
      * 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        debugobjects: Avoid another unused variable warning
        debugobjects: Fix debug_objects_freed accounting
        debugobjects: Use global free list in __debug_check_no_obj_freed()
        debugobjects: Use global free list in free_object()
        debugobjects: Add global free list and the counter
        debugobjects: Export max loops counter
      61d1757f
    • Linus Torvalds's avatar
      Merge branch 'core-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 54dce3c3
      Linus Torvalds authored
      Pull misc core updates from Ingo Molnar:
       "Two changes:
      
        - add membarriers to Documentation/features/
      
        - fix a minor nit in panic printk formatting"
      
      * 'core-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        panic: Add closing panic marker parenthesis
        Documentation/features, membarriers: Document membarrier-sync-core architecture support
        Documentation/features: Allow comments in arch features files
      54dce3c3
    • Linus Torvalds's avatar
      Merge tag 'drm-for-v4.17' of git://people.freedesktop.org/~airlied/linux · 320b164a
      Linus Torvalds authored
      Pull drm updates from Dave Airlie:
       "Cannonlake and Vega12 support are probably the two major things. This
        pull lacks nouveau, Ben had some unforseen leave and a few other
        blockers so we'll see how things look or maybe leave it for this merge
        window.
      
        core:
         - Device links to handle sound/gpu pm dependency
         - Color encoding/range properties
         - Plane clipping into plane check helper
         - Backlight helpers
         - DP TP4 + HBR3 helper support
      
        amdgpu:
         - Vega12 support
         - Enable DC by default on all supported GPUs
         - Powerplay restructuring and cleanup
         - DC bandwidth calc updates
         - DC backlight on pre-DCE11
         - TTM backing store dropping support
         - SR-IOV fixes
         - Adding "wattman" like functionality
         - DC crc support
         - Improved DC dual-link handling
      
        amdkfd:
         - GPUVM support for dGPU
         - KFD events for dGPU
         - Enable PCIe atomics for dGPUs
         - HSA process eviction support
         - Live-lock fixes for process eviction
         - VM page table allocation fix for large-bar systems
      
        panel:
         - Raydium RM68200
         - AUO G104SN02 V2
         - KEO TX31D200VM0BAA
         - ARM Versatile panels
      
        i915:
         - Cannonlake support enabled
         - AUX-F port support added
         - Icelake base enabling until internal milestone of forcewake support
         - Query uAPI interface (used for GPU topology information currently)
         - Compressed framebuffer support for sprites
         - kmem cache shrinking when GPU is idle
         - Avoid boosting GPU when waited item is being processed already
         - Avoid retraining LSPCON link unnecessarily
         - Decrease request signaling latency
         - Deprecation of I915_SET_COLORKEY_NONE
         - Kerneldoc and compiler warning cleanup for upcoming CI enforcements
         - Full range ycbcr toggling
         - HDCP support
      
        i915/gvt:
         - Big refactor for shadow ppgtt
         - KBL context save/restore via LRI cmd (Weinan)
         - Properly unmap dma for guest page (Changbin)
      
        vmwgfx:
         - Lots of various improvements
      
        etnaviv:
         - Use the drm gpu scheduler
         - prep work for GC7000L support
      
        vc4:
         - fix alpha blending
         - Expose perf counters to userspace
      
        pl111:
         - Bandwidth checking/limiting
         - Versatile panel support
      
        sun4i:
         - A83T HDMI support
         - A80 support
         - YUV plane support
         - H3/H5 HDMI support
      
        omapdrm:
         - HPD support for DVI connector
         - remove lots of static variables
      
        msm:
         - DSI updates from 10nm / SDM845
         - fix for race condition with a3xx/a4xx fence completion irq
         - some refactoring/prep work for eventual a6xx support (ie. when we
           have a userspace)
         - a5xx debugfs enhancements
         - some mdp5 fixes/cleanups to prepare for eventually merging
           writeback
         - support (ie. when we have a userspace)
      
        tegra:
         - mmap() fixes for fbdev devices
         - Overlay plane for hw cursor fix
         - dma-buf cache maintenance support
      
        mali-dp:
         - YUV->RGB conversion support
      
        rockchip:
         - rk3399/chromebook fixes and improvements
      
        rcar-du:
         - LVDS support move to drm bridge
         - DT bindings for R8A77995
         - Driver/DT support for R8A77970
      
        tilcdc:
         - DRM panel support"
      
      * tag 'drm-for-v4.17' of git://people.freedesktop.org/~airlied/linux: (1646 commits)
        drm/i915: Fix hibernation with ACPI S0 target state
        drm/i915/execlists: Use a locked clear_bit() for synchronisation with interrupt
        drm/i915: Specify which engines to reset following semaphore/event lockups
        drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
        drm/amdkfd: Use ordered workqueue to restore processes
        drm/amdgpu: Fix acquiring VM on large-BAR systems
        drm/amd/pp: clean header file hwmgr.h
        drm/amd/pp: use mlck_table.count for array loop index limit
        drm: Fix uabi regression by allowing garbage mode->type from userspace
        drm/amdgpu: Add an ATPX quirk for hybrid laptop
        drm/amdgpu: fix spelling mistake: "asssert" -> "assert"
        drm/amd/pp: Add new asic support in pp_psm.c
        drm/amd/pp: Clean up powerplay code on Vega12
        drm/amd/pp: Add smu irq handlers for legacy asics
        drm/amd/pp: Fix set wrong temperature range on smu7
        drm/amdgpu: Don't change preferred domian when fallback GTT v5
        drm/vmwgfx: Bump version patchlevel and date
        drm/vmwgfx: use monotonic event timestamps
        drm/vmwgfx: Unpin the screen object backup buffer when not used
        drm/vmwgfx: Stricter count of legacy surface device resources
        ...
      320b164a
  2. 01 Apr, 2018 1 commit
  3. 31 Mar, 2018 11 commits
  4. 30 Mar, 2018 19 commits
    • Yelena Krivosheev's avatar
      net: mvneta: fix enable of all initialized RXQs · e81b5e01
      Yelena Krivosheev authored
      
      
      In mvneta_port_up() we enable relevant RX and TX port queues by write
      queues bit map to an appropriate register.
      
      q_map must be ZERO in the beginning of this process.
      Signed-off-by: default avatarYelena Krivosheev <yelena@marvell.com>
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
      Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e81b5e01
    • David Ahern's avatar
      net/ipv6: Fix route leaking between VRFs · b6cdbc85
      David Ahern authored
      Donald reported that IPv6 route leaking between VRFs is not working.
      The root cause is the strict argument in the call to rt6_lookup when
      validating the nexthop spec.
      
      ip6_route_check_nh validates the gateway and device (if given) of a
      route spec. It in turn could call rt6_lookup (e.g., lookup in a given
      table did not succeed so it falls back to a full lookup) and if so
      sets the strict argument to 1. That means if the egress device is given,
      the route lookup needs to return a result with the same device. This
      strict requirement does not work with VRFs (IPv4 or IPv6) because the
      oif in the flow struct is overridden with the index of the VRF device
      to trigger a match on the l3mdev rule and force the lookup to its table.
      
      The right long term solution is to add an l3mdev index to the flow
      struct such that the oif is not overridden. That solution will not
      backport well, so this patch aims for a simpler solution to relax the
      strict argument if the route spec device is an l3mdev slave. As done
      in other places, use the FLOWI_FLAG_SKIP_NH_OIF to know that the
      RT6_LOOKUP_F_IFACE flag needs to be removed.
      
      Fixes: ca254490
      
       ("net: Add VRF support to IPv6 stack")
      Reported-by: default avatarDonald Sharp <sharpd@cumulusnetworks.com>
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6cdbc85
    • David Ahern's avatar
      vrf: Fix use after free and double free in vrf_finish_output · 82dd0d2a
      David Ahern authored
      Miguel reported an skb use after free / double free in vrf_finish_output
      when neigh_output returns an error. The vrf driver should return after
      the call to neigh_output as it takes over the skb on error path as well.
      
      Patch is a simplified version of Miguel's patch which was written for 4.9,
      and updated to top of tree.
      
      Fixes: 8f58336d
      
       ("net: Add ethernet header for pass through VRF device")
      Signed-off-by: default avatarMiguel Fadon Perlines <mfadon@teldat.com>
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82dd0d2a
    • David Lebrun's avatar
      ipv6: sr: fix seg6 encap performances with TSO enabled · 5807b22c
      David Lebrun authored
      
      
      Enabling TSO can lead to abysmal performances when using seg6 in
      encap mode, such as with the ixgbe driver. This patch adds a call to
      iptunnel_handle_offloads() to remove the encapsulation bit if needed.
      
      Before:
      root@comp4-seg6bpf:~# iperf3 -c fc00::55
      Connecting to host fc00::55, port 5201
      [  4] local fc45::4 port 36592 connected to fc00::55 port 5201
      [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
      [  4]   0.00-1.00   sec   196 KBytes  1.60 Mbits/sec   47   6.66 KBytes
      [  4]   1.00-2.00   sec   304 KBytes  2.49 Mbits/sec  100   5.33 KBytes
      [  4]   2.00-3.00   sec   284 KBytes  2.32 Mbits/sec   92   5.33 KBytes
      
      After:
      root@comp4-seg6bpf:~# iperf3 -c fc00::55
      Connecting to host fc00::55, port 5201
      [  4] local fc45::4 port 43062 connected to fc00::55 port 5201
      [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
      [  4]   0.00-1.00   sec  1.03 GBytes  8.89 Gbits/sec    0    743 KBytes
      [  4]   1.00-2.00   sec  1.03 GBytes  8.87 Gbits/sec    0    743 KBytes
      [  4]   2.00-3.00   sec  1.03 GBytes  8.87 Gbits/sec    0    743 KBytes
      Reported-by: default avatarTom Herbert <tom@quantonium.net>
      Fixes: 6c8702c6
      
       ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels")
      Signed-off-by: default avatarDavid Lebrun <dlebrun@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5807b22c
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-4.16-rc8' of git://github.com/ceph/ceph-client · 9dd23268
      Linus Torvalds authored
      Pull ceph fix from Ilya Dryomov:
       "A fix for a dio-enabled loop on ceph deadlock from Zheng, marked for
        stable"
      
      * tag 'ceph-for-4.16-rc8' of git://github.com/ceph/ceph-client:
        ceph: only dirty ITER_IOVEC pages for direct read
      9dd23268
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 72573481
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "PPC:
         - Fix a bug causing occasional machine check exceptions on POWER8
           hosts (introduced in 4.16-rc1)
      
        x86:
         - Fix a guest crashing regression with nested VMX and restricted
           guest (introduced in 4.16-rc1)
      
         - Fix dependency check for pv tlb flush (the wrong dependency that
           effectively disabled the feature was added in 4.16-rc4, the
           original feature in 4.16-rc1, so it got decent testing)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: Fix pv tlb flush dependencies
        KVM: nVMX: sync vmcs02 segment regs prior to vmx_set_cr0
        KVM: PPC: Book3S HV: Fix duplication of host SLB entries
      72573481
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · bd886137
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang:
       "A simple but worthwhile I2C driver fix for 4.16"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: i2c-stm32f7: fix no check on returned setup
      bd886137
    • Linus Torvalds's avatar
      Merge tag 'sound-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · ef82f598
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Very small fixes (all one-liners) at this time.
      
        One fix is for a PCM core stuff to correct the mmap behavior on
        non-x86. It doesn't show on most machines but mostly only for exotic
        non-interleaved formats"
      
      * tag 'sound-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: pcm: potential uninitialized return values
        ALSA: pcm: Use dma_bytes as size parameter in dma_mmap_coherent()
        ALSA: usb-audio: Add native DSD support for TEAC UD-301
      ef82f598
    • Tal Gilboa's avatar
      net/dim: Fix int overflow · f97c3dc3
      Tal Gilboa authored
      When calculating difference between samples, the values
      are multiplied by 100. Large values may cause int overflow
      when multiplied (usually on first iteration).
      Fixed by forcing 100 to be of type unsigned long.
      
      Fixes: 4c4dbb4a
      
       ("net/mlx5e: Move dynamic interrupt coalescing code to include/linux")
      Signed-off-by: default avatarTal Gilboa <talgi@mellanox.com>
      Reviewed-by: default avatarAndy Gospodarek <gospo@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f97c3dc3
    • David S. Miller's avatar
      Merge branch 'vlan-fix' · 52a9692a
      David S. Miller authored
      Toshiaki Makita says:
      
      ====================
      Fix vlan tag handling for vlan packets without ethernet headers
      
      Eric Dumazet reported syzbot found a new bug which leads to underflow of
      size argument of memmove(), causing crash[1]. This can be triggered by tun
      devices.
      
      The underflow happened because skb_vlan_untag() did not expect vlan packets
      without ethernet headers, and tun can produce such packets.
      I also checked vlan_insert_inner_tag() and found a similar bug.
      
      This series fixes these problems.
      
      [1] https://marc.info/?l=linux-netdev&m=152221753920510&w=2
      
      
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52a9692a
    • Toshiaki Makita's avatar
      vlan: Fix vlan insertion for packets without ethernet header · c769accd
      Toshiaki Makita authored
      In some situation vlan packets do not have ethernet headers. One example
      is packets from tun devices. Users can specify vlan protocol in tun_pi
      field instead of IP protocol. When we have a vlan device with reorder_hdr
      disabled on top of the tun device, such packets from tun devices are
      untagged in skb_vlan_untag() and vlan headers will be inserted back in
      vlan_insert_inner_tag().
      
      vlan_insert_inner_tag() however did not expect packets without ethernet
      headers, so in such a case size argument for memmove() underflowed.
      
      We don't need to copy headers for packets which do not have preceding
      headers of vlan headers, so skip memmove() in that case.
      Also don't write vlan protocol in skb->data when it does not have enough
      room for it.
      
      Fixes: cbe7128c
      
       ("vlan: Fix out of order vlan headers with reorder header off")
      Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c769accd
    • Toshiaki Makita's avatar
      net: Fix untag for vlan packets without ethernet header · ae474573
      Toshiaki Makita authored
      In some situation vlan packets do not have ethernet headers. One example
      is packets from tun devices. Users can specify vlan protocol in tun_pi
      field instead of IP protocol, and skb_vlan_untag() attempts to untag such
      packets.
      
      skb_vlan_untag() (more precisely, skb_reorder_vlan_header() called by it)
      however did not expect packets without ethernet headers, so in such a case
      size argument for memmove() underflowed and triggered crash.
      
      ====
      BUG: unable to handle kernel paging request at ffff8801cccb8000
      IP: __memmove+0x24/0x1a0 arch/x86/lib/memmove_64.S:43
      PGD 9cee067 P4D 9cee067 PUD 1d9401063 PMD 1cccb7063 PTE 2810100028101
      Oops: 000b [#1] SMP KASAN
      Dumping ftrace buffer:
         (ftrace buffer empty)
      Modules linked in:
      CPU: 1 PID: 17663 Comm: syz-executor2 Not tainted 4.16.0-rc7+ #368
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:__memmove+0x24/0x1a0 arch/x86/lib/memmove_64.S:43
      RSP: 0018:ffff8801cc046e28 EFLAGS: 00010287
      RAX: ffff8801ccc244c4 RBX: fffffffffffffffe RCX: fffffffffff6c4c2
      RDX: fffffffffffffffe RSI: ffff8801cccb7ffc RDI: ffff8801cccb8000
      RBP: ffff8801cc046e48 R08: ffff8801ccc244be R09: ffffed0039984899
      R10: 0000000000000001 R11: ffffed0039984898 R12: ffff8801ccc244c4
      R13: ffff8801ccc244c0 R14: ffff8801d96b7c06 R15: ffff8801d96b7b40
      FS:  00007febd562d700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffff8801cccb8000 CR3: 00000001ccb2f006 CR4: 00000000001606e0
      DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
      Call Trace:
       memmove include/linux/string.h:360 [inline]
       skb_reorder_vlan_header net/core/skbuff.c:5031 [inline]
       skb_vlan_untag+0x470/0xc40 net/core/skbuff.c:5061
       __netif_receive_skb_core+0x119c/0x3460 net/core/dev.c:4460
       __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4627
       netif_receive_skb_internal+0x10b/0x670 net/core/dev.c:4701
       netif_receive_skb+0xae/0x390 net/core/dev.c:4725
       tun_rx_batched.isra.50+0x5ee/0x870 drivers/net/tun.c:1555
       tun_get_user+0x299e/0x3c20 drivers/net/tun.c:1962
       tun_chr_write_iter+0xb9/0x160 drivers/net/tun.c:1990
       call_write_iter include/linux/fs.h:1782 [inline]
       new_sync_write fs/read_write.c:469 [inline]
       __vfs_write+0x684/0x970 fs/read_write.c:482
       vfs_write+0x189/0x510 fs/read_write.c:544
       SYSC_write fs/read_write.c:589 [inline]
       SyS_write+0xef/0x220 fs/read_write.c:581
       do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
       entry_SYSCALL_64_after_hwframe+0x42/0xb7
      RIP: 0033:0x454879
      RSP: 002b:00007febd562cc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
      RAX: ffffffffffffffda RBX: 00007febd562d6d4 RCX: 0000000000454879
      RDX: 0000000000000157 RSI: 0000000020000180 RDI: 0000000000000014
      RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
      R13: 00000000000006b0 R14: 00000000006fc120 R15: 0000000000000000
      Code: 90 90 90 90 90 90 90 48 89 f8 48 83 fa 20 0f 82 03 01 00 00 48 39 fe 7d 0f 49 89 f0 49 01 d0 49 39 f8 0f 8f 9f 00 00 00 48 89 d1 <f3> a4 c3 48 81 fa a8 02 00 00 72 05 40 38 fe 74 3b 48 83 ea 20
      RIP: __memmove+0x24/0x1a0 arch/x86/lib/memmove_64.S:43 RSP: ffff8801cc046e28
      CR2: ffff8801cccb8000
      ====
      
      We don't need to copy headers for packets which do not have preceding
      headers of vlan headers, so skip memmove() in that case.
      
      Fixes: 4bbb3e0e
      
       ("net: Fix vlan untag for bridge and vlan_dev with reorder_hdr off")
      Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae474573
    • Colin Ian King's avatar
      atm: iphase: fix spelling mistake: "Receiverd" -> "Received" · a9645b27
      Colin Ian King authored
      
      
      Trivial fix to spelling mistake in message text
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9645b27
    • Yan, Zheng's avatar
      ceph: only dirty ITER_IOVEC pages for direct read · 85784f93
      Yan, Zheng authored
      
      
      If a page is already locked, attempting to dirty it leads to a deadlock
      in lock_page().  This is what currently happens to ITER_BVEC pages when
      a dio-enabled loop device is backed by ceph:
      
        $ losetup --direct-io /dev/loop0 /mnt/cephfs/img
        $ xfs_io -c 'pread 0 4k' /dev/loop0
      
      Follow other file systems and only dirty ITER_IOVEC pages.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatar"Yan, Zheng" <zyan@redhat.com>
      Reviewed-by: default avatarIlya Dryomov <idryomov@gmail.com>
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      85784f93
    • Linus Torvalds's avatar
      Merge tag 'for-4.16/dm-fixes-4' of... · c2a98384
      Linus Torvalds authored
      Merge tag 'for-4.16/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Fix a DM multipath regression introduced in a v4.16-rc6 commit:
         restore support for loading, and attaching, scsi_dh modules during
         multipath table load. Otherwise some users may find themselves unable
         to boot, as was reported today:
      
           https://marc.info/?l=linux-scsi&m=152231276114962&w=2
      
       - Fix a DM core ioctl permission check regression introduced in a
         v4.16-rc5 commit.
      
      * tag 'for-4.16/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm: fix dropped return code from dm_get_bdev_for_ioctl
        dm mpath: fix support for loading scsi_dh modules during table load
      c2a98384
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · d89b9f50
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "It has been fairly silent lately on our -rc front. Big queue of
        patches on the mailing list going to for-next though.
      
        Bug fixes:
         - qedr driver bugfixes causing application hangs, wrong uapi errnos,
           and a race condition
         - three syzkaller found bugfixes in the ucma uapi
      
        Regression fixes for things introduced in 4.16:
         - Crash on error introduced in mlx5 UMR flow
         - Crash on module unload/etc introduced by bad interaction of
           restrack and mlx5 patches this cycle
         - Typo in a two line syzkaller bugfix causing a bad regression
         - Coverity report of nonsense code in hns driver"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/ucma: Introduce safer rdma_addr_size() variants
        RDMA/hns: ensure for-loop actually iterates and free's buffers
        RDMA/ucma: Check that device exists prior to accessing it
        RDMA/ucma: Check that device is connected prior to access it
        RDMA/rdma_cm: Fix use after free race with process_one_req
        RDMA/qedr: Fix QP state initialization race
        RDMA/qedr: Fix rc initialization on CNQ allocation failure
        RDMA/qedr: fix QP's ack timeout configuration
        RDMA/ucma: Correct option size check using optlen
        RDMA/restrack: Move restrack_clean to be symmetrical to restrack_init
        IB/mlx5: Don't clean uninitialized UMR resources
      d89b9f50
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-4.16' of git://git.infradead.org/linux-mtd · ab12762b
      Linus Torvalds authored
      Pull MTD fixes from Boris Brezillon:
       "Two fixes, one in the atmel NAND driver and another one in the
        CFI/JEDEC code.
      
        Summary:
      
         - Fix a bug in Atmel ECC engine driver
      
         - Fix a bug in the CFI/JEDEC driver"
      
      * tag 'mtd/fixes-for-4.16' of git://git.infradead.org/linux-mtd:
        mtd: jedec_probe: Fix crash in jedec_read_mfr()
        mtd: nand: atmel: Fix get_sectorsize() function
      ab12762b
    • Mike Snitzer's avatar
      dm: fix dropped return code from dm_get_bdev_for_ioctl · da5dadb4
      Mike Snitzer authored
      dm_get_bdev_for_ioctl()'s return of 0 or 1 must be the result from
      prepare_ioctl (1 means the ioctl was issued to a partition, 0 means it
      wasn't).  Unfortunately commit 519049af ("dm: use blkdev_get rather
      than bdgrab when issuing pass-through ioctl") reused the variable 'r'
      to store the return from blkdev_get() that follows prepare_ioctl()
      -- whereby dropping prepare_ioctl()'s result on the floor.
      
      This can lead to an ioctl or persistent reservation being issued to a
      partition going unnoticed, which implies the extra permission check for
      CAP_SYS_RAWIO is skipped.
      
      Fix this by using a different variable to store blkdev_get()'s return.
      
      Fixes: 519049af
      
       ("dm: use blkdev_get rather than bdgrab when issuing pass-through ioctl")
      Reported-by: default avatarAlasdair G Kergon <agk@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      da5dadb4
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 74957cbf
      David S. Miller authored
      
      
      Daniel Borkman says:
      
      ====================
      pull-request: bpf 2018-03-29
      
      The following pull-request contains BPF updates for your *net* tree.
      
      The main changes are:
      
      1) Fix nfp to properly check max insn count while emitting
         instructions in the JIT which was wrongly comparing bytes
         against number of instructions before, from Jakub.
      
      2) Fix for bpftool to avoid usage of hex numbers in JSON
         output since JSON doesn't accept hex numbers with 0x
         prefix, also from Jakub.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74957cbf
  5. 29 Mar, 2018 1 commit