1. 13 Oct, 2022 1 commit
  2. 11 Oct, 2022 4 commits
    • Kalle Valo's avatar
      wifi: ath11k: mac: fix reading 16 bytes from a region of size 0 warning · abf93f36
      Kalle Valo authored
      Linaro reported stringop-overread warnings in ath11k (this is one of many):
      
      drivers/net/wireless/ath/ath11k/mac.c:2238:29: error: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0 [-Werror=stringop-overread]
      
      My further investigation showed that these warnings happen on GCC 11.3 but not
      with GCC 12.2, and with only the kernel config Linaro provided:
      
      https://builds.tuxbuild.com/2F4W7nZHNx3T88RB0gaCZ9hBX6c/config
      
      I saw the same warnings both with arm64 and x86_64 builds and KASAN seems to be
      the reason triggering these warnings with GCC 11.  Nobody else has reported
      this so this seems to be quite rare corner case. I don't know what specific
      commit started emitting this warning so I can't provide a Fixes tag. The
      function hasn't been touched for a year.
      
      I decided to workaround this by converting the pointer to a new array in stack,
      and then copying the data to the new array. It's only 16 bytes anyway and this
      is executed during association, so not in a hotpath.
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
      Reported-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
      Link: https://lore.kernel.org/all/CA+G9fYsZ_qypa=jHY_dJ=tqX4515+qrV9n2SWXVDHve826nF7Q@mail.gmail.com/Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20221010160638.20152-1-kvalo@kernel.org
      abf93f36
    • Jose Ignacio Tornos Martinez's avatar
      wifi: iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue (other cases) · 95b0f666
      Jose Ignacio Tornos Martinez authored
      BUGs like this are still reproducible:
      
      [   31.509616] list_add corruption. prev->next should be next (ffff8f8644242300), but was ffff8f86493fd300. (prev=ffff8f86493fd300).
      [   31.521544] ------------[ cut here ]------------
      [   31.526248] kernel BUG at lib/list_debug.c:30!
      [   31.530781] invalid opcode: 0000 [#1] PREEMPT SMP PTI
      [   31.535831] CPU: 1 PID: 626 Comm: wpa_supplicant Not tainted 6.0.0+ #7
      [   31.542450] Hardware name: Dell Inc. Inspiron 660s/0478VN       , BIOS A07 08/24/2012
      [   31.550484] RIP: 0010:__list_add_valid.cold+0x3a/0x5b
      [   31.555537] Code: f2 4c 89 c1 48 89 fe 48 c7 c7 28 20 69 89 e8 4c e3 fd ff 0f 0b 48 89 d1 4c 89 c6 4c 89 ca 48 c7 c7 d0 1f 69 89 e8 35 e3 fd ff <0f> 0b 4c 89 c1 48 c7 c7 78 1f 69 89 e8 24 e3 fd ff 0f 0b 48 c7 c7
      [   31.574605] RSP: 0018:ffff9f6f00dc3748 EFLAGS: 00010286
      [   31.579990] RAX: 0000000000000075 RBX: ffff8f8644242080 RCX: 0000000000000000
      [   31.587155] RDX: 0000000000000201 RSI: ffffffff8967862d RDI: 00000000ffffffff
      [   31.594482] RBP: ffff8f86493fd2e8 R08: 0000000000000000 R09: 00000000ffffdfff
      [   31.601735] R10: ffff9f6f00dc3608 R11: ffffffff89f46128 R12: ffff8f86493fd300
      [   31.608986] R13: ffff8f86493fd300 R14: ffff8f8644242300 R15: ffff8f8643dd3f2c
      [   31.616151] FS:  00007f3bb9a707c0(0000) GS:ffff8f865a300000(0000) knlGS:0000000000000000
      [   31.624447] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   31.630286] CR2: 00007fe3647d5600 CR3: 00000001125a6002 CR4: 00000000000606e0
      [   31.637539] Call Trace:
      [   31.639936]  <TASK>
      [   31.642143]  iwl_mvm_mac_wake_tx_queue+0x71/0x90 [iwlmvm]
      [   31.647569]  ieee80211_queue_skb+0x4b6/0x720 [mac80211]
      ...
      
      So, it is necessary to extend the applied solution with commit 14a3aacf
      ("iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue")
      to all other cases where the station queues are invalidated and the related
      lists are not emptied. Because, otherwise as before, if some new element is
      added later to the list in iwl_mvm_mac_wake_tx_queue, it can match with the
      old one and produce the same commented BUG.
      
      That is, in order to avoid this problem completely, we must also remove the
      related lists for the other cases when station queues are invalidated.
      
      Fixes: cfbc6c4c ("iwlwifi: mvm: support mac80211 TXQs model")
      Reported-by: default avatarPetr Stourac <pstourac@redhat.com>
      Tested-by: default avatarPetr Stourac <pstourac@redhat.com>
      Signed-off-by: default avatarJose Ignacio Tornos Martinez <jtornosm@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20221010081611.145027-1-jtornosm@redhat.com
      95b0f666
    • Felix Fietkau's avatar
      wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921 · 443dc85a
      Felix Fietkau authored
      Checking the relevant rxd bits for the checksum information only indicates
      if the checksum verification was performed by the hardware and doesn't show
      actual checksum errors. Checksum errors are indicated in the info field of
      the DMA descriptor. Fix packets erroneously marked as CHECKSUM_UNNECESSARY
      by checking the extra bits as well.
      Those bits are only passed to the driver for MMIO devices at the moment, so
      limit checksum offload to those.
      
      Fixes: 2122dfbf ("mt76: mt7615: add rx checksum offload support")
      Fixes: 94244d2e ("mt76: mt7915: add rx checksum offload support")
      Fixes: 0e757327 ("mt76: mt7921: enable rx csum offload")
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20221005130824.23371-2-nbd@nbd.name
      443dc85a
    • Felix Fietkau's avatar
      wifi: mt76: fix receiving LLC packets on mt7615/mt7915 · 47c44088
      Felix Fietkau authored
      When 802.3 decap offload is enabled, the hardware indicates header translation
      failure, whenever either the LLC-SNAP header was not found, or a VLAN header
      with an unregcognized tag is present.
      In that case, the hardware inserts a 2-byte length fields after the MAC
      addresses. For VLAN packets, this tag needs to be removed. However,
      for 802.3 LLC packets, the length bytes should be preserved, since there
      is no separate ethertype field in the data.
      This fixes an issue where the length field was omitted for LLC frames, causing
      them to be malformed after hardware decap.
      
      Fixes: 1eeff0b4 ("mt76: mt7915: fix decap offload corner case with 4-addr VLAN frames")
      Reported-by: default avatarChad Monroe <chad.monroe@smartrg.com>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20221005130824.23371-1-nbd@nbd.name
      47c44088
  3. 10 Oct, 2022 11 commits
  4. 09 Oct, 2022 5 commits
  5. 07 Oct, 2022 18 commits
  6. 06 Oct, 2022 1 commit