1. 28 Jan, 2021 11 commits
    • Danielle Ratson's avatar
      selftests: forwarding: Specify interface when invoking mausezahn · 11df27f7
      Danielle Ratson authored
      Specify the interface through which packets should be transmitted so
      that the test will pass regardless of the libnet version against which
      mausezahn is linked.
      
      Fixes: cab14d10 ("selftests: Add version of router_multipath.sh using nexthop objects")
      Fixes: 3d578d87 ("selftests: forwarding: Test IPv4 weighted nexthops")
      Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      11df27f7
    • Voon Weifeng's avatar
      stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing · 7cfc4486
      Voon Weifeng authored
      Fix an issue where dump stack is printed and Reset Adapter occurs when
      PSE0 GbE or/and PSE1 GbE is/are enabled. EHL PSE0 GbE and PSE1 GbE use
      32 bits DMA addressing whereas EHL PCH GbE uses 64 bits DMA addressing.
      
      [   25.535095] ------------[ cut here ]------------
      [   25.540276] NETDEV WATCHDOG: enp0s29f2 (intel-eth-pci): transmit queue 2 timed out
      [   25.548749] WARNING: CPU: 2 PID: 0 at net/sched/sch_generic.c:443 dev_watchdog+0x259/0x260
      [   25.558004] Modules linked in: 8021q bnep bluetooth ecryptfs snd_hda_codec_hdmi intel_gpy marvell intel_ishtp_loader intel_ishtp_hid iTCO_wdt mei_hdcp iTCO_vendor_support x86_pkg_temp_thermal kvm_intel dwmac_intel stmmac kvm igb pcs_xpcs irqbypass phylink snd_hda_intel intel_rapl_msr pcspkr dca snd_hda_codec i915 i2c_i801 i2c_smbus libphy intel_ish_ipc snd_hda_core mei_me intel_ishtp mei spi_dw_pci 8250_lpss spi_dw thermal dw_dmac_core parport_pc tpm_crb tpm_tis parport tpm_tis_core tpm intel_pmc_core sch_fq_codel uhid fuse configfs snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_sof_xtensa_dsp snd_sof snd_soc_acpi_intel_match snd_soc_acpi snd_intel_dspcfg ledtrig_audio snd_soc_core snd_compress ac97_bus snd_pcm snd_timer snd soundcore
      [   25.633795] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G     U            5.11.0-rc4-intel-lts-MISMAIL5+ #5
      [   25.644306] Hardware name: Intel Corporation Elkhart Lake Embedded Platform/ElkhartLake LPDDR4x T4 RVP1, BIOS EHLSFWI1.R00.2434.A00.2010231402 10/23/2020
      [   25.659674] RIP: 0010:dev_watchdog+0x259/0x260
      [   25.664650] Code: e8 3b 6b 60 ff eb 98 4c 89 ef c6 05 ec e7 bf 00 01 e8 fb e5 fa ff 89 d9 4c 89 ee 48 c7 c7 78 31 d2 9e 48 89 c2 e8 79 1b 18 00 <0f> 0b e9 77 ff ff ff 0f 1f 44 00 00 48 c7 47 08 00 00 00 00 48 c7
      [   25.685647] RSP: 0018:ffffb7ca80160eb8 EFLAGS: 00010286
      [   25.691498] RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000103
      [   25.699483] RDX: 0000000080000103 RSI: 00000000000000f6 RDI: 00000000ffffffff
      [   25.707465] RBP: ffff985709ce0440 R08: 0000000000000000 R09: c0000000ffffefff
      [   25.715455] R10: ffffb7ca80160cf0 R11: ffffb7ca80160ce8 R12: ffff985709ce039c
      [   25.723438] R13: ffff985709ce0000 R14: 0000000000000008 R15: ffff9857068af940
      [   25.731425] FS:  0000000000000000(0000) GS:ffff985864300000(0000) knlGS:0000000000000000
      [   25.740481] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   25.746913] CR2: 00005567f8bb76b8 CR3: 00000001f8e0a000 CR4: 0000000000350ee0
      [   25.754900] Call Trace:
      [   25.757631]  <IRQ>
      [   25.759891]  ? qdisc_put_unlocked+0x30/0x30
      [   25.764565]  ? qdisc_put_unlocked+0x30/0x30
      [   25.769245]  call_timer_fn+0x2e/0x140
      [   25.773346]  run_timer_softirq+0x1f3/0x430
      [   25.777932]  ? __hrtimer_run_queues+0x12c/0x2c0
      [   25.783005]  ? ktime_get+0x3e/0xa0
      [   25.786812]  __do_softirq+0xa6/0x2ef
      [   25.790816]  asm_call_irq_on_stack+0xf/0x20
      [   25.795501]  </IRQ>
      [   25.797852]  do_softirq_own_stack+0x5d/0x80
      [   25.802538]  irq_exit_rcu+0x94/0xb0
      [   25.806475]  sysvec_apic_timer_interrupt+0x42/0xc0
      [   25.811836]  asm_sysvec_apic_timer_interrupt+0x12/0x20
      [   25.817586] RIP: 0010:cpuidle_enter_state+0xd9/0x370
      [   25.823142] Code: 85 c0 0f 8f 0a 02 00 00 31 ff e8 22 d5 7e ff 45 84 ff 74 12 9c 58 f6 c4 02 0f 85 47 02 00 00 31 ff e8 7b a0 84 ff fb 45 85 f6 <0f> 88 ab 00 00 00 49 63 ce 48 2b 2c 24 48 89 c8 48 6b d1 68 48 c1
      [   25.844140] RSP: 0018:ffffb7ca800f7e80 EFLAGS: 00000206
      [   25.849996] RAX: ffff985864300000 RBX: 0000000000000003 RCX: 000000000000001f
      [   25.857975] RDX: 00000005f2028ea8 RSI: ffffffff9ec5907f RDI: ffffffff9ec62a5d
      [   25.865961] RBP: 00000005f2028ea8 R08: 0000000000000000 R09: 0000000000029d00
      [   25.873947] R10: 000000137b0e0508 R11: ffff9858643294e4 R12: ffff9858643336d0
      [   25.881935] R13: ffffffff9ef74b00 R14: 0000000000000003 R15: 0000000000000000
      [   25.889918]  cpuidle_enter+0x29/0x40
      [   25.893922]  do_idle+0x24a/0x290
      [   25.897536]  cpu_startup_entry+0x19/0x20
      [   25.901930]  start_secondary+0x128/0x160
      [   25.906326]  secondary_startup_64_no_verify+0xb0/0xbb
      [   25.911983] ---[ end trace b4c0c8195d0ba61f ]---
      [   25.917193] intel-eth-pci 0000:00:1d.2 enp0s29f2: Reset adapter.
      
      Fixes: 67c08ac4 ("net: stmmac: add EHL PSE0 & PSE1 1Gbps PCI info and PCI ID")
      Signed-off-by: default avatarVoon Weifeng <weifeng.voon@intel.com>
      Co-developed-by: default avatarMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
      Signed-off-by: default avatarMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
      Link: https://lore.kernel.org/r/20210126100844.30326-1-mohammad.athari.ismail@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7cfc4486
    • Giacinto Cifelli's avatar
      net: usb: cdc_ether: added support for Thales Cinterion PLSx3 modem family. · dad3a72f
      Giacinto Cifelli authored
      lsusb -v for this device:
      
      Bus 003 Device 007: ID 1e2d:0069
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               2.00
        bDeviceClass          239 Miscellaneous Device
        bDeviceSubClass         2 ?
        bDeviceProtocol         1 Interface Association
        bMaxPacketSize0        64
        idVendor           0x1e2d
        idProduct          0x0069
        bcdDevice            0.00
        iManufacturer           4 Cinterion Wireless Modules
        iProduct                3 PLSx3
        iSerial                 5 fa3c1419
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength          352
          bNumInterfaces         10
          bConfigurationValue     1
          iConfiguration          2 Cinterion Configuration
          bmAttributes         0xe0
            Self Powered
            Remote Wakeup
          MaxPower              500mA
          Interface Association:
            bLength                 8
            bDescriptorType        11
            bFirstInterface         0
            bInterfaceCount         2
            bFunctionClass          2 Communications
            bFunctionSubClass       2 Abstract (modem)
            bFunctionProtocol       1 AT-commands (v.25ter)
            iFunction               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass         2 Communications
            bInterfaceSubClass      2 Abstract (modem)
            bInterfaceProtocol      1 AT-commands (v.25ter)
            iInterface              0
            CDC Header:
              bcdCDC               1.10
            CDC ACM:
              bmCapabilities       0x02
                line coding and serial state
            CDC Call Management:
              bmCapabilities       0x03
                call management
                use DataInterface
              bDataInterface          1
            CDC Union:
              bMasterInterface        0
              bSlaveInterface         1
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               5
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass        10 CDC Data
            bInterfaceSubClass      0 Unused
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x82  EP 2 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x01  EP 1 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
          Interface Association:
            bLength                 8
            bDescriptorType        11
            bFirstInterface         2
            bInterfaceCount         2
            bFunctionClass          2 Communications
            bFunctionSubClass       2 Abstract (modem)
            bFunctionProtocol       1 AT-commands (v.25ter)
            iFunction               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        2
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass         2 Communications
            bInterfaceSubClass      2 Abstract (modem)
            bInterfaceProtocol      1 AT-commands (v.25ter)
            iInterface              0
            CDC Header:
              bcdCDC               1.10
            CDC ACM:
              bmCapabilities       0x02
                line coding and serial state
            CDC Call Management:
              bmCapabilities       0x03
                call management
                use DataInterface
              bDataInterface          3
            CDC Union:
              bMasterInterface        2
              bSlaveInterface         3
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x83  EP 3 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               5
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        3
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass        10 CDC Data
            bInterfaceSubClass      0 Unused
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x84  EP 4 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x02  EP 2 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
          Interface Association:
            bLength                 8
            bDescriptorType        11
            bFirstInterface         4
            bInterfaceCount         2
            bFunctionClass          2 Communications
            bFunctionSubClass       2 Abstract (modem)
            bFunctionProtocol       1 AT-commands (v.25ter)
            iFunction               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        4
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass         2 Communications
            bInterfaceSubClass      2 Abstract (modem)
            bInterfaceProtocol      1 AT-commands (v.25ter)
            iInterface              0
            CDC Header:
              bcdCDC               1.10
            CDC ACM:
              bmCapabilities       0x02
                line coding and serial state
            CDC Call Management:
              bmCapabilities       0x03
                call management
                use DataInterface
              bDataInterface          5
            CDC Union:
              bMasterInterface        4
              bSlaveInterface         5
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x85  EP 5 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               5
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        5
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass        10 CDC Data
            bInterfaceSubClass      0 Unused
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x86  EP 6 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x03  EP 3 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
          Interface Association:
            bLength                 8
            bDescriptorType        11
            bFirstInterface         6
            bInterfaceCount         2
            bFunctionClass          2 Communications
            bFunctionSubClass       2 Abstract (modem)
            bFunctionProtocol       1 AT-commands (v.25ter)
            iFunction               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        6
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass         2 Communications
            bInterfaceSubClass      2 Abstract (modem)
            bInterfaceProtocol      1 AT-commands (v.25ter)
            iInterface              0
            CDC Header:
              bcdCDC               1.10
            CDC ACM:
              bmCapabilities       0x02
                line coding and serial state
            CDC Call Management:
              bmCapabilities       0x03
                call management
                use DataInterface
              bDataInterface          7
            CDC Union:
              bMasterInterface        6
              bSlaveInterface         7
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x87  EP 7 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               5
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        7
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass        10 CDC Data
            bInterfaceSubClass      0 Unused
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x88  EP 8 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x04  EP 4 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
          Interface Association:
            bLength                 8
            bDescriptorType        11
            bFirstInterface         8
            bInterfaceCount         2
            bFunctionClass          2 Communications
            bFunctionSubClass       0
            bFunctionProtocol       0
            iFunction               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        8
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass         2 Communications
            bInterfaceSubClass      6 Ethernet Networking
            bInterfaceProtocol      0
            iInterface              0
            CDC Header:
              bcdCDC               1.10
            CDC Ethernet:
              iMacAddress                      1 00A0C6C14190
              bmEthernetStatistics    0x00000000
              wMaxSegmentSize              16384
              wNumberMCFilters            0x0001
              bNumberPowerFilters              0
            CDC Union:
              bMasterInterface        8
              bSlaveInterface         9
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x89  EP 9 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               5
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        9
            bAlternateSetting       0
            bNumEndpoints           0
            bInterfaceClass        10 CDC Data
            bInterfaceSubClass      0 Unused
            bInterfaceProtocol      0
            iInterface              0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        9
            bAlternateSetting       1
            bNumEndpoints           2
            bInterfaceClass        10 CDC Data
            bInterfaceSubClass      0 Unused
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x8a  EP 10 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x05  EP 5 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
      Device Qualifier (for other device speed):
        bLength                10
        bDescriptorType         6
        bcdUSB               2.00
        bDeviceClass          239 Miscellaneous Device
        bDeviceSubClass         2 ?
        bDeviceProtocol         1 Interface Association
        bMaxPacketSize0        64
        bNumConfigurations      1
      Device Status:     0x0000
        (Bus Powered)
      Signed-off-by: default avatarGiacinto Cifelli <gciofono@gmail.com>
      Link: https://lore.kernel.org/r/20210126044245.8455-1-gciofono@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      dad3a72f
    • Jakub Kicinski's avatar
      Merge tag 'mlx5-fixes-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 44a674d6
      Jakub Kicinski authored
      Saeed Mahameed says:
      
      ====================
      mlx5 fixes 2021-01-26
      
      This series introduces some fixes to mlx5 driver.
      
      * tag 'mlx5-fixes-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
        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
        net/mlx5: Maintain separate page trees for ECPF and PF functions
        net/mlx5e: Fix IPSEC stats
        net/mlx5e: Reduce tc unsupported key print level
        net/mlx5e: free page before return
        net/mlx5e: E-switch, Fix rate calculation for overflow
        net/mlx5: Fix memory leak on flow table creation error flow
      ====================
      
      Link: https://lore.kernel.org/r/20210126234345.202096-1-saeedm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      44a674d6
    • Lijun Pan's avatar
      ibmvnic: Ensure that CRQ entry read are correctly ordered · e41aec79
      Lijun Pan authored
      Ensure that received Command-Response Queue (CRQ) entries are
      properly read in order by the driver. dma_rmb barrier has
      been added before accessing the CRQ descriptor to ensure
      the entire descriptor is read before processing.
      
      Fixes: 032c5e82 ("Driver for IBM System i/p VNIC protocol")
      Signed-off-by: default avatarLijun Pan <ljp@linux.ibm.com>
      Link: https://lore.kernel.org/r/20210128013442.88319-1-ljp@linux.ibm.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e41aec79
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · 0f764eec
      Jakub Kicinski authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      1) Honor stateful expressions defined in the set from the dynset
         extension. The set definition provides a stateful expression
         that must be used by the dynset expression in case it is specified.
      
      2) Missing timeout extension in the set element in the dynset
         extension leads to inconsistent ruleset listing, not allowing
         the user to restore timeout and expiration on ruleset reload.
      
      3) Do not dump the stateful expression from the dynset extension
         if it coming from the set definition.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf:
        netfilter: nft_dynset: dump expressions when set definition contains no expressions
        netfilter: nft_dynset: add timeout extension to template
        netfilter: nft_dynset: honor stateful expressions in set definition
      ====================
      
      Link: https://lore.kernel.org/r/20210127132512.5472-1-pablo@netfilter.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0f764eec
    • Jakub Kicinski's avatar
      Merge tag 'linux-can-fixes-for-5.11-20210127' of... · 45a81464
      Jakub Kicinski authored
      Merge tag 'linux-can-fixes-for-5.11-20210127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2021-01-27
      
      The patch is by Dan Carpenter and fixes a potential information leak in
      can_fill_info().
      
      * tag 'linux-can-fixes-for-5.11-20210127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
        can: dev: prevent potential information leak in can_fill_info()
      ====================
      
      Link: https://lore.kernel.org/r/20210127094028.2778793-1-mkl@pengutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      45a81464
    • Jakub Kicinski's avatar
      MAINTAINERS: add missing header for bonding · b770753c
      Jakub Kicinski authored
      include/net/bonding.h is missing from bonding entry.
      
      Link: https://lore.kernel.org/r/20210127021844.4071706-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b770753c
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 5ae3a25b
      Jakub Kicinski authored
      Anthony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2021-01-26
      
      This series contains updates to the ice, i40e, and igc driver.
      
      Henry corrects setting an unspecified protocol to IPPROTO_NONE instead of
      0 for IPv6 flexbytes filters for ice.
      
      Nick fixes the IPv6 extension header being processed incorrectly and
      updates the netdev->dev_addr if it exists in hardware as it may have been
      modified outside the ice driver.
      
      Brett ensures a user cannot request more channels than available LAN MSI-X
      and fixes the minimum allocation logic as it was incorrectly trying to use
      more MSI-X than allocated for ice.
      
      Stefan Assmann minimizes the delay between getting and using the VSI
      pointer to prevent a possible crash for i40e.
      
      Corinna Vinschen fixes link speed advertising for igc.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        igc: fix link speed advertising
        i40e: acquire VSI pointer only after VF is initialized
        ice: Fix MSI-X vector fallback logic
        ice: Don't allow more channels than LAN MSI-X available
        ice: update dev_addr in ice_set_mac_address even if HW filter exists
        ice: Implement flow for IPv6 next header (extension header)
        ice: fix FDir IPv6 flexbyte
      ====================
      
      Link: https://lore.kernel.org/r/20210126221035.658124-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5ae3a25b
    • Vadim Fedorenko's avatar
      net: decnet: fix netdev refcount leaking on error path · 3f96d644
      Vadim Fedorenko authored
      On building the route there is an assumption that the destination
      could be local. In this case loopback_dev is used to get the address.
      If the address is still cannot be retrieved dn_route_output_slow
      returns EADDRNOTAVAIL with loopback_dev reference taken.
      
      Cannot find hash for the fixes tag because this code was introduced
      long time ago. I don't think that this bug has ever fired but the
      patch is done just to have a consistent code base.
      Signed-off-by: default avatarVadim Fedorenko <vfedorenko@novek.ru>
      Link: https://lore.kernel.org/r/1611619334-20955-1-git-send-email-vfedorenko@novek.ruSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3f96d644
    • Rasmus Villemoes's avatar
      net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP · 20776b46
      Rasmus Villemoes authored
      It's not true that switchdev_port_obj_notify() only inspects the
      ->handled field of "struct switchdev_notifier_port_obj_info" if
      call_switchdev_blocking_notifiers() returns 0 - there's a WARN_ON()
      triggering for a non-zero return combined with ->handled not being
      true. But the real problem here is that -EOPNOTSUPP is not being
      properly handled.
      
      The wrapper functions switchdev_handle_port_obj_add() et al change a
      return value of -EOPNOTSUPP to 0, and the treatment of ->handled in
      switchdev_port_obj_notify() seems to be designed to change that back
      to -EOPNOTSUPP in case nobody actually acted on the notifier (i.e.,
      everybody returned -EOPNOTSUPP).
      
      Currently, as soon as some device down the stack passes the check_cb()
      check, ->handled gets set to true, which means that
      switchdev_port_obj_notify() cannot actually ever return -EOPNOTSUPP.
      
      This, for example, means that the detection of hardware offload
      support in the MRP code is broken: switchdev_port_obj_add() used by
      br_mrp_switchdev_send_ring_test() always returns 0, so since the MRP
      code thinks the generation of MRP test frames has been offloaded, no
      such frames are actually put on the wire. Similarly,
      br_mrp_switchdev_set_ring_role() also always returns 0, causing
      mrp->ring_role_offloaded to be set to 1.
      
      To fix this, continue to set ->handled true if any callback returns
      success or any error distinct from -EOPNOTSUPP. But if all the
      callbacks return -EOPNOTSUPP, make sure that ->handled stays false, so
      the logic in switchdev_port_obj_notify() can propagate that
      information.
      
      Fixes: 9a9f26e8 ("bridge: mrp: Connect MRP API with the switchdev API")
      Fixes: f30f0601 ("switchdev: Add helpers to aid traversal through lower devices")
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Link: https://lore.kernel.org/r/20210125124116.102928-1-rasmus.villemoes@prevas.dkSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      20776b46
  2. 27 Jan, 2021 6 commits
    • Dan Carpenter's avatar
      can: dev: prevent potential information leak in can_fill_info() · b552766c
      Dan Carpenter authored
      The "bec" struct isn't necessarily always initialized. For example, the
      mcp251xfd_get_berr_counter() function doesn't initialize anything if the
      interface is down.
      
      Fixes: 52c793f2 ("can: netlink support for bus-error reporting and counters")
      Link: https://lore.kernel.org/r/YAkaRdRJncsJO8Ve@mwandaSigned-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      b552766c
    • Jakub Kicinski's avatar
      Merge branch 'net-fec-fix-temporary-rmii-clock-reset-on-link-up' · 2bd29748
      Jakub Kicinski authored
      Laurent Badel says:
      
      ====================
      net: fec: Fix temporary RMII clock reset on link up
      
      v2: fixed a compilation warning
      
      The FEC drivers performs a "hardware reset" of the MAC module when the
      link is reported to be up. This causes a short glitch in the RMII clock
      due to the hardware reset clearing the receive control register which
      controls the MII mode. It seems that some link partners do not tolerate
      this glitch, and invalidate the link, which leads to a never-ending loop
      of negotiation-link up-link down events.
      
      This was observed with the iMX28 Soc and LAN8720/LAN8742 PHYs, with two
      Intel adapters I218-LM and X722-DA2 as link partners, though a number of
      other link partners do not seem to mind the clock glitch. Changing the
      hardware reset to a software reset (clearing bit 1 of the ECR register)
      cured the issue.
      
      Attempts to optimize fec_restart() in order to minimize the duration of
      the glitch were unsuccessful. Furthermore manually producing the glitch by
      setting MII mode and then back to RMII in two consecutive instructions,
      resulting in a clock glitch <10us in duration, was enough to cause the
      partner to invalidate the link. This strongly suggests that the root cause
      of the link being dropped is indeed the change in clock frequency.
      
      In an effort to minimize changes to driver, the patch proposes to use
      soft reset only for tested SoCs (iMX28) and only if the link is up. This
      preserves hardware reset in other situations, which might be required for
      proper setup of the MAC.
      ====================
      
      Link: https://lore.kernel.org/r/20210125100745.5090-1-laurentbadel@eaton.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2bd29748
    • Laurent Badel's avatar
      net: fec: Fix temporary RMII clock reset on link up · c730ab42
      Laurent Badel authored
      fec_restart() does a hard reset of the MAC module when the link status
      changes to up. This temporarily resets the R_CNTRL register which controls
      the MII mode of the ENET_OUT clock. In the case of RMII, the clock
      frequency momentarily drops from 50MHz to 25MHz until the register is
      reconfigured. Some link partners do not tolerate this glitch and
      invalidate the link causing failure to establish a stable link when using
      PHY polling mode. Since as per IEEE802.3 the criteria for link validity
      are PHY-specific, what the partner should tolerate cannot be assumed, so
      avoid resetting the MII clock by using software reset instead of hardware
      reset when the link is up. This is generally relevant only if the SoC
      provides the clock to an external PHY and the PHY is configured for RMII.
      Signed-off-by: default avatarLaurent Badel <laurentbadel@eaton.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c730ab42
    • Xie He's avatar
      net: lapb: Add locking to the lapb module · b491e6a7
      Xie He authored
      In the lapb module, the timers may run concurrently with other code in
      this module, and there is currently no locking to prevent the code from
      racing on "struct lapb_cb". This patch adds locking to prevent racing.
      
      1. Add "spinlock_t lock" to "struct lapb_cb"; Add "spin_lock_bh" and
      "spin_unlock_bh" to APIs, timer functions and notifier functions.
      
      2. Add "bool t1timer_stop, t2timer_stop" to "struct lapb_cb" to make us
      able to ask running timers to abort; Modify "lapb_stop_t1timer" and
      "lapb_stop_t2timer" to make them able to abort running timers;
      Modify "lapb_t2timer_expiry" and "lapb_t1timer_expiry" to make them
      abort after they are stopped by "lapb_stop_t1timer", "lapb_stop_t2timer",
      and "lapb_start_t1timer", "lapb_start_t2timer".
      
      3. Let lapb_unregister wait for other API functions and running timers
      to stop.
      
      4. The lapb_device_event function calls lapb_disconnect_request. In
      order to avoid trying to hold the lock twice, add a new function named
      "__lapb_disconnect_request" which assumes the lock is held, and make
      it called by lapb_disconnect_request and lapb_device_event.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: Martin Schiller <ms@dev.tdt.de>
      Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
      Link: https://lore.kernel.org/r/20210126040939.69995-1-xie.he.0141@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b491e6a7
    • Ivan Vecera's avatar
      team: protect features update by RCU to avoid deadlock · f0947d0d
      Ivan Vecera authored
      Function __team_compute_features() is protected by team->lock
      mutex when it is called from team_compute_features() used when
      features of an underlying device is changed. This causes
      a deadlock when NETDEV_FEAT_CHANGE notifier for underlying device
      is fired due to change propagated from team driver (e.g. MTU
      change). It's because callbacks like team_change_mtu() or
      team_vlan_rx_{add,del}_vid() protect their port list traversal
      by team->lock mutex.
      
      Example (r8169 case where this driver disables TSO for certain MTU
      values):
      ...
      [ 6391.348202]  __mutex_lock.isra.6+0x2d0/0x4a0
      [ 6391.358602]  team_device_event+0x9d/0x160 [team]
      [ 6391.363756]  notifier_call_chain+0x47/0x70
      [ 6391.368329]  netdev_update_features+0x56/0x60
      [ 6391.373207]  rtl8169_change_mtu+0x14/0x50 [r8169]
      [ 6391.378457]  dev_set_mtu_ext+0xe1/0x1d0
      [ 6391.387022]  dev_set_mtu+0x52/0x90
      [ 6391.390820]  team_change_mtu+0x64/0xf0 [team]
      [ 6391.395683]  dev_set_mtu_ext+0xe1/0x1d0
      [ 6391.399963]  do_setlink+0x231/0xf50
      ...
      
      In fact team_compute_features() called from team_device_event()
      does not need to be protected by team->lock mutex and rcu_read_lock()
      is sufficient there for port list traversal.
      
      Fixes: 3d249d4c ("net: introduce ethernet teaming device")
      Cc: Saeed Mahameed <saeed@kernel.org>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20210125074416.4056484-1-ivecera@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f0947d0d
    • Jakub Kicinski's avatar
      MAINTAINERS: add David Ahern to IPv4/IPv6 maintainers · 5cfeb562
      Jakub Kicinski authored
      David has been the de-facto maintainer for much of the IP code
      for the last couple of years, let's make it official.
      
      Link: https://lore.kernel.org/r/20210122173220.3579491-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5cfeb562
  3. 26 Jan, 2021 23 commits