Skip to content
  1. Oct 18, 2021
  2. Oct 17, 2021
  3. Oct 16, 2021
    • Nikolay Aleksandrov's avatar
      net: bridge: mcast: use multicast_membership_interval for IGMPv3 · fac3cb82
      Nikolay Aleksandrov authored
      
      
      When I added IGMPv3 support I decided to follow the RFC for computing
      the GMI dynamically:
      " 8.4. Group Membership Interval
      
         The Group Membership Interval is the amount of time that must pass
         before a multicast router decides there are no more members of a
         group or a particular source on a network.
      
         This value MUST be ((the Robustness Variable) times (the Query
         Interval)) plus (one Query Response Interval)."
      
      But that actually is inconsistent with how the bridge used to compute it
      for IGMPv2, where it was user-configurable that has a correct default value
      but it is up to user-space to maintain it. This would make it consistent
      with the other timer values which are also maintained correct by the user
      instead of being dynamically computed. It also changes back to the previous
      user-expected GMI behaviour for IGMPv3 queries which were supported before
      IGMPv3 was added. Note that to properly compute it dynamically we would
      need to add support for "Robustness Variable" which is currently missing.
      
      Reported-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Fixes: 0436862e
      
       ("net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report")
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fac3cb82
    • Stefano Garzarella's avatar
      vsock_diag_test: remove free_sock_stat() call in test_no_sockets · ba95a622
      Stefano Garzarella authored
      
      
      In `test_no_sockets` we don't expect any sockets, indeed
      check_no_sockets() prints an error and exits if `sockets` list is
      not empty, so free_sock_stat() call is unnecessary since it would
      only be called when the `sockets` list is empty.
      
      This was discovered by a strange warning printed by gcc v11.2.1:
        In file included from ../../include/linux/list.h:7,
                         from vsock_diag_test.c:18:
        vsock_diag_test.c: In function ‘test_no_sockets’:
        ../../include/linux/kernel.h:35:45: error: array subscript ‘struct vsock_stat[0]’ is partly outside array bound
        s of ‘struct list_head[1]’ [-Werror=array-bounds]
           35 |         const typeof(((type *)0)->member) * __mptr = (ptr);     \
              |                                             ^~~~~~
        ../../include/linux/list.h:352:9: note: in expansion of macro ‘container_of’
          352 |         container_of(ptr, type, member)
              |         ^~~~~~~~~~~~
        ../../include/linux/list.h:393:9: note: in expansion of macro ‘list_entry’
          393 |         list_entry((pos)->member.next, typeof(*(pos)), member)
              |         ^~~~~~~~~~
        ../../include/linux/list.h:522:21: note: in expansion of macro ‘list_next_entry’
          522 |                 n = list_next_entry(pos, member);                       \
              |                     ^~~~~~~~~~~~~~~
        vsock_diag_test.c:325:9: note: in expansion of macro ‘list_for_each_entry_safe’
          325 |         list_for_each_entry_safe(st, next, sockets, list) {
              |         ^~~~~~~~~~~~~~~~~~~~~~~~
        In file included from vsock_diag_test.c:18:
        vsock_diag_test.c:333:19: note: while referencing ‘sockets’
          333 |         LIST_HEAD(sockets);
              |                   ^~~~~~~
        ../../include/linux/list.h:23:26: note: in definition of macro ‘LIST_HEAD’
           23 |         struct list_head name = LIST_HEAD_INIT(name)
      
      It seems related to some compiler optimization and assumption
      about the empty `sockets` list, since this warning is printed
      only with -02 or -O3. Also removing `exit(1)` from
      check_no_sockets() makes the warning disappear since in that
      case free_sock_stat() can be reached also when the list is
      not empty.
      
      Reported-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Link: https://lore.kernel.org/r/20211014152045.173872-1-sgarzare@redhat.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ba95a622
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 2151135a
      Jakub Kicinski authored
      
      
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2021-10-14
      
      Brett ensures RDMA nodes are removed during release and rebuild. He also
      corrects fw.mgmt.api to include the patch number for proper
      identification.
      
      Dave stops ida_free() being called when an IDA has not been allocated.
      
      Michal corrects the order of parameters being provided and the number of
      entries skipped for UDP tunnels.
      ====================
      
      Link: https://lore.kernel.org/r/20211014181953.3538330-1-anthony.l.nguyen@intel.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2151135a
    • Stephen Suryaputra's avatar
      ipv6: When forwarding count rx stats on the orig netdev · 0857d6f8
      Stephen Suryaputra authored
      Commit bdb7cc64 ("ipv6: Count interface receive statistics on the
      ingress netdev") does not work when ip6_forward() executes on the skbs
      with vrf-enslaved netdev. Use IP6CB(skb)->iif to get to the right one.
      
      Add a selftest script to verify.
      
      Fixes: bdb7cc64
      
       ("ipv6: Count interface receive statistics on the ingress netdev")
      Signed-off-by: default avatarStephen Suryaputra <ssuryaextr@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/20211014130845.410602-1-ssuryaextr@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0857d6f8
  4. Oct 15, 2021
    • David S. Miller's avatar
      Merge branch 'tcp-md5-vrf-fix' · 4884ddba
      David S. Miller authored
      
      
      Leonard Crestez says:
      
      ====================
      tcp: md5: Fix overlap between vrf and non-vrf keys
      
      With net.ipv4.tcp_l3mdev_accept=1 it is possible for a listen socket to
      accept connection from the same client address in different VRFs. It is
      also possible to set different MD5 keys for these clients which differ only
      in the tcpm_l3index field.
      
      This appears to work when distinguishing between different VRFs but not
      between non-VRF and VRF connections. In particular:
      
      * tcp_md5_do_lookup_exact will match a non-vrf key against a vrf key. This
      means that adding a key with l3index != 0 after a key with l3index == 0
      will cause the earlier key to be deleted. Both keys can be present if the
      non-vrf key is added later.
      * _tcp_md5_do_lookup can match a non-vrf key before a vrf key. This casues
      failures if the passwords differ.
      
      This can be fixed by making tcp_md5_do_lookup_exact perform an actual exact
      comparison on l3index and by making  __tcp_md5_do_lookup perfer vrf-bound
      keys above other considerations like prefixlen.
      
      The fact that keys with l3index==0 affect VRF connections is usually not
      desirable, VRFs are meant to be completely independent. This behavior needs
      to preserved for backwards compatibility. Also, applications can just bind
      listen sockets to VRF and never specify TCP_MD5SIG_FLAG_IFINDEX at all.
      
      So far the combination of TCP_MD5SIG_FLAG_IFINDEX with tcpm_ifindex == 0
      was an error, accept this to mean "key only applies to default VRF". This
      is what applications using VRFs for traffic separation want.
      
      This also contains tests for the second part. It does not contain tests for
      overlapping keys, that would require more changes in nettest to add
      multiple keys. These scenarios are also covered by my tests for TCP-AO,
      especially around this area:
      https://github.com/cdleonard/tcp-authopt-test/blob/main/tcp_authopt_test/test_vrf_bind.py
      
      Changes since V2:
      * Rename --do-bind-key-ifindex to --force-bind-key-ifindex
      * Fix referencing TCP_MD5SIG_FLAG_IFINDEX as TCP_MD5SIG_IFINDEX
      Link to v2: https://lore.kernel.org/netdev/cover.1634107317.git.cdleonard@gmail.com/
      
      Changes since V1:
      * Accept (TCP_MD5SIG_IFINDEX with tcpm_ifindex == 0)
      * Add flags for explicitly including or excluding TCP_MD5SIG_FLAG_IFINDEX
      to nettest
      * Add few more tests in fcnal-test.sh.
      Link to v1: https://lore.kernel.org/netdev/3d8387d499f053dba5cd9184c0f7b8445c4470c6.1633542093.git.cdleonard@gmail.com/
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4884ddba
    • Leonard Crestez's avatar
      selftests: net/fcnal: Test --{force,no}-bind-key-ifindex · 64e40177
      Leonard Crestez authored
      
      
      Test that applications binding listening sockets to VRFs without
      specifying TCP_MD5SIG_FLAG_IFINDEX will work as expected. This would
      be broken if __tcp_md5_do_lookup always made a strict comparison on
      l3index. See this email:
      
      https://lore.kernel.org/netdev/209548b5-27d2-2059-f2e9-2148f5a0291b@gmail.com/
      
      Applications using tcp_l3mdev_accept=1 and a single global socket (not
      bound to any interface) also should have a way to specify keys that are
      only for the default VRF, this is done by --force-bind-key-ifindex
      without otherwise binding to a device.
      
      Signed-off-by: default avatarLeonard Crestez <cdleonard@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64e40177
    • Leonard Crestez's avatar
      selftests: nettest: Add --{force,no}-bind-key-ifindex · 78a9cf61
      Leonard Crestez authored
      
      
      These options allow explicit control over the TCP_MD5SIG_FLAG_IFINDEX
      flag instead of always setting it based on binding to an interface.
      
      Do this by converting to getopt_long because nettest has too many
      single-character flags already and getopt_long is widely used in
      selftests.
      
      Signed-off-by: default avatarLeonard Crestez <cdleonard@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78a9cf61
    • Leonard Crestez's avatar
      tcp: md5: Allow MD5SIG_FLAG_IFINDEX with ifindex=0 · a76c2315
      Leonard Crestez authored
      
      
      Multiple VRFs are generally meant to be "separate" but right now md5
      keys for the default VRF also affect connections inside VRFs if the IP
      addresses happen to overlap.
      
      So far the combination of TCP_MD5SIG_FLAG_IFINDEX with tcpm_ifindex == 0
      was an error, accept this to mean "key only applies to default VRF".
      This is what applications using VRFs for traffic separation want.
      
      Signed-off-by: default avatarLeonard Crestez <cdleonard@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a76c2315
    • Leonard Crestez's avatar
      tcp: md5: Fix overlap between vrf and non-vrf keys · 86f1e3a8
      Leonard Crestez authored
      With net.ipv4.tcp_l3mdev_accept=1 it is possible for a listen socket to
      accept connection from the same client address in different VRFs. It is
      also possible to set different MD5 keys for these clients which differ
      only in the tcpm_l3index field.
      
      This appears to work when distinguishing between different VRFs but not
      between non-VRF and VRF connections. In particular:
      
       * tcp_md5_do_lookup_exact will match a non-vrf key against a vrf key.
      This means that adding a key with l3index != 0 after a key with l3index
      == 0 will cause the earlier key to be deleted. Both keys can be present
      if the non-vrf key is added later.
       * _tcp_md5_do_lookup can match a non-vrf key before a vrf key. This
      casues failures if the passwords differ.
      
      Fix this by making tcp_md5_do_lookup_exact perform an actual exact
      comparison on l3index and by making  __tcp_md5_do_lookup perfer
      vrf-bound keys above other considerations like prefixlen.
      
      Fixes: dea53bb8
      
       ("tcp: Add l3index to tcp_md5sig_key and md5 functions")
      Signed-off-by: default avatarLeonard Crestez <cdleonard@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86f1e3a8
    • Vegard Nossum's avatar
      lan78xx: select CRC32 · 46393d61
      Vegard Nossum authored
      Fix the following build/link error by adding a dependency on the CRC32
      routines:
      
        ld: drivers/net/usb/lan78xx.o: in function `lan78xx_set_multicast':
        lan78xx.c:(.text+0x48cf): undefined reference to `crc32_le'
      
      The actual use of crc32_le() comes indirectly through ether_crc().
      
      Fixes: 55d7de9d
      
       ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46393d61
    • Xin Long's avatar
      sctp: fix transport encap_port update in sctp_vtag_verify · 075718fd
      Xin Long authored
      transport encap_port update should be updated when sctp_vtag_verify()
      succeeds, namely, returns 1, not returns 0. Correct it in this patch.
      
      While at it, also fix the indentation.
      
      Fixes: a1dd2cf2
      
       ("sctp: allow changing transport encap_port by peer packets")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      075718fd
    • Kele Huang's avatar
      ptp: fix error print of ptp_kvm on X86_64 platform · c2402d43
      Kele Huang authored
      Commit a86ed2cf
      
       ("ptp: Don't print an error if ptp_kvm is not supported")
      fixes the error message print on ARM platform by only concerning about
      the case that the error returned from kvm_arch_ptp_init() is not -EOPNOTSUPP.
      Although the ARM platform returns -EOPNOTSUPP if ptp_kvm is not supported
      while X86_64 platform returns -KVM_EOPNOTSUPP, both error codes share the
      same value 95.
      
      Actually kvm_arch_ptp_init() on X86_64 platform can return three kinds of
      errors (-KVM_ENOSYS, -KVM_EOPNOTSUPP and -KVM_EFAULT). The problem is that
      -KVM_EOPNOTSUPP is masked out and -KVM_EFAULT is ignored among them.
      This patch fixes this by returning them to ptp_kvm_init() respectively.
      
      Signed-off-by: default avatarKele Huang <huangkele@bytedance.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2402d43
    • 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
    • Brett Creeley's avatar
      ice: Print the api_patch as part of the fw.mgmt.api · b726ddf9
      Brett Creeley authored
      Currently when a user uses "devlink dev info", the fw.mgmt.api will be
      the major.minor numbers as shown below:
      
      devlink dev info pci/0000:3b:00.0
      pci/0000:3b:00.0:
        driver ice
        serial_number 00-01-00-ff-ff-00-00-00
        versions:
            fixed:
              board.id K91258-000
            running:
              fw.mgmt 6.1.2
              fw.mgmt.api 1.7 <--- No patch number included
              fw.mgmt.build 0xd75e7d06
              fw.mgmt.srev 5
              fw.undi 1.2992.0
              fw.undi.srev 5
              fw.psid.api 3.10
              fw.bundle_id 0x800085cc
              fw.app.name ICE OS Default Package
              fw.app 1.3.27.0
              fw.app.bundle_id 0xc0000001
              fw.netlist 3.10.2000-3.1e.0
              fw.netlist.build 0x2a76e110
            stored:
              fw.mgmt.srev 5
              fw.undi 1.2992.0
              fw.undi.srev 5
              fw.psid.api 3.10
              fw.bundle_id 0x800085cc
              fw.netlist 3.10.2000-3.1e.0
              fw.netlist.build 0x2a76e110
      
      There are many features in the driver that depend on the major, minor,
      and patch version of the FW. Without the patch number in the output for
      fw.mgmt.api debugging issues related to the FW API version is difficult.
      Also, using major.minor.patch aligns with the existing firmware version
      which uses a 3 digit value.
      
      Fix this by making the fw.mgmt.api print the major.minor.patch
      versions. Shown below is the result:
      
      devlink dev info pci/0000:3b:00.0
      pci/0000:3b:00.0:
        driver ice
        serial_number 00-01-00-ff-ff-00-00-00
        versions:
            fixed:
              board.id K91258-000
            running:
              fw.mgmt 6.1.2
              fw.mgmt.api 1.7.9 <--- patch number included
              fw.mgmt.build 0xd75e7d06
              fw.mgmt.srev 5
              fw.undi 1.2992.0
              fw.undi.srev 5
              fw.psid.api 3.10
              fw.bundle_id 0x800085cc
              fw.app.name ICE OS Default Package
              fw.app 1.3.27.0
              fw.app.bundle_id 0xc0000001
              fw.netlist 3.10.2000-3.1e.0
              fw.netlist.build 0x2a76e110
            stored:
              fw.mgmt.srev 5
              fw.undi 1.2992.0
              fw.undi.srev 5
              fw.psid.api 3.10
              fw.bundle_id 0x800085cc
              fw.netlist 3.10.2000-3.1e.0
              fw.netlist.build 0x2a76e110
      
      Fixes: ff2e5c70
      
       ("ice: add basic handler for devlink .info_get")
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      b726ddf9
    • Michal Swiatkowski's avatar
      ice: fix getting UDP tunnel entry · e4c2efa1
      Michal Swiatkowski authored
      Correct parameters order in call to ice_tunnel_idx_to_entry function.
      
      Entry in sparse port table is correct when the idx is 0. For idx 1 one
      correct entry should be skipped, for idx 2 two of them should be skipped
      etc. Change if condition to be true when idx is 0, which means that
      previous valid entry of this tunnel type were skipped.
      
      Fixes: b20e6c17
      
       ("ice: convert to new udp_tunnel infrastructure")
      Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
      Tested-by: default avatarGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      e4c2efa1
    • Dave Ertman's avatar
      ice: Avoid crash from unnecessary IDA free · 73e30a62
      Dave Ertman authored
      In the remove path, there is an attempt to free the aux_idx IDA whether
      it was allocated or not.  This can potentially cause a crash when
      unloading the driver on systems that do not initialize support for RDMA.
      But, this free cannot be gated by the status bit for RDMA, since it is
      allocated if the driver detects support for RDMA at probe time, but the
      driver can enter into a state where RDMA is not supported after the IDA
      has been allocated at probe time and this would lead to a memory leak.
      
      Initialize aux_idx to an invalid value and check for a valid value when
      unloading to determine if an IDA free is necessary.
      
      Fixes: d25a0fc4
      
       ("ice: Initialize RDMA support")
      Reported-by: default avatarJun Miao <jun.miao@windriver.com>
      Signed-off-by: default avatarDave Ertman <david.m.ertman@intel.com>
      Tested-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      73e30a62
    • Brett Creeley's avatar
      ice: Fix failure to re-add LAN/RDMA Tx queues · ff7e9321
      Brett Creeley authored
      Currently if the VSI is rebuilt/removed and the RDMA PF driver is active
      the RDMA Tx queue scheduler node configuration will not be cleaned up.
      This will cause the rebuild/re-add of the VSI to fail due to the
      software structures not being correctly cleaned up for the VSI index.
      Fix this by always calling ice_rm_vsi_rdma_cfg() for all VSI. If there
      are no RDMA scheduler nodes created, then there is no harm in calling
      ice_rm_vsi_rdma_cfg(). This change applies to all VSI types, so if
      RDMA support is added for other VSI types they will also get this
      change.
      
      Fixes: 348048e7
      
       ("ice: Implement iidc operations")
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarJerzy Wiktor Jurkowski <jerzy.wiktor.jurkowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      ff7e9321
  5. Oct 14, 2021
    • 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.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1fcd7945