1. 20 Aug, 2023 3 commits
  2. 19 Aug, 2023 25 commits
  3. 18 Aug, 2023 12 commits
    • Ruan Jinjie's avatar
      net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code · 829b3357
      Ruan Jinjie authored
      Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
      simplify code.
      Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20230817022418.3588831-1-ruanjinjie@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      829b3357
    • Ruan Jinjie's avatar
      sky2: Remove redundant NULL check for debugfs_create_dir · ee09e9de
      Ruan Jinjie authored
      Since debugfs_create_dir() returns ERR_PTR, IS_ERR() is enough to
      check whether the directory is successfully created. So remove the
      redundant NULL check.
      Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20230817073017.350002-1-ruanjinjie@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ee09e9de
    • Yu Liao's avatar
      pds_core: remove redundant pci_clear_master() · 2f48b1d8
      Yu Liao authored
      do_pci_disable_device() disable PCI bus-mastering as following:
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      		u16 pci_command;
      
      		pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      		if (pci_command & PCI_COMMAND_MASTER) {
      				pci_command &= ~PCI_COMMAND_MASTER;
      				pci_write_config_word(dev, PCI_COMMAND, pci_command);
      		}
      
      		pcibios_disable_device(dev);
      }
      And pci_disable_device() sets dev->is_busmaster to 0.
      
      pci_enable_device() is called only once before calling to
      pci_disable_device() and such pci_clear_master() is not needed. So remove
      redundant pci_clear_master().
      
      Also rename goto label 'err_out_clear_master' to 'err_out_disable_device'.
      Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Acked-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Link: https://lore.kernel.org/r/20230817025709.2023553-1-liaoyu15@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2f48b1d8
    • Jakub Kicinski's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 74f9d556
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      virtchnl: fix fake 1-elem arrays
      
      Alexander Lobakin says:
      
      6.5-rc1 started spitting warning splats when composing virtchnl
      messages, precisely on virtchnl_rss_key and virtchnl_lut:
      
      [   84.167709] memcpy: detected field-spanning write (size 52) of single
      field "vrk->key" at drivers/net/ethernet/intel/iavf/iavf_virtchnl.c:1095
      (size 1)
      [   84.169915] WARNING: CPU: 3 PID: 11 at drivers/net/ethernet/intel/
      iavf/iavf_virtchnl.c:1095 iavf_set_rss_key+0x123/0x140 [iavf]
      ...
      [   84.191982] Call Trace:
      [   84.192439]  <TASK>
      [   84.192900]  ? __warn+0xc9/0x1a0
      [   84.193353]  ? iavf_set_rss_key+0x123/0x140 [iavf]
      [   84.193818]  ? report_bug+0x12c/0x1b0
      [   84.194266]  ? handle_bug+0x42/0x70
      [   84.194714]  ? exc_invalid_op+0x1a/0x50
      [   84.195149]  ? asm_exc_invalid_op+0x1a/0x20
      [   84.195592]  ? iavf_set_rss_key+0x123/0x140 [iavf]
      [   84.196033]  iavf_watchdog_task+0xb0c/0xe00 [iavf]
      ...
      [   84.225476] memcpy: detected field-spanning write (size 64) of single
      field "vrl->lut" at drivers/net/ethernet/intel/iavf/iavf_virtchnl.c:1127
      (size 1)
      [   84.227190] WARNING: CPU: 27 PID: 1044 at drivers/net/ethernet/intel/
      iavf/iavf_virtchnl.c:1127 iavf_set_rss_lut+0x123/0x140 [iavf]
      ...
      [   84.246601] Call Trace:
      [   84.247228]  <TASK>
      [   84.247840]  ? __warn+0xc9/0x1a0
      [   84.248263]  ? iavf_set_rss_lut+0x123/0x140 [iavf]
      [   84.248698]  ? report_bug+0x12c/0x1b0
      [   84.249122]  ? handle_bug+0x42/0x70
      [   84.249549]  ? exc_invalid_op+0x1a/0x50
      [   84.249970]  ? asm_exc_invalid_op+0x1a/0x20
      [   84.250390]  ? iavf_set_rss_lut+0x123/0x140 [iavf]
      [   84.250820]  iavf_watchdog_task+0xb16/0xe00 [iavf]
      
      Gustavo already tried to fix those back in 2021[0][1]. Unfortunately,
      a VM can run a different kernel than the host, meaning that those
      structures are sorta ABI.
      However, it is possible to have proper flex arrays + struct_size()
      calculations and still send the very same messages with the same sizes.
      The common rule is:
      
      elem[1] -> elem[]
      size = struct_size() + <difference between the old and the new msg size>
      
      The "old" size in the current code is calculated 3 different ways for
      10 virtchnl structures total. Each commit addresses one of the ways
      cumulatively instead of per-structure.
      
      I was planning to send it to -net initially, but given that virtchnl was
      renamed from i40evf and got some fat style cleanup commits in the past,
      it's not very straightforward to even pick appropriate SHAs, not
      speaking of automatic portability. I may send manual backports for
      a couple of the latest supported kernels later on if anyone needs it
      at all.
      
      [0] https://lore.kernel.org/all/20210525230912.GA175802@embeddedor
      [1] https://lore.kernel.org/all/20210525231851.GA176647@embeddedor
      
      * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
        virtchnl: fix fake 1-elem arrays for structures allocated as `nents`
        virtchnl: fix fake 1-elem arrays in structures allocated as `nents + 1`
        virtchnl: fix fake 1-elem arrays in structs allocated as `nents + 1` - 1
      ====================
      
      Link: https://lore.kernel.org/r/20230816210657.1326772-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      74f9d556
    • Jakub Kicinski's avatar
      Merge tag 'batadv-next-pullrequest-20230816' of git://git.open-mesh.org/linux-merge · 04f28408
      Jakub Kicinski authored
      Simon Wunderlich says:
      
      ====================
      This cleanup patchset includes the following patches:
      
       - bump version strings, by Simon Wunderlich
      
       - Remove unused declarations, by Yue Haibing
      
       - Clean up MTU handling, by Sven Eckelmann (2 patches)
      
       - Clean up/remove (obsolete) functions, by Sven Eckelmann (3 patches)
      
      * tag 'batadv-next-pullrequest-20230816' of git://git.open-mesh.org/linux-merge:
        batman-adv: Drop per algo GW section class code
        batman-adv: Keep batadv_netlink_notify_* static
        batman-adv: Drop unused function batadv_gw_bandwidth_set
        batman-adv: Check hardif MTU against runtime MTU
        batman-adv: Avoid magic value for minimum MTU
        batman-adv: Remove unused declarations
        batman-adv: Start new development cycle
      ====================
      
      Link: https://lore.kernel.org/r/20230816164000.190884-1-sw@simonwunderlich.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      04f28408
    • Wei Fang's avatar
      net: fec: use napi_consume_skb() in fec_enet_tx_queue() · 91a10efc
      Wei Fang authored
      Now that the "budget" is passed into fec_enet_tx_queue(), one
      optimization we can do is to use napi_consume_skb() to instead
      of dev_kfree_skb_any().
      Signed-off-by: default avatarWei Fang <wei.fang@nxp.com>
      Suggested-by: default avatarAlexander H Duyck <alexander.duyck@gmail.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20230816090242.463822-1-wei.fang@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      91a10efc
    • Yang Li's avatar
      sfc: Remove unneeded semicolon · 5cce7814
      Yang Li authored
      ./drivers/net/ethernet/sfc/tc_conntrack.c:464:2-3: Unneeded semicolon
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Acked-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
      Link: https://lore.kernel.org/r/20230816004944.10841-1-yang.lee@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5cce7814
    • Jesper Dangaard Brouer's avatar
      net: use SLAB_NO_MERGE for kmem_cache skbuff_head_cache · 0a064316
      Jesper Dangaard Brouer authored
      Since v6.5-rc1 MM-tree is merged and contains a new flag SLAB_NO_MERGE
      in commit d0bf7d57 ("mm/slab: introduce kmem_cache flag SLAB_NO_MERGE")
      now is the time to use this flag for networking as proposed
      earlier see link.
      
      The SKB (sk_buff) kmem_cache slab is critical for network performance.
      Network stack uses kmem_cache_{alloc,free}_bulk APIs to gain
      performance by amortising the alloc/free cost.
      
      For the bulk API to perform efficiently the slub fragmentation need to
      be low. Especially for the SLUB allocator, the efficiency of bulk free
      API depend on objects belonging to the same slab (page).
      
      When running different network performance microbenchmarks, I started
      to notice that performance was reduced (slightly) when machines had
      longer uptimes. I believe the cause was 'skbuff_head_cache' got
      aliased/merged into the general slub for 256 bytes sized objects (with
      my kernel config, without CONFIG_HARDENED_USERCOPY).
      
      For SKB kmem_cache network stack have other various reasons for
      not merging, but it varies depending on kernel config (e.g.
      CONFIG_HARDENED_USERCOPY). We want to explicitly set SLAB_NO_MERGE
      for this kmem_cache to get most out of kmem_cache_{alloc,free}_bulk APIs.
      
      When CONFIG_SLUB_TINY is configured the bulk APIs are essentially
      disabled. Thus, for this case drop the SLAB_NO_MERGE flag.
      
      Link: https://lore.kernel.org/all/167396280045.539803.7540459812377220500.stgit@firesoul/Signed-off-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Link: https://lore.kernel.org/r/169211265663.1491038.8580163757548985946.stgit@firesoulSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0a064316
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7ff57803
      Jakub Kicinski authored
      Cross-merge networking fixes after downstream PR.
      
      Conflicts:
      
      drivers/net/ethernet/sfc/tc.c
        fa165e19 ("sfc: don't unregister flow_indr if it was never registered")
        3bf969e8 ("sfc: add MAE table machinery for conntrack table")
      https://lore.kernel.org/all/20230818112159.7430e9b4@canb.auug.org.au/
      
      No adjacent changes.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7ff57803
    • Linus Torvalds's avatar
      Merge tag 'net-6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 0e8860d2
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from ipsec and netfilter.
      
        No known outstanding regressions.
      
        Fixes to fixes:
      
         - virtio-net: set queues after driver_ok, avoid a potential race
           added by recent fix
      
         - Revert "vlan: Fix VLAN 0 memory leak", it may lead to a warning
           when VLAN 0 is registered explicitly
      
         - nf_tables:
            - fix false-positive lockdep splat in recent fixes
            - don't fail inserts if duplicate has expired (fix test failures)
            - fix races between garbage collection and netns dismantle
      
        Current release - new code bugs:
      
         - mlx5: Fix mlx5_cmd_update_root_ft() error flow
      
        Previous releases - regressions:
      
         - phy: fix IRQ-based wake-on-lan over hibernate / power off
      
        Previous releases - always broken:
      
         - sock: fix misuse of sk_under_memory_pressure() preventing system
           from exiting global TCP memory pressure if a single cgroup is under
           pressure
      
         - fix the RTO timer retransmitting skb every 1ms if linear option is
           enabled
      
         - af_key: fix sadb_x_filter validation, amment netlink policy
      
         - ipsec: fix slab-use-after-free in decode_session6()
      
         - macb: in ZynqMP resume always configure PS GTR for non-wakeup
           source
      
        Misc:
      
         - netfilter: set default timeout to 3 secs for sctp shutdown send and
           recv state (from 300ms), align with protocol timers"
      
      * tag 'net-6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (49 commits)
        ice: Block switchdev mode when ADQ is active and vice versa
        qede: fix firmware halt over suspend and resume
        net: do not allow gso_size to be set to GSO_BY_FRAGS
        sock: Fix misuse of sk_under_memory_pressure()
        sfc: don't fail probe if MAE/TC setup fails
        sfc: don't unregister flow_indr if it was never registered
        net: dsa: mv88e6xxx: Wait for EEPROM done before HW reset
        net/mlx5: Fix mlx5_cmd_update_root_ft() error flow
        net/mlx5e: XDP, Fix fifo overrun on XDP_REDIRECT
        i40e: fix misleading debug logs
        iavf: fix FDIR rule fields masks validation
        ipv6: fix indentation of a config attribute
        mailmap: add entries for Simon Horman
        broadcom: b44: Use b44_writephy() return value
        net: openvswitch: reject negative ifindex
        team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
        net: phy: broadcom: stub c45 read/write for 54810
        netfilter: nft_dynset: disallow object maps
        netfilter: nf_tables: GC transaction race with netns dismantle
        netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path
        ...
      0e8860d2
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-08-18-1' of git://anongit.freedesktop.org/drm/drm · 1ada9c07
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular enough week, mostly the usual amdgpu and i915 fixes.  Also
        qaic, nouveau, qxl and a revert for an EDID patch that had some side
        effects, along with a couple of panel fixes.
      
        edid:
         - revert mode parsing fix that had side effects.
      
        i915:
         - Fix the flow for ignoring GuC SLPC efficient frequency selection
         - Fix SDVO panel_type initialization
         - Fix display probe for IVB Q and IVB D GT2 server
      
        nouveau:
         - fix use-after-free in connector code
      
        qaic:
         - integer overflow check fix
         - fix slicing memory leak
      
        panel:
         - fix JDI LT070ME05000 probing
         - fix AUO G121EAN01 timings
      
        amdgpu:
         - SMU 13.x fixes
         - Fix mcbp parameter for gfx9
         - SMU 11.x fixes
         - Temporary fix for large numbers of XCP partitions
         - S0ix fixes
         - DCN 2.0 fix
      
        qxl:
         - fix use after free race in dumb object allocation"
      
      * tag 'drm-fixes-2023-08-18-1' of git://anongit.freedesktop.org/drm/drm:
        drm/qxl: fix UAF on handle creation
        Revert "drm/edid: Fix csync detailed mode parsing"
        drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create
        Revert "Revert "drm/amdgpu/display: change pipe policy for DCN 2.0""
        drm/amd: flush any delayed gfxoff on suspend entry
        drm/amdgpu: skip fence GFX interrupts disable/enable for S0ix
        drm/amdgpu: skip xcp drm device allocation when out of drm resource
        drm/amd/pm: Update pci link width for smu v13.0.6
        drm/amd/pm: Fix temperature unit of SMU v13.0.6
        drm/amdgpu/pm: fix throttle_status for other than MP1 11.0.7
        drm/amdgpu: disable mcbp if parameter zero is set
        drm/amd/pm: disallow the fan setting if there is no fan on smu 13.0.0
        accel/qaic: Clean up integer overflow checking in map_user_pages()
        accel/qaic: Fix slicing memory leak
        drm/i915: fix display probe for IVB Q and IVB D GT2 server
        drm/i915/sdvo: fix panel_type initialization
        drm/i915/guc/slpc: Restore efficient freq earlier
        drm/panel: simple: Fix AUO G121EAN01 panel timings according to the docs
        drm/panel: JDI LT070ME05000 simplify with dev_err_probe()
      1ada9c07
    • Jakub Kicinski's avatar
      Merge branch 'netconsole-enable-compile-time-configuration' · c2e5f4fd
      Jakub Kicinski authored
      Breno Leitao says:
      
      ====================
      netconsole: Enable compile time configuration
      
      Enable netconsole features to be set at compilation time. Create two
      Kconfig options that allow users to set extended logs and release
      prepending features at compilation time.
      
      The first patch de-duplicates the initialization code, and the second
      patch adds the support in the de-duplicated code, avoiding touching two
      different functions with the same change.
      ====================
      
      Link: https://lore.kernel.org/r/20230811093158.1678322-1-leitao@debian.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c2e5f4fd