1. 11 Apr, 2023 9 commits
  2. 10 Apr, 2023 9 commits
  3. 09 Apr, 2023 1 commit
    • Vladimir Oltean's avatar
      net: dsa: replace NETDEV_PRE_CHANGE_HWTSTAMP notifier with a stub · 5a178186
      Vladimir Oltean authored
      There was a sort of rush surrounding commit 88c0a6b5 ("net: create a
      netdev notifier for DSA to reject PTP on DSA master"), due to a desire
      to convert DSA's attempt to deny TX timestamping on a DSA master to
      something that doesn't block the kernel-wide API conversion from
      ndo_eth_ioctl() to ndo_hwtstamp_set().
      
      What was required was a mechanism that did not depend on ndo_eth_ioctl(),
      and what was provided was a mechanism that did not depend on
      ndo_eth_ioctl(), while at the same time introducing something that
      wasn't absolutely necessary - a new netdev notifier.
      
      There have been objections from Jakub Kicinski that using notifiers in
      general when they are not absolutely necessary creates complications to
      the control flow and difficulties to maintainers who look at the code.
      So there is a desire to not use notifiers.
      
      In addition to that, the notifier chain gets called even if there is no
      DSA in the system and no one is interested in applying any restriction.
      
      Take the model of udp_tunnel_nic_ops and introduce a stub mechanism,
      through which net/core/dev_ioctl.c can call into DSA even when
      CONFIG_NET_DSA=m.
      
      Compared to the code that existed prior to the notifier conversion, aka
      what was added in commits:
      - 4cfab356 ("net: dsa: Add wrappers for overloaded ndo_ops")
      - 3369afba ("net: Call into DSA netdevice_ops wrappers")
      
      this is different because we are not overloading any struct
      net_device_ops of the DSA master anymore, but rather, we are exposing a
      rather specific functionality which is orthogonal to which API is used
      to enable it - ndo_eth_ioctl() or ndo_hwtstamp_set().
      
      Also, what is similar is that both approaches use function pointers to
      get from built-in code to DSA.
      
      There is no point in replicating the function pointers towards
      __dsa_master_hwtstamp_validate() once for every CPU port (dev->dsa_ptr).
      Instead, it is sufficient to introduce a singleton struct dsa_stubs,
      built into the kernel, which contains a single function pointer to
      __dsa_master_hwtstamp_validate().
      
      I find this approach preferable to what we had originally, because
      dev->dsa_ptr->netdev_ops->ndo_do_ioctl() used to require going through
      struct dsa_port (dev->dsa_ptr), and so, this was incompatible with any
      attempts to add any data encapsulation and hide DSA data structures from
      the outside world.
      
      Link: https://lore.kernel.org/netdev/20230403083019.120b72fd@kernel.org/Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a178186
  4. 08 Apr, 2023 10 commits
  5. 07 Apr, 2023 6 commits
  6. 06 Apr, 2023 5 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · d9c96067
      Jakub Kicinski authored
      Conflicts:
      
      drivers/net/ethernet/google/gve/gve.h
        3ce93455 ("gve: Secure enough bytes in the first TX desc for all TCP pkts")
        75eaae15 ("gve: Add XDP DROP and TX support for GQI-QPL format")
      https://lore.kernel.org/all/20230406104927.45d176f5@canb.auug.org.au/
      https://lore.kernel.org/all/c5872985-1a95-0bc8-9dcc-b6f23b439e9d@tessares.net/
      
      Adjacent changes:
      
      net/can/isotp.c
        05173743 ("can: isotp: fix race between isotp_sendsmg() and isotp_release()")
        96d1c81e ("can: isotp: add module parameter for maximum pdu size")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d9c96067
    • Linus Torvalds's avatar
      Merge tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · f2afccfe
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from wireless and can.
      
        Current release - regressions:
      
         - wifi: mac80211:
            - fix potential null pointer dereference
            - fix receiving mesh packets in forwarding=0 networks
            - fix mesh forwarding
      
        Current release - new code bugs:
      
         - virtio/vsock: fix leaks due to missing skb owner
      
        Previous releases - regressions:
      
         - raw: fix NULL deref in raw_get_next().
      
         - sctp: check send stream number after wait_for_sndbuf
      
         - qrtr:
            - fix a refcount bug in qrtr_recvmsg()
            - do not do DEL_SERVER broadcast after DEL_CLIENT
      
         - wifi: brcmfmac: fix SDIO suspend/resume regression
      
         - wifi: mt76: fix use-after-free in fw features query.
      
         - can: fix race between isotp_sendsmg() and isotp_release()
      
         - eth: mtk_eth_soc: fix remaining throughput regression
      
         - eth: ice: reset FDIR counter in FDIR init stage
      
        Previous releases - always broken:
      
         - core: don't let netpoll invoke NAPI if in xmit context
      
         - icmp: guard against too small mtu
      
         - ipv6: fix an uninit variable access bug in __ip6_make_skb()
      
         - wifi: mac80211: fix the size calculation of
           ieee80211_ie_len_eht_cap()
      
         - can: fix poll() to not report false EPOLLOUT events
      
         - eth: gve: secure enough bytes in the first TX desc for all TCP
           pkts"
      
      * tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (47 commits)
        net: stmmac: check fwnode for phy device before scanning for phy
        net: stmmac: Add queue reset into stmmac_xdp_open() function
        selftests: net: rps_default_mask.sh: delete veth link specifically
        net: fec: make use of MDIO C45 quirk
        can: isotp: fix race between isotp_sendsmg() and isotp_release()
        can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events
        can: isotp: isotp_recvmsg(): use sock_recv_cmsgs() to get SOCK_RXQ_OVFL infos
        can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access
        gve: Secure enough bytes in the first TX desc for all TCP pkts
        netlink: annotate lockless accesses to nlk->max_recvmsg_len
        ethtool: reset #lanes when lanes is omitted
        ping: Fix potentail NULL deref for /proc/net/icmp.
        raw: Fix NULL deref in raw_get_next().
        ice: Reset FDIR counter in FDIR init stage
        ice: fix wrong fallback logic for FDIR
        net: stmmac: fix up RX flow hash indirection table when setting channels
        net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe
        wifi: mt76: ignore key disable commands
        wifi: ath11k: reduce the MHI timeout to 20s
        ipv6: Fix an uninit variable access bug in __ip6_make_skb()
        ...
      f2afccfe
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-6.3-rc6' of... · 8f2e1a85
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
       "One single fix to mount_setattr_test build failure"
      
      * tag 'linux-kselftest-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests mount: Fix mount_setattr_test builds failed
      8f2e1a85
    • Linus Torvalds's avatar
      Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd · 105b64c8
      Linus Torvalds authored
      Pull iommufd fixes from Jason Gunthorpe:
      
       - An invalid VA range can be be put in a pages and eventually trigger
         WARN_ON, reject it early
      
       - Use of the wrong start index value when doing the complex batch carry
         scheme
      
       - Wrong store ordering resulting in corrupting data used in a later
         calculation that corrupted the batch structure during carry
      
      * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd:
        iommufd: Do not corrupt the pfn list when doing batch carry
        iommufd: Fix unpinning of pages when an access is present
        iommufd: Check for uptr overflow
      105b64c8
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.3-rc6' of... · ae52f797
      Linus Torvalds authored
      Merge tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm fixes from Thierry Reding:
       "These are some fixes to make sure the PWM state structure is always
        initialized to a known state.
      
        Prior to this it could happen in some situations that random data from
        the stack would leak into the data structure and cause subtle bugs"
      
      * tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: Zero-initialize the pwm_state passed to driver's .get_state()
        pwm: meson: Explicitly set .polarity in .get_state()
        pwm: sprd: Explicitly set .polarity in .get_state()
        pwm: iqs620a: Explicitly set .polarity in .get_state()
        pwm: cros-ec: Explicitly set .polarity in .get_state()
        pwm: hibvt: Explicitly set .polarity in .get_state()
      ae52f797