1. 29 Jan, 2021 33 commits
  2. 28 Jan, 2021 7 commits
    • Linus Torvalds's avatar
      Merge tag 'net-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 909b447d
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes including fixes from can, xfrm, wireless,
        wireless-drivers and netfilter trees. Nothing scary, Intel
        WiFi-related fixes seemed most notable to the users.
      
        Current release - regressions:
      
         - dsa: microchip: ksz8795: fix KSZ8794 port map again to program the
           CPU port correctly
      
        Current release - new code bugs:
      
         - iwlwifi: pcie: reschedule in long-running memory reads
      
        Previous releases - regressions:
      
         - iwlwifi: dbg: don't try to overwrite read-only FW data
      
         - iwlwifi: provide gso_type to GSO packets
      
         - octeontx2: make sure the buffer is 128 byte aligned
      
         - tcp: make TCP_USER_TIMEOUT accurate for zero window probes
      
         - xfrm: fix wraparound in xfrm_policy_addr_delta()
      
         - xfrm: fix oops in xfrm_replay_advance_bmp due to a race between
           CPUs in presence of packet reorder
      
         - tcp: fix TLP timer not set when CA_STATE changes from DISORDER to
           OPEN
      
         - wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
      
        Previous releases - always broken:
      
         - igc: fix link speed advertising
      
         - stmmac: configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA
           addressing
      
         - team: protect features update by RCU to avoid deadlock
      
         - xfrm: fix disable_xfrm sysctl when used on xfrm interfaces
           themselves
      
         - fec: fix temporary RMII clock reset on link up
      
         - can: dev: prevent potential information leak in can_fill_info()
      
        Misc:
      
         - mrp: fix bad packing of MRP test packet structures
      
         - uapi: fix big endian definition of ipv6_rpl_sr_hdr
      
         - add David Ahern to IPv4/IPv6 maintainers"
      
      * tag 'net-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (86 commits)
        rxrpc: Fix memory leak in rxrpc_lookup_local
        mlxsw: spectrum_span: Do not overwrite policer configuration
        selftests: forwarding: Specify interface when invoking mausezahn
        stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing
        net: usb: cdc_ether: added support for Thales Cinterion PLSx3 modem family.
        ibmvnic: Ensure that CRQ entry read are correctly ordered
        MAINTAINERS: add missing header for bonding
        net: decnet: fix netdev refcount leaking on error path
        net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP
        can: dev: prevent potential information leak in can_fill_info()
        net: fec: Fix temporary RMII clock reset on link up
        net: lapb: Add locking to the lapb module
        team: protect features update by RCU to avoid deadlock
        MAINTAINERS: add David Ahern to IPv4/IPv6 maintainers
        net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable
        net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset
        net/mlx5e: Revert parameters on errors when changing trust state without reset
        net/mlx5e: Correctly handle changing the number of queues when the interface is down
        net/mlx5e: Fix CT rule + encap slow path offload and deletion
        net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled
        ...
      909b447d
    • Jakub Kicinski's avatar
      Merge branch 'net-sfp-add-support-for-gpon-rtl8672-rtl9601c-and-ubiquiti-u-fiber' · 32e31b78
      Jakub Kicinski authored
      Pali Rohár says:
      
      ====================
      net: sfp: add support for GPON RTL8672/RTL9601C and Ubiquiti U-Fiber
      
      This is fourth version of patches which add workarounds for
      RTL8672/RTL9601C EEPROMs and Ubiquiti U-Fiber Instant SFP.
      ====================
      
      Link: https://lore.kernel.org/r/20210125150228.8523-1-pali@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      32e31b78
    • Pali Rohár's avatar
      net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant · f0b4f847
      Pali Rohár authored
      The Ubiquiti U-Fiber Instant SFP GPON module has nonsensical information
      stored in its EEPROM. It claims to support all transceiver types including
      10G Ethernet. Clear all claimed modes and set only 1000baseX_Full, which is
      the only one supported.
      
      This module has also phys_id set to SFF, and the SFP subsystem currently
      does not allow to use SFP modules detected as SFFs. Add exception for this
      module so it can be detected as supported.
      
      This change finally allows to detect and use SFP GPON module Ubiquiti
      U-Fiber Instant on Linux system.
      
      EEPROM content of this SFP module is (where XX is serial number):
      
      00: 02 04 0b ff ff ff ff ff ff ff ff 03 0c 00 14 c8    ???........??.??
      10: 00 00 00 00 55 42 4e 54 20 20 20 20 20 20 20 20    ....UBNT
      20: 20 20 20 20 00 18 e8 29 55 46 2d 49 4e 53 54 41        .??)UF-INSTA
      30: 4e 54 20 20 20 20 20 20 34 20 20 20 05 1e 00 36    NT      4   ??.6
      40: 00 06 00 00 55 42 4e 54 XX XX XX XX XX XX XX XX    .?..UBNTXXXXXXXX
      50: 20 20 20 20 31 34 30 31 32 33 20 20 60 80 02 41        140123  `??A
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f0b4f847
    • Pali Rohár's avatar
      net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips · 426c6cbc
      Pali Rohár authored
      The workaround for VSOL V2801F brand based GPON SFP modules added in commit
      0d035bed ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0
      workaround") works only for IDs added explicitly to the list. Since there
      are rebranded modules where OEM vendors put different strings into the
      vendor name field, we cannot base workaround on IDs only.
      
      Moreover the issue which the above mentioned commit tried to work around is
      generic not only to VSOL based modules, but rather to all GPON modules
      based on Realtek RTL8672 and RTL9601C chips.
      
      These include at least the following GPON modules:
      * V-SOL V2801F
      * C-Data FD511GX-RM0
      * OPTON GP801R
      * BAUDCOM BD-1234-SFM
      * CPGOS03-0490 v2.0
      * Ubiquiti U-Fiber Instant
      * EXOT EGS1
      
      These Realtek chips have broken EEPROM emulator which for N-byte read
      operation returns just the first byte of EEPROM data, followed by N-1
      zeros.
      
      Introduce a new function, sfp_id_needs_byte_io(), which detects SFP modules
      with broken EEPROM emulator based on N-1 zeros and switch to 1 byte EEPROM
      reading operation.
      
      Function sfp_i2c_read() now always uses single byte reading when it is
      required and when function sfp_hwmon_probe() detects single byte access,
      it disables registration of hwmon device, because in this case we cannot
      reliably and atomically read 2 bytes as is required by the standard for
      retrieving values from diagnostic area.
      
      (These Realtek chips are broken in a way that violates SFP standards for
      diagnostic interface. Kernel in this case simply cannot do anything less
      of skipping registration of the hwmon interface.)
      
      This patch fixes reading of EEPROM content from SFP modules based on
      Realtek RTL8672 and RTL9601C chips. Diagnostic interface of EEPROM stays
      broken and cannot be fixed.
      
      Fixes: 0d035bed ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround")
      Co-developed-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      426c6cbc
    • Takeshi Misawa's avatar
      rxrpc: Fix memory leak in rxrpc_lookup_local · b8323f72
      Takeshi Misawa authored
      Commit 9ebeddef ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record")
      Then release ref in __rxrpc_put_peer and rxrpc_put_peer_locked.
      
      	struct rxrpc_peer *rxrpc_alloc_peer(struct rxrpc_local *local, gfp_t gfp)
      	-               peer->local = local;
      	+               peer->local = rxrpc_get_local(local);
      
      rxrpc_discard_prealloc also need ref release in discarding.
      
      syzbot report:
      BUG: memory leak
      unreferenced object 0xffff8881080ddc00 (size 256):
        comm "syz-executor339", pid 8462, jiffies 4294942238 (age 12.350s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 0a 00 00 00 00 c0 00 08 81 88 ff ff  ................
        backtrace:
          [<000000002b6e495f>] kmalloc include/linux/slab.h:552 [inline]
          [<000000002b6e495f>] kzalloc include/linux/slab.h:682 [inline]
          [<000000002b6e495f>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
          [<000000002b6e495f>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
          [<000000006b43a77b>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
          [<00000000fd447a55>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
          [<000000007fd8867c>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
          [<0000000063d80ec1>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
          [<00000000073c5efa>] setup_net+0xde/0x2d0 net/core/net_namespace.c:342
          [<00000000a6744d5b>] copy_net_ns+0x19f/0x3e0 net/core/net_namespace.c:483
          [<0000000017d3aec3>] create_new_namespaces+0x199/0x4f0 kernel/nsproxy.c:110
          [<00000000186271ef>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:226
          [<000000002de7bac4>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2957
          [<00000000349b12ba>] __do_sys_unshare kernel/fork.c:3025 [inline]
          [<00000000349b12ba>] __se_sys_unshare kernel/fork.c:3023 [inline]
          [<00000000349b12ba>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3023
          [<000000006d178ef7>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
          [<00000000637076d4>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 9ebeddef ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record")
      Signed-off-by: default avatarTakeshi Misawa <jeliantsurux@gmail.com>
      Reported-and-tested-by: syzbot+305326672fed51b205f7@syzkaller.appspotmail.com
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Link: https://lore.kernel.org/r/161183091692.3506637.3206605651502458810.stgit@warthog.procyon.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b8323f72
    • Jakub Kicinski's avatar
      Merge branch 'mlxsw-various-fixes' · 924b171c
      Jakub Kicinski authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Various fixes
      
      Patch #1 fixes wrong invocation of mausezahn in a couple of selftests.
      The tests started failing after Fedora updated their libnet package from
      version 1.1.6 to 1.2.1. With the fix the tests pass regardless of libnet
      version.
      
      Patch #2 fixes an issue in the mirroring to CPU code that results in
      policer configuration being overwritten.
      ====================
      
      Link: https://lore.kernel.org/r/20210128144820.3280295-1-idosch@idosch.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      924b171c
    • Ido Schimmel's avatar
      mlxsw: spectrum_span: Do not overwrite policer configuration · b6f6881a
      Ido Schimmel authored
      The purpose of the delayed work in the SPAN module is to potentially
      update the destination port and various encapsulation parameters of SPAN
      agents that point to a VLAN device or a GRE tap. The destination port
      can change following the insertion of a new route, for example.
      
      SPAN agents that point to a physical port or the CPU port are static and
      never change throughout the lifetime of the SPAN agent. Therefore, skip
      over them in the delayed work.
      
      This fixes an issue where the delayed work overwrites the policer
      that was set on a SPAN agent pointing to the CPU. Modifying the delayed
      work to inherit the original policer configuration is error-prone, as
      the same will be needed for any new parameter.
      
      Fixes: 4039504e ("mlxsw: spectrum_span: Allow setting policer on a SPAN agent")
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b6f6881a