1. 24 Feb, 2021 3 commits
    • Oleksij Rempel's avatar
      net: introduce CAN specific pointer in the struct net_device · 4e096a18
      Oleksij Rempel authored
      Since 20dd3850 ("can: Speed up CAN frame receiption by using
      ml_priv") the CAN framework uses per device specific data in the AF_CAN
      protocol. For this purpose the struct net_device->ml_priv is used. Later
      the ml_priv usage in CAN was extended for other users, one of them being
      CAN_J1939.
      
      Later in the kernel ml_priv was converted to an union, used by other
      drivers. E.g. the tun driver started storing it's stats pointer.
      
      Since tun devices can claim to be a CAN device, CAN specific protocols
      will wrongly interpret this pointer, which will cause system crashes.
      Mostly this issue is visible in the CAN_J1939 stack.
      
      To fix this issue, we request a dedicated CAN pointer within the
      net_device struct.
      
      Reported-by: syzbot+5138c4dd15a0401bec7b@syzkaller.appspotmail.com
      Fixes: 20dd3850 ("can: Speed up CAN frame receiption by using ml_priv")
      Fixes: ffd956ee ("can: introduce CAN midlayer private and allocate it automatically")
      Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
      Fixes: 497a5757 ("tun: switch to net core provided statistics counters")
      Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Link: https://lore.kernel.org/r/20210223070127.4538-1-o.rempel@pengutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4e096a18
    • Lech Perczak's avatar
      net: usb: qmi_wwan: support ZTE P685M modem · 88eee9b7
      Lech Perczak authored
      Now that interface 3 in "option" driver is no longer mapped, add device
      ID matching it to qmi_wwan.
      
      The modem is used inside ZTE MF283+ router and carriers identify it as
      such.
      Interface mapping is:
      0: QCDM, 1: AT (PCUI), 2: AT (Modem), 3: QMI, 4: ADB
      
      T:  Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
      D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=19d2 ProdID=1275 Rev=f0.00
      S:  Manufacturer=ZTE,Incorporated
      S:  Product=ZTE Technologies MSM
      S:  SerialNumber=P685M510ZTED0000CP&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&0
      C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
      E:  Ad=87(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
      E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      Acked-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarLech Perczak <lech.perczak@gmail.com>
      Link: https://lore.kernel.org/r/20210223183456.6377-1-lech.perczak@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      88eee9b7
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 6fbd15c0
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2021-02-22
      
      Dave corrects reporting of max TCs to use the value from hardware
      capabilities and setting of DCBx capability bits when changing between
      SW and FW LLDP.
      
      Brett fixes trusted VF multicast promiscuous not receiving expected
      packets and corrects VF max packet size when a port VLAN is configured.
      
      Henry updates available RSS queues following a change in channel count
      with a user defined LUT.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        ice: update the number of available RSS queues
        ice: Fix state bits on LLDP mode switch
        ice: Account for port VLAN in VF max packet size calculation
        ice: Set trusted VF as default VSI when setting allmulti on
        ice: report correct max number of TCs
      ====================
      
      Link: https://lore.kernel.org/r/20210222235814.834282-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6fbd15c0
  2. 23 Feb, 2021 35 commits
  3. 22 Feb, 2021 2 commits