1. 29 Mar, 2020 3 commits
    • Mina Almasry's avatar
      hugetlb_cgroup: fix illegal access to memory · 726b7bbe
      Mina Almasry authored
      This appears to be a mistake in commit faced7e0 ("mm: hugetlb
      controller for cgroups v2").
      
      Essentially that commit does a hugetlb_cgroup_from_counter assuming that
      page_counter_try_charge has initialized counter.
      
      But if that has failed then it seems will not initialize counter, so
      hugetlb_cgroup_from_counter(counter) ends up pointing to random memory,
      causing kasan to complain.
      
      The solution is to simply use 'h_cg', instead of
      hugetlb_cgroup_from_counter(counter), since that is a reference to the
      hugetlb_cgroup anyway.  After this change kasan ceases to complain.
      
      Fixes: faced7e0 ("mm: hugetlb controller for cgroups v2")
      Reported-by: syzbot+cac0c4e204952cf449b1@syzkaller.appspotmail.com
      Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarGiuseppe Scrivano <gscrivan@redhat.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Mike Kravetz <mike.kravetz@oracle.com>
      Cc: David Rientjes <rientjes@google.com>
      Link: http://lkml.kernel.org/r/20200313223920.124230-1-almasrymina@google.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      726b7bbe
    • David Hildenbrand's avatar
      drivers/base/memory.c: indicate all memory blocks as removable · 53cdc1cb
      David Hildenbrand authored
      We see multiple issues with the implementation/interface to compute
      whether a memory block can be offlined (exposed via
      /sys/devices/system/memory/memoryX/removable) and would like to simplify
      it (remove the implementation).
      
      1. It runs basically lockless. While this might be good for performance,
         we see possible races with memory offlining that will require at
         least some sort of locking to fix.
      
      2. Nowadays, more false positives are possible. No arch-specific checks
         are performed that validate if memory offlining will not be denied
         right away (and such check will require locking). For example, arm64
         won't allow to offline any memory block that was added during boot -
         which will imply a very high error rate. Other archs have other
         constraints.
      
      3. The interface is inherently racy. E.g., if a memory block is detected
         to be removable (and was not a false positive at that time), there is
         still no guarantee that offlining will actually succeed. So any
         caller already has to deal with false positives.
      
      4. It is unclear which performance benefit this interface actually
         provides. The introducing commit 5c755e9f ("memory-hotplug: add
         sysfs removable attribute for hotplug memory remove") mentioned
      
      	"A user-level agent must be able to identify which sections
      	 of memory are likely to be removable before attempting the
      	 potentially expensive operation."
      
         However, no actual performance comparison was included.
      
      Known users:
      
       - lsmem: Will group memory blocks based on the "removable" property. [1]
      
       - chmem: Indirect user. It has a RANGE mode where one can specify
                removable ranges identified via lsmem to be offlined. However,
                it also has a "SIZE" mode, which allows a sysadmin to skip the
                manual "identify removable blocks" step. [2]
      
       - powerpc-utils: Uses the "removable" attribute to skip some memory
                blocks right away when trying to find some to offline+remove.
                However, with ballooning enabled, it already skips this
                information completely (because it once resulted in many false
                negatives). Therefore, the implementation can deal with false
                positives properly already. [3]
      
      According to Nathan Fontenot, DLPAR on powerpc is nowadays no longer
      driven from userspace via the drmgr command (powerpc-utils).  Nowadays
      it's managed in the kernel - including onlining/offlining of memory
      blocks - triggered by drmgr writing to /sys/kernel/dlpar.  So the
      affected legacy userspace handling is only active on old kernels.  Only
      very old versions of drmgr on a new kernel (unlikely) might execute
      slower - totally acceptable.
      
      With CONFIG_MEMORY_HOTREMOVE, always indicating "removable" should not
      break any user space tool.  We implement a very bad heuristic now.
      Without CONFIG_MEMORY_HOTREMOVE we cannot offline anything, so report
      "not removable" as before.
      
      Original discussion can be found in [4] ("[PATCH RFC v1] mm:
      is_mem_section_removable() overhaul").
      
      Other users of is_mem_section_removable() will be removed next, so that
      we can remove is_mem_section_removable() completely.
      
      [1] http://man7.org/linux/man-pages/man1/lsmem.1.html
      [2] http://man7.org/linux/man-pages/man8/chmem.8.html
      [3] https://github.com/ibm-power-utilities/powerpc-utils
      [4] https://lkml.kernel.org/r/20200117105759.27905-1-david@redhat.com
      
      Also, this patch probably fixes a crash reported by Steve.
      http://lkml.kernel.org/r/CAPcyv4jpdaNvJ67SkjyUJLBnBnXXQv686BiVW042g03FUmWLXw@mail.gmail.comReported-by: default avatar"Scargall, Steve" <steve.scargall@intel.com>
      Suggested-by: default avatarMichal Hocko <mhocko@kernel.org>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: default avatarNathan Fontenot <ndfont@gmail.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Karel Zak <kzak@redhat.com>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20200128093542.6908-1-david@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      53cdc1cb
    • Naohiro Aota's avatar
      mm/swapfile.c: move inode_lock out of claim_swapfile · d795a90e
      Naohiro Aota authored
      claim_swapfile() currently keeps the inode locked when it is successful,
      or the file is already swapfile (with -EBUSY).  And, on the other error
      cases, it does not lock the inode.
      
      This inconsistency of the lock state and return value is quite confusing
      and actually causing a bad unlock balance as below in the "bad_swap"
      section of __do_sys_swapon().
      
      This commit fixes this issue by moving the inode_lock() and IS_SWAPFILE
      check out of claim_swapfile().  The inode is unlocked in
      "bad_swap_unlock_inode" section, so that the inode is ensured to be
      unlocked at "bad_swap".  Thus, error handling codes after the locking now
      jumps to "bad_swap_unlock_inode" instead of "bad_swap".
      
          =====================================
          WARNING: bad unlock balance detected!
          5.5.0-rc7+ #176 Not tainted
          -------------------------------------
          swapon/4294 is trying to release lock (&sb->s_type->i_mutex_key) at: __do_sys_swapon+0x94b/0x3550
          but there are no more locks to release!
      
          other info that might help us debug this:
          no locks held by swapon/4294.
      
          stack backtrace:
          CPU: 5 PID: 4294 Comm: swapon Not tainted 5.5.0-rc7-BTRFS-ZNS+ #176
          Hardware name: ASUS All Series/H87-PRO, BIOS 2102 07/29/2014
          Call Trace:
           dump_stack+0xa1/0xea
           print_unlock_imbalance_bug.cold+0x114/0x123
           lock_release+0x562/0xed0
           up_write+0x2d/0x490
           __do_sys_swapon+0x94b/0x3550
           __x64_sys_swapon+0x54/0x80
           do_syscall_64+0xa4/0x4b0
           entry_SYSCALL_64_after_hwframe+0x49/0xbe
          RIP: 0033:0x7f15da0a0dc7
      
      Fixes: 1638045c ("mm: set S_SWAPFILE on blockdev swap devices")
      Signed-off-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Tested-by: default avatarQais Youef <qais.yousef@arm.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20200206090132.154869-1-naohiro.aota@wdc.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d795a90e
  2. 28 Mar, 2020 1 commit
  3. 27 Mar, 2020 14 commits
    • Linus Torvalds's avatar
      Merge branch 'parisc-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 69c5eea3
      Linus Torvalds authored
      Pull parsic fix from Helge Deller:
       "Fix a recursive loop when running 'make ARCH=parisc defconfig'"
      
      * 'parisc-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix defconfig selection
      69c5eea3
    • Linus Torvalds's avatar
      Merge tag 'arm-soc-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 32db9f10
      Linus Torvalds authored
      Pull ARM DT and driver fixes from Arnd Bergmann:
       "For the devicetree files, there are a total of 20 patches, almost
        entirely for 32-bit machines:
      
         - The Allwinner/sun9i r40 SoC dtsi file contains a number of issues,
           both for correctness and for style that are addressed in separate
           patches. This causes most of the changed lines of the DT updates
           this time.
      
         - More Allwinner updates fixing the identification of the security
           system on sun8i/A33, a recent regression of the A83t ethernet, and
           a few board specific issues on the TBS-A711 macine.
      
         - Several bug fixes for OMAP dts files, most notably fixing the
           timings for the NAND flash on the Nokia N900 that regressed a while
           ago after the move to configuring them from DT. Some other OMAPs
           now set the correct dma limits on the L3 bus, and a regression fix
           addresses lost Ethernet on dm814x
      
         - One incorrect setting in the newly added Raspberry Pi Zero W that
           may cause issues with the SD card controller.
      
         - A missing property on the bcm2835 firmware node caused incorrect
           DMA settings.
      
         - An old bug on the oxnas platform causing spurious interrupts is
           finally addressed.
      
         - A regression on the Exynos Midas board broke the OLED panel power
           supply.
      
         - The i.MX6 phycore SoM specified the wrong voltage for the SoC, this
           is now set to the values from the datasheet.
      
         - Some 64-bit machines use a deprecated string to identify the PSCI
           firmware.
      
        There are also several small code fixes addressing mostly serious
        issues:
      
         - Fix the sunxi rsb bus access to no longer return incorrect data
           when mixing 8 and 16 bit I/O.
      
         - Fix a suspend/resume regression on the OMAP2+ lcdc from a missing
           quirk in the ti-sysc driver
      
         - Fix a NULL pointer access from a race in the fsl dpio driver
      
         - Fix a v5.5 regression in the exynos-chipid driver that caused an
           invalid error code probing the device on non-exynos platforms
      
         - Fix an out-of-bounds access in the AMD TEE driver"
      
      * tag 'arm-soc-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits)
        soc: samsung: chipid: Fix return value on non-Exynos platforms
        arm64: dts: Fix leftover entry-methods for PSCI
        ARM: dts: exynos: Fix regulator node aliasing on Midas-based boards
        ARM: dts: oxnas: Fix clear-mask property
        ARM: dts: bcm283x: Fix vc4's firmware bus DMA limitations
        ARM: dts: omap5: Add bus_dma_limit for L3 bus
        ARM: dts: omap4-droid4: Fix lost touchscreen interrupts
        ARM: dts: dra7: Add bus_dma_limit for L3 bus
        ARM: bcm2835-rpi-zero-w: Add missing pinctrl name
        ARM: dts: sun8i: a33: add the new SS compatible
        dt-bindings: crypto: add new compatible for A33 SS
        ARM: dts: sun8i: r40: Move SPI device nodes based on address order
        ARM: dts: sun8i: r40: Fix register base address for SPI2 and SPI3
        ARM: dts: sun8i: r40: Move AHCI device node based on address order
        ARM: dts: imx6: phycore-som: fix arm and soc minimum voltage
        soc: fsl: dpio: register dpio irq handlers after dpio create
        tee: amdtee: out of bounds read in find_session()
        ARM: dts: N900: fix onenand timings
        bus: ti-sysc: Fix quirk flags for lcdc on am335x
        ARM: dts: Fix dm814x Ethernet by changing to use rgmii-id mode
        ...
      32db9f10
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 823846c3
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "Sorry for the last minute patches, but a few things fell through the
        cracks recently. I was on the fence about sending a late pull request
        just for the M-mode fixes, as we don't really have any users, but the
        last patch fixes the build for Fedora which I consider pretty
        important.
      
        Given that the M-mode fixes should be very low risk, I figured it's
        worth sending them along as well.
      
        Thhis passes my standard 'boot in QEMU' test"
      
      * tag 'riscv-for-linus-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: Move all address space definition macros to one place
        RISC-V: Only select essential drivers for SOC_VIRT config
        riscv: fix the IPI missing issue in nommu mode
        riscv: uaccess should be used in nommu mode
      823846c3
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · bb36d37e
      Linus Torvalds authored
      Pull Devicetree fix from Rob Herring:
       "A single fix for building dtc with GCC 10"
      
      * tag 'devicetree-fixes-for-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        scripts/dtc: Remove redundant YYLOC global declaration
      bb36d37e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 1fa8cb0b
      Linus Torvalds authored
      Pull arm64 fix from Will Deacon:
       "Fix defconfig build when using Clang's integrated assembler"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: alternative: fix build with clang integrated assembler
      1fa8cb0b
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 527630fb
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A handful of clk driver fixes.
      
        Mostly they're around the i.MX drivers fixing the parents of a few
        clks and making KASAN happy with how the message passing code works.
      
        Besides that we have a TI driver fix for the RTC parent and a fix for
        the basic gate type registration functions introduced this release
        where they didn't actually pass the arguments in the right places to
        the multiplexer function down below"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: imx: Align imx sc clock parent msg structs to 4
        clk: imx: Align imx sc clock msg structs to 4
        clk: Pass correct arguments to __clk_hw_register_gate()
        clk: ti: am43xx: Fix clock parent for RTC clock
        clk: imx8mp: Correct the enet_qos parent clock
        clk: imx8mp: Correct IMX8MP_CLK_HDMI_AXI clock parent
      527630fb
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-03-27' of git://anongit.freedesktop.org/drm/drm · 7bf8df68
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Pretty quiet: some minor sg mapping fixes for 3 drivers, and a single
        oops fix for the scheduler. I'm hoping nobody tries to send me a fixes
        pull today but I'll keep an eye out of the weekend.
      
        radeon/amdgpu/dma-buf:
         - sg list fixes
      
        scheduler:
         - oops fix"
      
      * tag 'drm-fixes-2020-03-27' of git://anongit.freedesktop.org/drm/drm:
        drm/scheduler: fix rare NULL ptr race
        drm/radeon: fix scatter-gather mapping with user pages
        drm/amdgpu: fix scatter-gather mapping with user pages
        drm/prime: use dma length macro when mapping sg
      7bf8df68
    • Helge Deller's avatar
      parisc: Fix defconfig selection · ededa081
      Helge Deller authored
      Fix the recursive loop when running "make ARCH=parisc defconfig".
      
      Fixes: 84669923 ("parisc: Regenerate parisc defconfigs")
      Noticed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ededa081
    • Dirk Mueller's avatar
      scripts/dtc: Remove redundant YYLOC global declaration · e33a814e
      Dirk Mueller authored
      gcc 10 will default to -fno-common, which causes this error at link
      time:
      
        (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
      
      This is because both dtc-lexer as well as dtc-parser define the same
      global symbol yyloc. Before with -fcommon those were merged into one
      defintion. The proper solution would be to to mark this as "extern",
      however that leads to:
      
        dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
         26 | extern YYLTYPE yylloc;
            |                ^~~~~~
      In file included from dtc-lexer.l:24:
      dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
        127 | extern YYLTYPE yylloc;
            |                ^~~~~~
      cc1: all warnings being treated as errors
      
      which means the declaration is completely redundant and can just be
      dropped.
      Signed-off-by: default avatarDirk Mueller <dmueller@suse.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      [robh: cherry-pick from upstream]
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      e33a814e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · f3e69428
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
      
       - a fix to generate proper timestamps on key autorepeat events that
         were broken recently
      
       - a fix for Synaptics driver to only activate reduced reporting mode
         when explicitly requested
      
       - a new keycode for "selective screenshot" function
      
       - other assorted fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: fix stale timestamp on key autorepeat events
        Input: move the new KEY_SELECTIVE_SCREENSHOT keycode
        Input: avoid BIT() macro usage in the serio.h UAPI header
        Input: synaptics-rmi4 - set reduced reporting mode only when requested
        Input: synaptics - enable RMI on HP Envy 13-ad105ng
        Input: allocate keycode for "Selective Screenshot" key
        Input: tm2-touchkey - add support for Coreriver TC360 variant
        dt-bindings: input: add Coreriver TC360 binding
        dt-bindings: vendor-prefixes: Add Coreriver vendor prefix
        Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
      f3e69428
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.6-2020-03-26' of... · c4b979eb
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.6-2020-03-26' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.6-2020-03-26:
      
      Scheduler:
      - Fix a race condition that could result in a segfault
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200326144538.3937-1-alexander.deucher@amd.com
      c4b979eb
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2020-03-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 5117c363
      Dave Airlie authored
      drm-misc-fixes for v5.6:
      - SG fixes for prime, radeon and amdgpu.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/ef10e822-76dd-125d-ec1f-9a78c5f76bc3@linux.intel.com
      5117c363
    • Atish Patra's avatar
      RISC-V: Move all address space definition macros to one place · 2191b4f2
      Atish Patra authored
      We get the following compilation error if CONFIG_SPARSEMEM_VMEMMAP is set.
      
      ---------------------------------------------------------------
      ./arch/riscv/include/asm/pgtable-64.h: In function ‘pud_page’:
      ./include/asm-generic/memory_model.h:54:29: error: ‘vmemmap’ undeclared
      (first use in this function); did you mean ‘mem_map’?
       #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                   ^~~~~~~
      ./include/asm-generic/memory_model.h:82:21: note: in expansion of
      macro ‘__pfn_to_page’
      
       #define pfn_to_page __pfn_to_page
                           ^~~~~~~~~~~~~
      ./arch/riscv/include/asm/pgtable-64.h:70:9: note: in expansion of macro
      ‘pfn_to_page’
        return pfn_to_page(pud_val(pud) >> _PAGE_PFN_SHIFT);
      ---------------------------------------------------------------
      
      Fix the compliation errors by moving all the address space definition
      macros before including pgtable-64.h.
      
      Fixes: 8ad8b727 (riscv: Add KASAN support)
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      2191b4f2
    • Dmitry Torokhov's avatar
      Input: fix stale timestamp on key autorepeat events · 4134252a
      Dmitry Torokhov authored
      We need to refresh timestamp when emitting key autorepeat events, otherwise
      they will carry timestamp of the original key press event.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206929
      Fixes: 3b51c44b ("Input: allow drivers specify timestamp for input events")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarteika kazura <teika@gmx.com>
      Tested-by: default avatarteika kazura <teika@gmx.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      4134252a
  4. 26 Mar, 2020 13 commits
  5. 25 Mar, 2020 9 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 1b649e0b
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix deadlock in bpf_send_signal() from Yonghong Song.
      
       2) Fix off by one in kTLS offload of mlx5, from Tariq Toukan.
      
       3) Add missing locking in iwlwifi mvm code, from Avraham Stern.
      
       4) Fix MSG_WAITALL handling in rxrpc, from David Howells.
      
       5) Need to hold RTNL mutex in tcindex_partial_destroy_work(), from Cong
          Wang.
      
       6) Fix producer race condition in AF_PACKET, from Willem de Bruijn.
      
       7) cls_route removes the wrong filter during change operations, from
          Cong Wang.
      
       8) Reject unrecognized request flags in ethtool netlink code, from
          Michal Kubecek.
      
       9) Need to keep MAC in reset until PHY is up in bcmgenet driver, from
          Doug Berger.
      
      10) Don't leak ct zone template in act_ct during replace, from Paul
          Blakey.
      
      11) Fix flushing of offloaded netfilter flowtable flows, also from Paul
          Blakey.
      
      12) Fix throughput drop during tx backpressure in cxgb4, from Rahul
          Lakkireddy.
      
      13) Don't let a non-NULL skb->dev leave the TCP stack, from Eric
          Dumazet.
      
      14) TCP_QUEUE_SEQ socket option has to update tp->copied_seq as well,
          also from Eric Dumazet.
      
      15) Restrict macsec to ethernet devices, from Willem de Bruijn.
      
      16) Fix reference leak in some ethtool *_SET handlers, from Michal
          Kubecek.
      
      17) Fix accidental disabling of MSI for some r8169 chips, from Heiner
          Kallweit.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (138 commits)
        net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build
        net: ena: Add PCI shutdown handler to allow safe kexec
        selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED
        selftests/net: add missing tests to Makefile
        r8169: re-enable MSI on RTL8168c
        net: phy: mdio-bcm-unimac: Fix clock handling
        cxgb4/ptp: pass the sign of offset delta in FW CMD
        net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop
        net: cbs: Fix software cbs to consider packet sending time
        net/mlx5e: Do not recover from a non-fatal syndrome
        net/mlx5e: Fix ICOSQ recovery flow with Striding RQ
        net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset
        net/mlx5e: Enhance ICOSQ WQE info fields
        net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure
        selftests: netfilter: add nfqueue test case
        netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress
        netfilter: nft_fwd_netdev: validate family and chain type
        netfilter: nft_set_rbtree: Detect partial overlaps on insertion
        netfilter: nft_set_rbtree: Introduce and use nft_rbtree_interval_start()
        netfilter: nft_set_pipapo: Separate partial and complete overlap cases on insertion
        ...
      1b649e0b
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 1dfb642b
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
      
       - One core quirk by myself to fix the .irq_disable() semantics when the
         gpiolib core takes over this callback.
      
       - The rest is an elaborate series of four patches fixing Intel laptop
         ACPI wakeup quirks.
      
      * tag 'gpio-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model
        gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 BYT + AXP288 model
        gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option
        gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk
        gpiolib: Fix irq_disable() semantics
      1dfb642b
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-2020-03-25' of... · 2910594f
      David S. Miller authored
      Merge tag 'wireless-drivers-2020-03-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      wireless-drivers fixes for v5.6
      
      Fourth, and last, set of fixes for v5.6. Just two important fixes to
      iwlwifi regressions.
      
      iwlwifi
      
      * fix GEO_TX_POWER_LIMIT command on certain devices which caused
        firmware to crash during initialisation
      
      * add back device ids for three devices which were accidentally
        removed
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2910594f
    • Pablo Neira Ayuso's avatar
      net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build · 2c64605b
      Pablo Neira Ayuso authored
      net/netfilter/nft_fwd_netdev.c: In function ‘nft_fwd_netdev_eval’:
          net/netfilter/nft_fwd_netdev.c:32:10: error: ‘struct sk_buff’ has no member named ‘tc_redirected’
            pkt->skb->tc_redirected = 1;
                    ^~
          net/netfilter/nft_fwd_netdev.c:33:10: error: ‘struct sk_buff’ has no member named ‘tc_from_ingress’
            pkt->skb->tc_from_ingress = 1;
                    ^~
      
      To avoid a direct dependency with tc actions from netfilter, wrap the
      redirect bits around CONFIG_NET_REDIRECT and move helpers to
      include/linux/skbuff.h. Turn on this toggle from the ifb driver, the
      only existing client of these bits in the tree.
      
      This patch adds skb_set_redirected() that sets on the redirected bit
      on the skbuff, it specifies if the packet was redirect from ingress
      and resets the timestamp (timestamp reset was originally missing in the
      netfilter bugfix).
      
      Fixes: bcfabee1 ("netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress")
      Reported-by: noreply@ellerman.id.au
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c64605b
    • Guilherme G. Piccoli's avatar
      net: ena: Add PCI shutdown handler to allow safe kexec · 428c4913
      Guilherme G. Piccoli authored
      Currently ENA only provides the PCI remove() handler, used during rmmod
      for example. This is not called on shutdown/kexec path; we are potentially
      creating a failure scenario on kexec:
      
      (a) Kexec is triggered, no shutdown() / remove() handler is called for ENA;
      instead pci_device_shutdown() clears the master bit of the PCI device,
      stopping all DMA transactions;
      
      (b) Kexec reboot happens and the device gets enabled again, likely having
      its FW with that DMA transaction buffered; then it may trigger the (now
      invalid) memory operation in the new kernel, corrupting kernel memory area.
      
      This patch aims to prevent this, by implementing a shutdown() handler
      quite similar to the remove() one - the difference being the handling
      of the netdev, which is unregistered on remove(), but following the
      convention observed in other drivers, it's only detached on shutdown().
      
      This prevents an odd issue in AWS Nitro instances, in which after the 2nd
      kexec the next one will fail with an initrd corruption, caused by a wild
      DMA write to invalid kernel memory. The lspci output for the adapter
      present in my instance is:
      
      00:05.0 Ethernet controller [0200]: Amazon.com, Inc. Elastic Network
      Adapter (ENA) [1d0f:ec20]
      Suggested-by: default avatarGavin Shan <gshan@redhat.com>
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@canonical.com>
      Acked-by: default avatarSameeh Jubran <sameehj@amazon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      428c4913
    • Hangbin Liu's avatar
      selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED · c085dbfb
      Hangbin Liu authored
      The lib files should not be defined as TEST_PROGS, or we will run them
      in run_kselftest.sh.
      
      Also remove ethtool_lib.sh exec permission.
      
      Fixes: 81573b18 ("selftests/net/forwarding: add Makefile to install tests")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c085dbfb
    • Hangbin Liu's avatar
      selftests/net: add missing tests to Makefile · 919a23e9
      Hangbin Liu authored
      Find some tests are missed in Makefile by running:
      for file in $(ls *.sh); do grep -q $file Makefile || echo $file; done
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      919a23e9
    • Linus Torvalds's avatar
      Merge tag 'zonefs-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · e2cf67f6
      Linus Torvalds authored
      Pull zonefs fix from Damien Le Moal:
       "A single fix from me to correctly handle the size of read-only zone
        files"
      
      * tag 'zonefs-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonfs: Fix handling of read-only zones
      e2cf67f6
    • Shane Francis's avatar
      drm/radeon: fix scatter-gather mapping with user pages · 47f7826c
      Shane Francis authored
      Calls to dma_map_sg may return less segments / entries than requested
      if they fall on page bounderies. The old implementation did not
      support this use case.
      
      Fixes: be62dbf5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api")
      Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206461
      Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206895
      Bug: https://gitlab.freedesktop.org/drm/amd/issues/1056Signed-off-by: default avatarShane Francis <bigbeeshane@gmail.com>
      Reviewed-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200325090741.21957-4-bigbeeshane@gmail.com
      Cc: stable@vger.kernel.org
      47f7826c