Skip to content

rtw89: fix crash when loading firmware file on certain platforms

Ping-Ke Shih linux-wireless 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 6 repliesIn review
  2. v23 patches 2 repliesSuperseded
  3. v13 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rtw89: update partition size of firmware header on skb->datadrivers/net/wireless/realtek/rtw89/fw.c drivers/net/wireless/realtek/rtw89/fw.h+5 -31 reply
2/3rtw89: add const in the cast of le32_get_bits()drivers/net/wireless/realtek/rtw89/fw.h drivers/net/wireless/realtek/rtw89/txrx.h+57 -572 replies
3/3rtw89: use inline function instead macro to set H2C and CAMdrivers/net/wireless/realtek/rtw89/cam.h drivers/net/wireless/realtek/rtw89/fw.h+1593 -9740 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchTakashi IwaiLarry Finger
1/3T-b T-b
2/3T-b T-b
3/3T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] rtw89: fix crash when loading firmware file on certain platforms

First patch is to avoid writing "partition size" on read-only firmware buffer, so it has to fix the crash.
The later two patches are used to make the semantics clear, but they don't change the logic at all.

I hope at least first patch can be taken into 5.16-rc, so people can avoid this crash.

v3: Modify patch 3/3 to convert more inline functions I missed.
v2: Add Buglink and Tested-by tags.

Ping-Ke Shih (3):
rtw89: update partition size of firmware header on skb->data
rtw89: add const in the cast of le32_get_bits()
rtw89: use inline function instead macro to set H2C and CAM

 drivers/net/wireless/realtek/rtw89/cam.h  |  468 +++--
 drivers/net/wireless/realtek/rtw89/fw.c   |    2 +-
 drivers/net/wireless/realtek/rtw89/fw.h   | 2175 ++++++++++++---------
 drivers/net/wireless/realtek/rtw89/txrx.h |   46 +-
 4 files changed, 1656 insertions(+), 1035 deletions(-)
Signature · 1 line
2.25.1