1. 09 12月, 2020 3 次提交
  2. 08 12月, 2020 3 次提交
  3. 07 12月, 2020 1 次提交
    • H
      net: hns3: remove a misused pragma packed · 61f54de2
      Huazhong Tan 提交于
      hclge_dbg_reg_info[] is defined as an array of packed structure
      accidentally. However, this array contains pointers, which are
      no longer aligned naturally, and cannot be relocated on PPC64.
      Hence, when compile-testing this driver on PPC64 with
      CONFIG_RELOCATABLE=y (e.g. PowerPC allyesconfig), there will be
      some warnings.
      
      Since each field in structure hclge_qos_pri_map_cmd and
      hclge_dbg_bitmap_cmd is type u8, the pragma packed is unnecessary
      for these two structures as well, so remove the pragma packed in
      hclge_debugfs.h to fix this issue, and this increases
      hclge_dbg_reg_info[] by 4 bytes per entry.
      
      Fixes: a582b78d ("net: hns3: code optimization for debugfs related to "dump reg"")
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61f54de2
  4. 06 12月, 2020 5 次提交
  5. 05 12月, 2020 2 次提交
    • A
      ethernet: select CONFIG_CRC32 as needed · 0b32e91f
      Arnd Bergmann 提交于
      A number of ethernet drivers require crc32 functionality to be
      avaialable in the kernel, causing a link error otherwise:
      
      arm-linux-gnueabi-ld: drivers/net/ethernet/agere/et131x.o: in function `et1310_setup_device_for_multicast':
      et131x.c:(.text+0x5918): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/cadence/macb_main.o: in function `macb_start_xmit':
      macb_main.c:(.text+0x4b88): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/faraday/ftgmac100.o: in function `ftgmac100_set_rx_mode':
      ftgmac100.c:(.text+0x2b38): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fec_main.o: in function `set_multicast_list':
      fec_main.c:(.text+0x6120): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o: in function `dtsec_add_hash_mac_address':
      fman_dtsec.c:(.text+0x830): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o:fman_dtsec.c:(.text+0xb68): more undefined references to `crc32_le' follow
      arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_hwinfo.o: in function `nfp_hwinfo_read':
      nfp_hwinfo.c:(.text+0x250): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: nfp_hwinfo.c:(.text+0x288): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_resource.o: in function `nfp_resource_acquire':
      nfp_resource.c:(.text+0x144): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: nfp_resource.c:(.text+0x158): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: drivers/net/ethernet/nxp/lpc_eth.o: in function `lpc_eth_set_multicast_list':
      lpc_eth.c:(.text+0x1934): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_do':
      rocker_ofdpa.c:(.text+0x2e08): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_del':
      rocker_ofdpa.c:(.text+0x3074): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_port_fdb':
      arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.o: in function `mlx5dr_ste_calc_hash_index':
      dr_ste.c:(.text+0x354): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/lan743x_main.o: in function `lan743x_netdev_set_multicast':
      lan743x_main.c:(.text+0x5dc4): undefined reference to `crc32_le'
      
      Add the missing 'select CRC32' entries in Kconfig for each of them.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com>
      Acked-by: NMadalin Bucur <madalin.bucur@oss.nxp.com>
      Acked-by: NMark Einon <mark.einon@gmail.com>
      Acked-by: NSimon Horman <simon.horman@netronome.com>
      Link: https://lore.kernel.org/r/20201203232114.1485603-1-arnd@kernel.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      0b32e91f
    • A
      net: ipa: pass the correct size when freeing DMA memory · 1130b252
      Alex Elder 提交于
      When the coherent memory is freed in gsi_trans_pool_exit_dma(), we
      are mistakenly passing the size of a single element in the pool
      rather than the actual allocated size.  Fix this bug.
      
      Fixes: 9dd441e4 ("soc: qcom: ipa: GSI transactions")
      Reported-by: NStephen Boyd <swboyd@chromium.org>
      Tested-by: NSujit Kautkar <sujitka@chromium.org>
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Link: https://lore.kernel.org/r/20201203215106.17450-1-elder@linaro.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      1130b252
  6. 04 12月, 2020 7 次提交
  7. 03 12月, 2020 8 次提交
  8. 02 12月, 2020 4 次提交
    • E
      geneve: pull IP header before ECN decapsulation · 4179b00c
      Eric Dumazet 提交于
      IP_ECN_decapsulate() and IP6_ECN_decapsulate() assume
      IP header is already pulled.
      
      geneve does not ensure this yet.
      
      Fixing this generically in IP_ECN_decapsulate() and
      IP6_ECN_decapsulate() is not possible, since callers
      pass a pointer that might be freed by pskb_may_pull()
      
      syzbot reported :
      
      BUG: KMSAN: uninit-value in __INET_ECN_decapsulate include/net/inet_ecn.h:238 [inline]
      BUG: KMSAN: uninit-value in INET_ECN_decapsulate+0x345/0x1db0 include/net/inet_ecn.h:260
      CPU: 1 PID: 8941 Comm: syz-executor.0 Not tainted 5.10.0-rc4-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       <IRQ>
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x21c/0x280 lib/dump_stack.c:118
       kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118
       __msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:197
       __INET_ECN_decapsulate include/net/inet_ecn.h:238 [inline]
       INET_ECN_decapsulate+0x345/0x1db0 include/net/inet_ecn.h:260
       geneve_rx+0x2103/0x2980 include/net/inet_ecn.h:306
       geneve_udp_encap_recv+0x105c/0x1340 drivers/net/geneve.c:377
       udp_queue_rcv_one_skb+0x193a/0x1af0 net/ipv4/udp.c:2093
       udp_queue_rcv_skb+0x282/0x1050 net/ipv4/udp.c:2167
       udp_unicast_rcv_skb net/ipv4/udp.c:2325 [inline]
       __udp4_lib_rcv+0x399d/0x5880 net/ipv4/udp.c:2394
       udp_rcv+0x5c/0x70 net/ipv4/udp.c:2564
       ip_protocol_deliver_rcu+0x572/0xc50 net/ipv4/ip_input.c:204
       ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline]
       NF_HOOK include/linux/netfilter.h:301 [inline]
       ip_local_deliver+0x583/0x8d0 net/ipv4/ip_input.c:252
       dst_input include/net/dst.h:449 [inline]
       ip_rcv_finish net/ipv4/ip_input.c:428 [inline]
       NF_HOOK include/linux/netfilter.h:301 [inline]
       ip_rcv+0x5c3/0x840 net/ipv4/ip_input.c:539
       __netif_receive_skb_one_core net/core/dev.c:5315 [inline]
       __netif_receive_skb+0x1ec/0x640 net/core/dev.c:5429
       process_backlog+0x523/0xc10 net/core/dev.c:6319
       napi_poll+0x420/0x1010 net/core/dev.c:6763
       net_rx_action+0x35c/0xd40 net/core/dev.c:6833
       __do_softirq+0x1a9/0x6fa kernel/softirq.c:298
       asm_call_irq_on_stack+0xf/0x20
       </IRQ>
       __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
       run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
       do_softirq_own_stack+0x6e/0x90 arch/x86/kernel/irq_64.c:77
       do_softirq kernel/softirq.c:343 [inline]
       __local_bh_enable_ip+0x184/0x1d0 kernel/softirq.c:195
       local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32
       rcu_read_unlock_bh include/linux/rcupdate.h:730 [inline]
       __dev_queue_xmit+0x3a9b/0x4520 net/core/dev.c:4167
       dev_queue_xmit+0x4b/0x60 net/core/dev.c:4173
       packet_snd net/packet/af_packet.c:2992 [inline]
       packet_sendmsg+0x86f9/0x99d0 net/packet/af_packet.c:3017
       sock_sendmsg_nosec net/socket.c:651 [inline]
       sock_sendmsg net/socket.c:671 [inline]
       __sys_sendto+0x9dc/0xc80 net/socket.c:1992
       __do_sys_sendto net/socket.c:2004 [inline]
       __se_sys_sendto+0x107/0x130 net/socket.c:2000
       __x64_sys_sendto+0x6e/0x90 net/socket.c:2000
       do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 2d07dc79 ("geneve: add initial netdev driver for GENEVE tunnels")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Link: https://lore.kernel.org/r/20201201090507.4137906-1-eric.dumazet@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      4179b00c
    • R
      net: broadcom CNIC: requires MMU · 14483cbf
      Randy Dunlap 提交于
      The CNIC kconfig symbol selects UIO and UIO depends on MMU.
      Since 'select' does not follow dependency chains, add the same MMU
      dependency to CNIC.
      
      Quietens this kconfig warning:
      
      WARNING: unmet direct dependencies detected for UIO
        Depends on [n]: MMU [=n]
        Selected by [m]:
        - CNIC [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_BROADCOM [=y] && PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n)
      
      Fixes: adfc5217 ("broadcom: Move the Broadcom drivers")
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Rasesh Mody <rmody@marvell.com>
      Cc: GR-Linux-NIC-Dev@marvell.com
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: netdev@vger.kernel.org
      Link: https://lore.kernel.org/r/20201129070843.3859-1-rdunlap@infradead.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      14483cbf
    • T
      ibmvnic: Fix TX completion error handling · ba246c17
      Thomas Falcon 提交于
      TX completions received with an error return code are not
      being processed properly. When an error code is seen, do not
      proceed to the next completion before cleaning up the existing
      entry's data structures.
      
      Fixes: 032c5e82 ("Driver for IBM System i/p VNIC protocol")
      Signed-off-by: NThomas Falcon <tlfalcon@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba246c17
    • T
      ibmvnic: Ensure that SCRQ entry reads are correctly ordered · b71ec952
      Thomas Falcon 提交于
      Ensure that received Subordinate Command-Response Queue (SCRQ)
      entries are properly read in order by the driver. These queues
      are used in the ibmvnic device to process RX buffer and TX completion
      descriptors. dma_rmb barriers have been added after checking for a
      pending descriptor to ensure the correct descriptor entry is checked
      and after reading the SCRQ descriptor to ensure the entire
      descriptor is read before processing.
      
      Fixes: 032c5e82 ("Driver for IBM System i/p VNIC protocol")
      Signed-off-by: NThomas Falcon <tlfalcon@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b71ec952
  9. 01 12月, 2020 3 次提交
  10. 30 11月, 2020 4 次提交