1. 15 Oct, 2021 26 commits
  2. 14 Oct, 2021 14 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · e15f5972
      Jakub Kicinski authored
      tools/testing/selftests/net/ioam6.sh
        7b1700e0 ("selftests: net: modify IOAM tests for undef bits")
        bf77b140 ("selftests: net: Test for the IOAM encapsulation with IPv6")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e15f5972
    • Arnd Bergmann's avatar
      net: of: fix stub of_net helpers for CONFIG_NET=n · 8b017fbe
      Arnd Bergmann authored
      Moving the of_net code from drivers/of/ to net/core means we
      no longer stub out the helpers when networking is disabled,
      which leads to a randconfig build failure with at least one
      ARM platform that calls this from non-networking code:
      
      arm-linux-gnueabi-ld: arch/arm/mach-mvebu/kirkwood.o: in function `kirkwood_dt_eth_fixup':
      kirkwood.c:(.init.text+0x54): undefined reference to `of_get_mac_address'
      
      Restore the way this worked before by changing that #ifdef
      check back to testing for both CONFIG_OF and CONFIG_NET.
      
      Fixes: e330fb14 ("of: net: move of_net under net/")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20211014090055.2058949-1-arnd@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8b017fbe
    • Linus Torvalds's avatar
      Merge tag 'net-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · ec681c53
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Quite calm.
      
        The noisy DSA driver (embedded switches) changes, and adjustment to
        IPv6 IOAM behavior add to diffstat's bottom line but are not scary.
      
        Current release - regressions:
      
         - af_unix: rename UNIX-DGRAM to UNIX to maintain backwards
           compatibility
      
         - procfs: revert "add seq_puts() statement for dev_mcast", minor
           format change broke user space
      
        Current release - new code bugs:
      
         - dsa: fix bridge_num not getting cleared after ports leaving the
           bridge, resource leak
      
         - dsa: tag_dsa: send packets with TX fwd offload from VLAN-unaware
           bridges using VID 0, prevent packet drops if pvid is removed
      
         - dsa: mv88e6xxx: keep the pvid at 0 when VLAN-unaware, prevent HW
           getting confused about station to VLAN mapping
      
        Previous releases - regressions:
      
         - virtio-net: fix for skb_over_panic inside big mode
      
         - phy: do not shutdown PHYs in READY state
      
         - dsa: mv88e6xxx: don't use PHY_DETECT on internal PHY's, fix link
           LED staying lit after ifdown
      
         - mptcp: fix possible infinite wait on recvmsg(MSG_WAITALL)
      
         - mqprio: Correct stats in mqprio_dump_class_stats()
      
         - ice: fix deadlock for Tx timestamp tracking flush
      
         - stmmac: fix feature detection on old hardware
      
        Previous releases - always broken:
      
         - sctp: account stream padding length for reconf chunk
      
         - icmp: fix icmp_ext_echo_iio parsing in icmp_build_probe()
      
         - isdn: cpai: check ctr->cnr to avoid array index out of bound
      
         - isdn: mISDN: fix sleeping function called from invalid context
      
         - nfc: nci: fix potential UAF of rf_conn_info object
      
         - dsa: microchip: prevent ksz_mib_read_work from kicking back in
           after it's canceled in .remove and crashing
      
         - dsa: mv88e6xxx: isolate the ATU databases of standalone and bridged
           ports
      
         - dsa: sja1105, ocelot: break circular dependency between switch and
           tag drivers
      
         - dsa: felix: improve timestamping in presence of packe loss
      
         - mlxsw: thermal: fix out-of-bounds memory accesses
      
        Misc:
      
         - ipv6: ioam: move the check for undefined bits to improve
           interoperability"
      
      * tag 'net-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (60 commits)
        icmp: fix icmp_ext_echo_iio parsing in icmp_build_probe
        MAINTAINERS: Update the devicetree documentation path of imx fec driver
        sctp: account stream padding length for reconf chunk
        mlxsw: thermal: Fix out-of-bounds memory accesses
        ethernet: s2io: fix setting mac address during resume
        NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
        NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
        nfc: fix error handling of nfc_proto_register()
        Revert "net: procfs: add seq_puts() statement for dev_mcast"
        net: encx24j600: check error in devm_regmap_init_encx24j600
        net: korina: select CRC32
        net: arc: select CRC32
        net: dsa: felix: break at first CPU port during init and teardown
        net: dsa: tag_ocelot_8021q: fix inability to inject STP BPDUs into BLOCKING ports
        net: dsa: felix: purge skb from TX timestamping queue if it cannot be sent
        net: dsa: tag_ocelot_8021q: break circular dependency with ocelot switch lib
        net: dsa: tag_ocelot: break circular dependency with ocelot switch lib driver
        net: mscc: ocelot: cross-check the sequence id from the timestamp FIFO with the skb PTP header
        net: mscc: ocelot: deny TX timestamping of non-PTP packets
        net: mscc: ocelot: warn when a PTP IRQ is raised for an unknown skb
        ...
      ec681c53
    • Jakub Kicinski's avatar
      ethernet: remove random_ether_addr() · ba530fea
      Jakub Kicinski authored
      random_ether_addr() was the original name of the helper which
      was kept for backward compatibility (?) after the rename in
      commit 0a4dd594 ("etherdevice: Rename random_ether_addr
      to eth_random_addr").
      
      We have a single random_ether_addr() caller left in tree
      while there are 70 callers of eth_random_addr().
      Time to drop this define.
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20211013205450.328092-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ba530fea
    • Jakub Kicinski's avatar
      Merge branch 'ethernet-more-netdev-dev_addr-write-removals' · 2b4731b1
      Jakub Kicinski authored
      Jakub Kicinski says:
      
      ====================
      ethernet: more netdev->dev_addr write removals
      
      Another series removing direct writes to netdev->dev_addr.
      ====================
      
      Link: https://lore.kernel.org/r/20211013204435.322561-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2b4731b1
    • Jakub Kicinski's avatar
      ethernet: replace netdev->dev_addr 16bit writes · 923ca6f6
      Jakub Kicinski authored
      Commit 406f42fa ("net-next: When a bond have a massive amount
      of VLANs...") introduced a rbtree for faster Ethernet address look
      up. To maintain netdev->dev_addr in this tree we need to make all
      the writes to it got through appropriate helpers.
      
      This patch takes care of drivers which cast netdev->dev_addr to
      a 16bit type, often with an explicit byte order.
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      923ca6f6
    • Jakub Kicinski's avatar
      ethernet: replace netdev->dev_addr assignment loops · 562ef98a
      Jakub Kicinski authored
      A handful of drivers contains loops assigning the mac
      addr byte by byte. Convert those to eth_hw_addr_set().
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      562ef98a
    • Jakub Kicinski's avatar
      ethernet: ibm/emac: use of_get_ethdev_address() to load dev_addr · 68a06402
      Jakub Kicinski authored
      A straggler I somehow missed in the automated conversion in
      commit 9ca01b25 ("ethernet: use of_get_ethdev_address()").
      Use the new helper instead of using netdev->dev_addr directly.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      68a06402
    • Jakub Kicinski's avatar
      ethernet: manually convert memcpy(dev_addr,..., sizeof(addr)) · c51e5062
      Jakub Kicinski authored
      A handful of drivers use sizeof(addr) for the size of
      the address, after manually confirming the size is
      indeed 6 convert them to eth_hw_addr_set().
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarPetko Manolov <petkan@nucleusys.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c51e5062
    • Jakub Kicinski's avatar
      ethernet: make use of eth_hw_addr_random() where appropriate · db0dcc6a
      Jakub Kicinski authored
      Number of drivers use eth_random_addr(netdev->dev_addr)
      thus writing to netdev->dev_addr directly, and not setting
      the address type. Switch them to eth_hw_addr_random().
      
        @@
        expression netdev;
        @@
        - eth_random_addr(netdev->dev_addr);
        + eth_hw_addr_random(netdev);
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      db0dcc6a
    • Jakub Kicinski's avatar
      ethernet: make eth_hw_addr_random() use dev_addr_set() · 54f2d8d6
      Jakub Kicinski authored
      Commit 406f42fa ("net-next: When a bond have a massive amount
      of VLANs...") introduced a rbtree for faster Ethernet address look
      up. To maintain netdev->dev_addr in this tree we need to make all
      the writes to it got through appropriate helpers.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      54f2d8d6
    • Jakub Kicinski's avatar
      ethernet: constify references to netdev->dev_addr in drivers · 76660757
      Jakub Kicinski authored
      This big patch sprinkles const on local variables and
      function arguments which may refer to netdev->dev_addr.
      
      Commit 406f42fa ("net-next: When a bond have a massive amount
      of VLANs...") introduced a rbtree for faster Ethernet address look
      up. To maintain netdev->dev_addr in this tree we need to make all
      the writes to it got through appropriate helpers.
      
      Some of the changes here are not strictly required - const
      is sometimes cast off but pointer is not used for writing.
      It seems like it's still better to add the const in case
      the code changes later or relevant -W flags get enabled
      for the build.
      
      No functional changes.
      
      Link: https://lore.kernel.org/r/20211014142432.449314-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      76660757
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 201f1a2d
      Jakub Kicinski authored
      Maciej Machnikowski says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2021-10-14
      
      Extend the driver implementation to support PTP pins on E810-T
      and derivative devices.
      
      E810-T adapters are equipped with:
      - 2 external bidirectional SMA connectors
      - 1 internal TX U.FL shared with SMA1
      - 1 internal RX U.FL shared with SMA2
      
      The SMA and U.FL configuration is controlled by the external
      multiplexer.
      
      E810-T Derivatives are equipped with:
      - 2 1PPS outputs on SDP20 and SDP22
      - 2 1PPS inputs on SDP21 and SDP23
      ====================
      
      Link: https://lore.kernel.org/r/20211014153531.2908804-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      201f1a2d
    • Xin Long's avatar
      icmp: fix icmp_ext_echo_iio parsing in icmp_build_probe · 1fcd7945
      Xin Long authored
      In icmp_build_probe(), the icmp_ext_echo_iio parsing should be done
      step by step and skb_header_pointer() return value should always be
      checked, this patch fixes 3 places in there:
      
        - On case ICMP_EXT_ECHO_CTYPE_NAME, it should only copy ident.name
          from skb by skb_header_pointer(), its len is ident_len. Besides,
          the return value of skb_header_pointer() should always be checked.
      
        - On case ICMP_EXT_ECHO_CTYPE_INDEX, move ident_len check ahead of
          skb_header_pointer(), and also do the return value check for
          skb_header_pointer().
      
        - On case ICMP_EXT_ECHO_CTYPE_ADDR, before accessing iio->ident.addr.
          ctype3_hdr.addrlen, skb_header_pointer() should be called first,
          then check its return value and ident_len.
          On subcases ICMP_AFI_IP and ICMP_AFI_IP6, also do check for ident.
          addr.ctype3_hdr.addrlen and skb_header_pointer()'s return value.
          On subcase ICMP_AFI_IP, the len for skb_header_pointer() should be
          "sizeof(iio->extobj_hdr) + sizeof(iio->ident.addr.ctype3_hdr) +
          sizeof(struct in_addr)" or "ident_len".
      
      v1->v2:
        - To make it more clear, call skb_header_pointer() once only for
          iio->indent's parsing as Jakub Suggested.
      v2->v3:
        - The extobj_hdr.length check against sizeof(_iio) should be done
          before calling skb_header_pointer(), as Eric noticed.
      
      Fixes: d329ea5b ("icmp: add response to RFC 8335 PROBE messages")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/31628dd76657ea62f5cf78bb55da6b35240831f1.1634205050.git.lucien.xin@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1fcd7945