1. 17 Feb, 2020 17 commits
    • David S. Miller's avatar
      Merge branch 'atlantic-fixes' · 0b634c0e
      David S. Miller authored
      Igor Russkikh says:
      
      ====================
      Marvell atlantic 2020/02 updates
      
      Hi David, here is another set of bugfixes on AQC family found on
      last integration phase.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b634c0e
    • Dmitry Bogdanov's avatar
      net: atlantic: fix out of range usage of active_vlans array · 5a292c89
      Dmitry Bogdanov authored
      fix static checker warning:
       drivers/net/ethernet/aquantia/atlantic/aq_filters.c:166 aq_check_approve_fvlan()
       error: passing untrusted data to 'test_bit()'
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Fixes: 7975d2af: ("net: aquantia: add support of rx-vlan-filter offload")
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a292c89
    • Pavel Belous's avatar
      net: atlantic: possible fault in transition to hibernation · 52a22f4d
      Pavel Belous authored
      during hibernation freeze, aq_nic_stop could be invoked
      on a stopped device. That may cause panic on access to
      not yet allocated vector/ring structures.
      
      Add a check to stop device if it is not yet stopped.
      
      Similiarly after freeze in hibernation thaw, aq_nic_start
      could be invoked on a not initialized net device.
      Result will be the same.
      
      Add a check to start device if it is initialized.
      In our case, this is the same as started.
      
      Fixes: 8aaa112a ("net: atlantic: refactoring pm logic")
      Signed-off-by: default avatarPavel Belous <pbelous@marvell.com>
      Signed-off-by: default avatarNikita Danilov <ndanilov@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52a22f4d
    • Pavel Belous's avatar
      net: atlantic: fix potential error handling · 380ec5b9
      Pavel Belous authored
      Code inspection found that in case of mapping error we do return current
      'ret' value. But beside error, it is used to count number of descriptors
      allocated for the packet. In that case map_skb function could return '1'.
      
      Changing it to return zero (number of mapped descriptors for skb)
      
      Fixes: 018423e9 ("net: ethernet: aquantia: Add ring support code")
      Signed-off-by: default avatarPavel Belous <pbelous@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      380ec5b9
    • Pavel Belous's avatar
      net: atlantic: fix use after free kasan warn · a4980919
      Pavel Belous authored
      skb->len is used to calculate statistics after xmit invocation.
      
      Under a stress load it may happen that skb will be xmited,
      rx interrupt will come and skb will be freed, all before xmit function
      is even returned.
      
      Eventually, skb->len will access unallocated area.
      
      Moving stats calculation into tx_clean routine.
      
      Fixes: 018423e9 ("net: ethernet: aquantia: Add ring support code")
      Reported-by: default avatarChristophe Vu-Brugier <cvubrugier@fastmail.fm>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarPavel Belous <pbelous@marvell.com>
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4980919
    • Nikita Danilov's avatar
      net: atlantic: better loopback mode handling · b42726fc
      Nikita Danilov authored
      Add checks to not enable multiple loopback modes simultaneously,
      It was also discovered that for dma loopback to function correctly
      promisc mode should be enabled on device.
      
      Fixes: ea4b4d7f ("net: atlantic: loopback tests via private flags")
      Signed-off-by: default avatarNikita Danilov <ndanilov@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b42726fc
    • Egor Pomozov's avatar
      net: atlantic: ptp gpio adjustments · f08a464c
      Egor Pomozov authored
      Clock adjustment data should be passed to FW as well, otherwise in some
      cases a drift was observed when using GPIO features.
      Signed-off-by: default avatarEgor Pomozov <epomozov@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f08a464c
    • Igor Russkikh's avatar
      net: atlantic: check rpc result and wait for rpc address · e7b5f97e
      Igor Russkikh authored
      Artificial HW reliability tests revealed a possible hangup in
      the driver. Normally, when device disappears from bus, all
      register reads returns 0xFFFFFFFF.
      
      At remote procedure invocation towards FW there is a logic
      where result is compared with -1 in a loop.
      That caused an infinite loop if hardware due to some issues
      disappears from bus.
      
      Add extra result checks to prevent this.
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e7b5f97e
    • Dmitry Bezrukov's avatar
      net: atlantic: checksum compat issue · 15beab0a
      Dmitry Bezrukov authored
      Yet another checksum offload compatibility issue was found.
      
      The known issue is that AQC HW marks tcp packets with 0xFFFF checksum
      as invalid (1). This is workarounded in driver, passing all the suspicious
      packets up to the stack for further csum validation.
      
      Another HW problem (2) is that it hides invalid csum of LRO aggregated
      packets inside of the individual descriptors. That was workarounded
      by forced scan of all LRO descriptors for checksum errors.
      
      However the scan logic was joint for both LRO and multi-descriptor
      packets (jumbos). And this causes the issue.
      
      We have to drop LRO packets with the detected bad checksum
      because of (2), but we have to pass jumbo packets to stack because of (1).
      
      When using windows tcp partner with jumbo frames but with LSO disabled
      driver discards such frames as bad checksummed. But only LRO frames
      should be dropped, not jumbos.
      
      On such a configurations tcp stream have a chance of drops and stucks.
      
      (1) 76f254d4 ("net: aquantia: tcp checksum 0xffff being handled incorrectly")
      (2) d08b9a0a ("net: aquantia: do not pass lro session with invalid tcp checksum")
      
      Fixes: d08b9a0a ("net: aquantia: do not pass lro session with invalid tcp checksum")
      Signed-off-by: default avatarDmitry Bezrukov <dbezrukov@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      15beab0a
    • Hangbin Liu's avatar
      selftests: forwarding: vxlan_bridge_1d: fix tos value · 4e867c9a
      Hangbin Liu authored
      After commit 71130f29 ("vxlan: fix tos value before xmit") we start
      strict vxlan xmit tos value by RT_TOS(), which limits the tos value less
      than 0x1E. With current value 0x40 the test will failed with "v1: Expected
      to capture 10 packets, got 0". So let's choose a smaller tos value for
      testing.
      
      Fixes: d417ecf5 ("selftests: forwarding: vxlan_bridge_1d: Add a TOS test")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e867c9a
    • Eric Dumazet's avatar
      net: rtnetlink: fix bugs in rtnl_alt_ifname() · 44bfa9c5
      Eric Dumazet authored
      Since IFLA_ALT_IFNAME is an NLA_STRING, we have no
      guarantee it is nul terminated.
      
      We should use nla_strdup() instead of kstrdup(), since this
      helper will make sure not accessing out-of-bounds data.
      
      BUG: KMSAN: uninit-value in strlen+0x5e/0xa0 lib/string.c:535
      CPU: 1 PID: 19157 Comm: syz-executor.5 Not tainted 5.5.0-rc5-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x1c9/0x220 lib/dump_stack.c:118
       kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118
       __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
       strlen+0x5e/0xa0 lib/string.c:535
       kstrdup+0x7f/0x1a0 mm/util.c:59
       rtnl_alt_ifname net/core/rtnetlink.c:3495 [inline]
       rtnl_linkprop+0x85d/0xc00 net/core/rtnetlink.c:3553
       rtnl_newlinkprop+0x9d/0xb0 net/core/rtnetlink.c:3568
       rtnetlink_rcv_msg+0x1153/0x1570 net/core/rtnetlink.c:5424
       netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2477
       rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5442
       netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
       netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1328
       netlink_sendmsg+0x1248/0x14d0 net/netlink/af_netlink.c:1917
       sock_sendmsg_nosec net/socket.c:639 [inline]
       sock_sendmsg net/socket.c:659 [inline]
       ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330
       ___sys_sendmsg net/socket.c:2384 [inline]
       __sys_sendmsg+0x451/0x5f0 net/socket.c:2417
       __do_sys_sendmsg net/socket.c:2426 [inline]
       __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424
       __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424
       do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      RIP: 0033:0x45b3b9
      Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
      RSP: 002b:00007ff1c7b1ac78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      RAX: ffffffffffffffda RBX: 00007ff1c7b1b6d4 RCX: 000000000045b3b9
      RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003
      RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
      R13: 00000000000009cb R14: 00000000004cb3dd R15: 000000000075bf2c
      
      Uninit was created at:
       kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
       kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127
       kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:82
       slab_alloc_node mm/slub.c:2774 [inline]
       __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4382
       __kmalloc_reserve net/core/skbuff.c:141 [inline]
       __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:209
       alloc_skb include/linux/skbuff.h:1049 [inline]
       netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline]
       netlink_sendmsg+0x7d3/0x14d0 net/netlink/af_netlink.c:1892
       sock_sendmsg_nosec net/socket.c:639 [inline]
       sock_sendmsg net/socket.c:659 [inline]
       ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330
       ___sys_sendmsg net/socket.c:2384 [inline]
       __sys_sendmsg+0x451/0x5f0 net/socket.c:2417
       __do_sys_sendmsg net/socket.c:2426 [inline]
       __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424
       __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424
       do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 36fbf1e5 ("net: rtnetlink: add linkprop commands to add and delete alternative ifnames")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Jiri Pirko <jiri@mellanox.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44bfa9c5
    • Alexandre Belloni's avatar
      net: macb: ensure interface is not suspended on at91rm9200 · e6a41c23
      Alexandre Belloni authored
      Because of autosuspend, at91ether_start is called with clocks disabled.
      Ensure that pm_runtime doesn't suspend the interface as soon as it is
      opened as there is no pm_runtime support is the other relevant parts of the
      platform support for at91rm9200.
      
      Fixes: d54f89af ("net: macb: Add pm runtime support")
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6a41c23
    • Jethro Beekman's avatar
      net: fib_rules: Correctly set table field when table number exceeds 8 bits · 540e585a
      Jethro Beekman authored
      In 709772e6, RT_TABLE_COMPAT was added to
      allow legacy software to deal with routing table numbers >= 256, but the
      same change to FIB rule queries was overlooked.
      Signed-off-by: default avatarJethro Beekman <jethro@fortanix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      540e585a
    • Leon Romanovsky's avatar
      net/rds: Track user mapped pages through special API · 0d4597c8
      Leon Romanovsky authored
      Convert net/rds to use the newly introduces pin_user_pages() API,
      which properly sets FOLL_PIN. Setting FOLL_PIN is now required for
      code that requires tracking of pinned pages.
      
      Note that this effectively changes the code's behavior: it now
      ultimately calls set_page_dirty_lock(), instead of set_page_dirty().
      This is probably more accurate.
      
      As Christoph Hellwig put it, "set_page_dirty() is only safe if we are
      dealing with a file backed page where we have reference on the inode it
      hangs off." [1]
      
      [1] https://lore.kernel.org/r/20190723153640.GB720@lst.de
      
      Cc: Hans Westgaard Ry <hans.westgaard.ry@oracle.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d4597c8
    • Benjamin Poirier's avatar
      ipv6: Fix nlmsg_flags when splitting a multipath route · afecdb37
      Benjamin Poirier authored
      When splitting an RTA_MULTIPATH request into multiple routes and adding the
      second and later components, we must not simply remove NLM_F_REPLACE but
      instead replace it by NLM_F_CREATE. Otherwise, it may look like the netlink
      message was malformed.
      
      For example,
      	ip route add 2001:db8::1/128 dev dummy0
      	ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0 \
      		nexthop via fe80::30:2 dev dummy0
      results in the following warnings:
      [ 1035.057019] IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE
      [ 1035.057517] IPv6: NLM_F_CREATE should be set when creating new route
      
      This patch makes the nlmsg sequence look equivalent for __ip6_ins_rt() to
      what it would get if the multipath route had been added in multiple netlink
      operations:
      	ip route add 2001:db8::1/128 dev dummy0
      	ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0
      	ip route append 2001:db8::1/128 nexthop via fe80::30:2 dev dummy0
      
      Fixes: 27596472 ("ipv6: fix ECMP route replacement")
      Signed-off-by: default avatarBenjamin Poirier <bpoirier@cumulusnetworks.com>
      Reviewed-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      afecdb37
    • Benjamin Poirier's avatar
      ipv6: Fix route replacement with dev-only route · e404b8c7
      Benjamin Poirier authored
      After commit 27596472 ("ipv6: fix ECMP route replacement") it is no
      longer possible to replace an ECMP-able route by a non ECMP-able route.
      For example,
      	ip route add 2001:db8::1/128 via fe80::1 dev dummy0
      	ip route replace 2001:db8::1/128 dev dummy0
      does not work as expected.
      
      Tweak the replacement logic so that point 3 in the log of the above commit
      becomes:
      3. If the new route is not ECMP-able, and no matching non-ECMP-able route
      exists, replace matching ECMP-able route (if any) or add the new route.
      
      We can now summarize the entire replace semantics to:
      When doing a replace, prefer replacing a matching route of the same
      "ECMP-able-ness" as the replace argument. If there is no such candidate,
      fallback to the first route found.
      
      Fixes: 27596472 ("ipv6: fix ECMP route replacement")
      Signed-off-by: default avatarBenjamin Poirier <bpoirier@cumulusnetworks.com>
      Reviewed-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e404b8c7
    • Hangbin Liu's avatar
      selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing · e8023b03
      Hangbin Liu authored
      For tc ip_proto filter, when we extract the flow via __skb_flow_dissect()
      without flag FLOW_DISSECTOR_F_STOP_AT_ENCAP, we will continue extract to
      the inner proto.
      
      So for GRE + ICMP messages, we should not track GRE proto, but inner ICMP
      proto.
      
      For test mirror_gre.sh, it may make user confused if we capture ICMP
      message on $h3(since the flow is GRE message). So I move the capture
      dev to h3-gt{4,6}, and only capture ICMP message.
      
      Before the fix:
      ]# ./mirror_gre.sh
      TEST: ingress mirror to gretap (skip_hw)                            [ OK ]
      TEST: egress mirror to gretap (skip_hw)                             [ OK ]
      TEST: ingress mirror to ip6gretap (skip_hw)                         [ OK ]
      TEST: egress mirror to ip6gretap (skip_hw)                          [ OK ]
      TEST: ingress mirror to gretap: envelope MAC (skip_hw)              [FAIL]
       Expected to capture 10 packets, got 0.
      TEST: egress mirror to gretap: envelope MAC (skip_hw)               [FAIL]
       Expected to capture 10 packets, got 0.
      TEST: ingress mirror to ip6gretap: envelope MAC (skip_hw)           [FAIL]
       Expected to capture 10 packets, got 0.
      TEST: egress mirror to ip6gretap: envelope MAC (skip_hw)            [FAIL]
       Expected to capture 10 packets, got 0.
      TEST: two simultaneously configured mirrors (skip_hw)               [ OK ]
      WARN: Could not test offloaded functionality
      
      After fix:
      ]# ./mirror_gre.sh
      TEST: ingress mirror to gretap (skip_hw)                            [ OK ]
      TEST: egress mirror to gretap (skip_hw)                             [ OK ]
      TEST: ingress mirror to ip6gretap (skip_hw)                         [ OK ]
      TEST: egress mirror to ip6gretap (skip_hw)                          [ OK ]
      TEST: ingress mirror to gretap: envelope MAC (skip_hw)              [ OK ]
      TEST: egress mirror to gretap: envelope MAC (skip_hw)               [ OK ]
      TEST: ingress mirror to ip6gretap: envelope MAC (skip_hw)           [ OK ]
      TEST: egress mirror to ip6gretap: envelope MAC (skip_hw)            [ OK ]
      TEST: two simultaneously configured mirrors (skip_hw)               [ OK ]
      WARN: Could not test offloaded functionality
      
      Fixes: ba8d3987 ("selftests: forwarding: Add test for mirror to gretap")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Reviewed-by: default avatarPetr Machata <pmachata@gmail.com>
      Tested-by: default avatarPetr Machata <pmachata@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8023b03
  2. 14 Feb, 2020 23 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 2019fc96
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix interrupt name truncation in mv88e6xxx dsa driver, from Andrew
          Lunn.
      
       2) Process generic XDP even if SKB is cloned, from Toke Høiland-Jørgensen.
      
       3) Fix leak of kernel memory to userspace in smc, from Eric Dumazet.
      
       4) Add some missing netlink attribute validation to matchall and
          flower, from Davide Caratti.
      
       5) Send icmp responses properly when NAT has been applied to the frame
          before we get to the tunnel emitting the icmp, from Jason Donenfeld.
      
       6) Make sure there is enough SKB headroom when adding dsa tags for qca
          and ar9331. From Per Forlin.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits)
        netdevice.h: fix all kernel-doc and Sphinx warnings
        net: dsa: tag_ar9331: Make sure there is headroom for tag
        net: dsa: tag_qca: Make sure there is headroom for tag
        net, ip6_tunnel: enhance tunnel locate with link check
        net/smc: no peer ID in CLC decline for SMCD
        net/smc: transfer fasync_list in case of fallback
        net: hns3: fix a copying IPv6 address error in hclge_fd_get_flow_tuples()
        net: hns3: fix VF bandwidth does not take effect in some case
        net: hns3: add management table after IMP reset
        mac80211: fix wrong 160/80+80 MHz setting
        cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE
        xfrm: interface: use icmp_ndo_send helper
        wireguard: device: use icmp_ndo_send helper
        sunvnet: use icmp_ndo_send helper
        gtp: use icmp_ndo_send helper
        icmp: introduce helper for nat'd source address in network device context
        net/sched: flower: add missing validation of TCA_FLOWER_FLAGS
        net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS
        net/flow_dissector: remove unexist field description
        page_pool: refill page when alloc.count of pool is zero
        ...
      2019fc96
    • Linus Torvalds's avatar
      Merge tag 'pm-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 4e03e4e6
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Fix three issues related to the handling of wakeup events signaled
        through the ACPI SCI while suspended to idle (Rafael Wysocki) and
        unexport an internal cpufreq variable (Yangtao Li)"
      
      * tag 'pm-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system
        ACPICA: Introduce acpi_any_gpe_status_set()
        ACPI: PM: s2idle: Avoid possible race related to the EC GPE
        ACPI: EC: Fix flushing of pending work
        cpufreq: Make cpufreq_global_kobject static
      4e03e4e6
    • Linus Torvalds's avatar
      Merge tag 'sound-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 81f3011c
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "The only common change is the regression fix of the previous PCM fix
        patch for managed buffers while the rest are usual suspects, USB-audio
        and HD-audio device-specific quirks.
      
        The change for UAC2 clock validation workaround became a bit big, but
        the changes are fairly straightforward"
      
      * tag 'sound-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: pcm: Fix double hw_free calls
        ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000
        ALSA: hda/realtek - Fix silent output on MSI-GL73
        ALSA: hda/realtek - Add more codec supported Headset Button
        ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
        ALSA: usb-audio: Fix UAC2/3 effect unit parsing
        ALSA: usb-audio: Apply 48kHz fixed rate playback for Jabra Evolve 65 headset
      81f3011c
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-02-14' of git://anongit.freedesktop.org/drm/drm · 3f0d3293
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "The core has a build fix for edid code on certain compilers/arches/,
        one MST fix and one vgem fix. Regular amdgpu fixes, and a couple of
        small driver fixes.
      
        The i915 fixes are bit larger than normal for this stage, but they
        were having CI issues last week, and they hadn't sent any fixes last
        week due to this.
      
        core:
         - edid build fix
      
        mst:
         - fix NULL ptr deref
      
        vgem:
         - fix close after free
      
        msm:
         - better dma-api usage
      
        sun4i:
         - disable allow_fb_modifiers
      
        amdgpu:
         - Additional OD fixes for navi
         - Misc display fixes
         - VCN 2.5 DPG fix
         - Prevent build errors on PowerPC on some configs
         - GDS EDC fix
      
        i915:
         - dsi/acpi fixes
         - gvt locking and allocation fixes
         - gem/gt fixes
         - bios timing parameters fix"
      
      * tag 'drm-fixes-2020-02-14' of git://anongit.freedesktop.org/drm/drm: (50 commits)
        drm/i915: Mark the removal of the i915_request from the sched.link
        drm/i915/execlists: Reclaim the hanging virtual request
        drm/i915/execlists: Take a reference while capturing the guilty request
        drm/i915/execlists: Offline error capture
        drm/i915/gt: Allow temporary suspension of inflight requests
        drm/i915: Keep track of request among the scheduling lists
        drm/i915/gem: Tighten checks and acquiring the mmap object
        drm/i915: Fix preallocated barrier list append
        drm/i915/gt: Acquire ce->active before ce->pin_count/ce->pin_mutex
        drm/i915: Tighten atomicity of i915_active_acquire vs i915_active_release
        drm/i915: Stub out i915_gpu_coredump_put
        drm/amdgpu:/navi10: use the ODCAP enum to index the caps array
        drm/amdgpu: update smu_v11_0_pptable.h
        drm/amdgpu: correct comment to clear up the confusion
        drm/amd/display: DCN2.x Do not program DPPCLK if same value
        drm/amd/display: Don't map ATOM_ENABLE to ATOM_INIT
        drm/amdgpu/vcn2.5: fix warning
        drm/amdgpu: limit GDS clearing workaround in cold boot sequence
        drm/amdgpu: fix amdgpu pmu to use hwc->config instead of hwc->conf
        amdgpu: Prevent build errors regarding soft/hard-float FP ABI tags
        ...
      3f0d3293
    • Randy Dunlap's avatar
      netdevice.h: fix all kernel-doc and Sphinx warnings · a1fa83bd
      Randy Dunlap authored
      Eliminate all kernel-doc and Sphinx warnings in
      <linux/netdevice.h>.  Fixes these warnings:
      
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'gso_partial_features' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'tlsdev_ops' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'name_assign_type' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'mpls_ptr' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xdp_prog' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xdp_bulkq' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xps_cpus_map' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xps_rxqs_map' not described in 'net_device'
      ../include/linux/netdevice.h:2100: warning: Function parameter or member 'qdisc_hash' not described in 'net_device'
      ../include/linux/netdevice.h:3552: WARNING: Inline emphasis start-string without end-string.
      ../include/linux/netdevice.h:3552: WARNING: Inline emphasis start-string without end-string.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1fa83bd
    • David S. Miller's avatar
      Merge branch 'dsa-headroom' · 3ea89fa7
      David S. Miller authored
      Per Forlin says:
      
      ====================
      net: dsa: Make sure there is headroom for tag
      
      Sorry for re-posting yet another time....
      I manage to include multiple email-senders and forgot to include cover-letter.
      Let's hope everyhthing is in order this time.
      
      Fix two tag drivers to make sure there is headroom for the tag data.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ea89fa7
    • Per Forlin's avatar
      net: dsa: tag_ar9331: Make sure there is headroom for tag · ddc9abaf
      Per Forlin authored
      Passing tag size to skb_cow_head will make sure
      there is enough headroom for the tag data.
      This change does not introduce any overhead in case there
      is already available headroom for tag.
      Signed-off-by: default avatarPer Forlin <perfn@axis.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ddc9abaf
    • Per Forlin's avatar
      net: dsa: tag_qca: Make sure there is headroom for tag · 04fb9124
      Per Forlin authored
      Passing tag size to skb_cow_head will make sure
      there is enough headroom for the tag data.
      This change does not introduce any overhead in case there
      is already available headroom for tag.
      Signed-off-by: default avatarPer Forlin <perfn@axis.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      04fb9124
    • William Dauchy's avatar
      net, ip6_tunnel: enhance tunnel locate with link check · 5fdcce21
      William Dauchy authored
      With ipip, it is possible to create an extra interface explicitly
      attached to a given physical interface:
      
        # ip link show tunl0
        4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ipip 0.0.0.0 brd 0.0.0.0
        # ip link add tunl1 type ipip dev eth0
        # ip link show tunl1
        6: tunl1@eth0: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ipip 0.0.0.0 brd 0.0.0.0
      
      But it is not possible with ip6tnl:
      
        # ip link show ip6tnl0
        5: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000
            link/tunnel6 :: brd ::
        # ip link add ip6tnl1 type ip6tnl dev eth0
        RTNETLINK answers: File exists
      
      This patch aims to make it possible by adding link comparaison in both
      tunnel locate and lookup functions; we also modify mtu calculation when
      attached to an interface with a lower mtu.
      
      This permits to make use of x-netns communication by moving the newly
      created tunnel in a given netns.
      Signed-off-by: default avatarWilliam Dauchy <w.dauchy@criteo.com>
      Reviewed-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5fdcce21
    • David S. Miller's avatar
      Merge tag 'mac80211-for-net-2020-02-14' of... · b32cb6fc
      David S. Miller authored
      Merge tag 'mac80211-for-net-2020-02-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      Just a few fixes:
       * avoid running out of tracking space for frames that need
         to be reported to userspace by using more bits
       * fix beacon handling suppression by adding some relevant
         elements to the CRC calculation
       * fix quiet mode in action frames
       * fix crash in ethtool for virt_wifi and similar
       * add a missing policy entry
       * fix 160 & 80+80 bandwidth to take local capabilities into
         account
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b32cb6fc
    • David S. Miller's avatar
      Merge branch 'smc-fixes' · 907e51e4
      David S. Miller authored
      Karsten Graul says:
      
      ====================
      net/smc: fixes for -net
      
      Fix a syzbot finding and a problem with the CLC handshake content.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      907e51e4
    • Ursula Braun's avatar
      net/smc: no peer ID in CLC decline for SMCD · 369537c9
      Ursula Braun authored
      Just SMCR requires a CLC Peer ID, but not SMCD. The field should be
      zero for SMCD.
      
      Fixes: c758dfdd ("net/smc: add SMC-D support in CLC messages")
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      369537c9
    • Ursula Braun's avatar
      net/smc: transfer fasync_list in case of fallback · 67f562e3
      Ursula Braun authored
      SMC does not work together with FASTOPEN. If sendmsg() is called with
      flag MSG_FASTOPEN in SMC_INIT state, the SMC-socket switches to
      fallback mode. To handle the previous ioctl FIOASYNC call correctly
      in this case, it is necessary to transfer the socket wait queue
      fasync_list to the internal TCP socket.
      
      Reported-by: syzbot+4b1fe8105f8044a26162@syzkaller.appspotmail.com
      Fixes: ee9dfbef ("net/smc: handle sockopts forcing fallback")
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67f562e3
    • David S. Miller's avatar
      Merge branch 'hns3-fixes' · dc221a28
      David S. Miller authored
      Huazhong Tan says:
      
      ====================
      net: hns3: fixes for -net
      
      This series includes three bugfixes for the HNS3 ethernet driver.
      
      [patch 1] fixes a management table lost issue after IMP reset.
      [patch 2] fixes a VF bandwidth configuration not work problem.
      [patch 3] fixes a problem related to IPv6 address copying.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc221a28
    • Guangbin Huang's avatar
      net: hns3: fix a copying IPv6 address error in hclge_fd_get_flow_tuples() · 47327c93
      Guangbin Huang authored
      The IPv6 address defined in struct in6_addr is specified as
      big endian, but there is no specified endian in struct
      hclge_fd_rule_tuples, so it  will cause a problem if directly
      use memcpy() to copy ipv6 address between these two structures
      since this field in struct hclge_fd_rule_tuples is little endian.
      
      This patch fixes this problem by using be32_to_cpu() to convert
      endian of IPv6 address of struct in6_addr before copying.
      
      Fixes: d93ed94f ("net: hns3: add aRFS support for PF")
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      47327c93
    • Yonglong Liu's avatar
      net: hns3: fix VF bandwidth does not take effect in some case · 19eb1123
      Yonglong Liu authored
      When enabling 4 TC after setting the bandwidth of VF, the bandwidth
      of VF will resume to default value, because of the qset resources
      changed in this case.
      
      This patch fixes it by using a fixed VF's qset resources according to
      HNAE3_MAX_TC macro.
      
      Fixes: ee9e4424 ("net: hns3: add support for configuring bandwidth of VF on the host")
      Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      19eb1123
    • Yufeng Mo's avatar
      net: hns3: add management table after IMP reset · d0db7ed3
      Yufeng Mo authored
      In the current process, the management table is missing after the
      IMP reset. This patch adds the management table to the reset process.
      
      Fixes: f5aac71c ("net: hns3: add manager table initialization for hardware")
      Signed-off-by: default avatarYufeng Mo <moyufeng@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0db7ed3
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 3629ac5b
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: Make cpufreq_global_kobject static
      3629ac5b
    • Shay Bar's avatar
      mac80211: fix wrong 160/80+80 MHz setting · 33181ea7
      Shay Bar authored
      Before this patch, STA's would set new width of 160/80+80 MHz based on AP capability only.
      This is wrong because STA may not support > 80MHz BW.
      Fix is to verify STA has 160/80+80 MHz capability before increasing its width to > 80MHz.
      
      The "support_80_80" and "support_160" setting is based on:
      "Table 9-272 — Setting of the Supported Channel Width Set subfield and Extended NSS BW
      Support subfield at a STA transmitting the VHT Capabilities Information field"
      From "Draft P802.11REVmd_D3.0.pdf"
      Signed-off-by: default avatarAviad Brikman <aviad.brikman@celeno.com>
      Signed-off-by: default avatarShay Bar <shay.bar@celeno.com>
      Link: https://lore.kernel.org/r/20200210130728.23674-1-shay.bar@celeno.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      33181ea7
    • Sergey Matyukevich's avatar
      cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE · ea750801
      Sergey Matyukevich authored
      The nl80211_policy is missing for NL80211_ATTR_STATUS_CODE attribute.
      As a result, for strictly validated commands, it's assumed to not be
      supported.
      Signed-off-by: default avatarSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
      Link: https://lore.kernel.org/r/20200213131608.10541-2-sergey.matyukevich.os@quantenna.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      ea750801
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-fixes-2020-02-13' of... · 6f4134b3
      Dave Airlie authored
      Merge tag 'drm-intel-next-fixes-2020-02-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.6-rc2
      
      Most of these were aimed at a "next fixes" pull already during the merge
      window, but there were issues with the baseline I used, which resulted
      in a lot of issues in CI. I've regenerated this stuff piecemeal now,
      adding gradually to it, and it seems healthy now.
      
      Due to the issues this is much bigger than I'd like. But it was
      obviously necessary to take the time to ensure it's not garbage...
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/878sl6yfrn.fsf@intel.com
      6f4134b3
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.6-2020-02-12' of... · e44c1e3a
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.6-2020-02-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.6-2020-02-12:
      
      amdgpu:
      - Additional OD fixes for navi
      - Misc display fixes
      - VCN 2.5 DPG fix
      - Prevent build errors on PowerPC on some configs
      - GDS EDC fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200212224746.3992-1-alexander.deucher@amd.com
      e44c1e3a
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-fixes-2020-02-07' of... · 7ebdc26a
      Dave Airlie authored
      Merge tag 'drm-misc-next-fixes-2020-02-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
      
      drm-misc-next fixes for v5.6:
      - Fix build error in drm/edid.
      - Plug close-after-free race in vgem_gem_create.
      - Handle CONFIG_DMA_API_DEBUG_SG better in drm/msm.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/551b6183-a581-9d12-10a9-24cd929de425@linux.intel.com
      7ebdc26a