<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/wireless/marvell, branch linux-5.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-06-09T08:25:18Z</updated>
<entry>
<title>mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue</title>
<updated>2022-06-09T08:25:18Z</updated>
<author>
<name>Niels Dossche</name>
</author>
<published>2022-03-21T22:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fde1169e705dd6089d9ae124300b70645592ca6a'/>
<id>urn:sha1:fde1169e705dd6089d9ae124300b70645592ca6a</id>
<content type='text'>
[ Upstream commit 3e12968f6d12a34b540c39cbd696a760cc4616f0 ]

cfg80211_ch_switch_notify uses ASSERT_WDEV_LOCK to assert that
net_device-&gt;ieee80211_ptr-&gt;mtx (which is the same as priv-&gt;wdev.mtx)
is held during the function's execution.
mwifiex_dfs_chan_sw_work_queue is one of its callers, which does not
hold that lock, therefore violating the assertion.
Add a lock around the call.

Disclaimer:
I am currently working on a static analyser to detect missing locks.
This was a reported case. I manually verified the report by looking
at the code, so that I do not send wrong information or patches.
After concluding that this seems to be a true positive, I created
this patch.
However, as I do not in fact have this particular hardware,
I was unable to test it.

Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Niels Dossche &lt;dossche.niels@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220321225515.32113-1-dossche.niels@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>libertas_tf: Add missing __packed annotations</title>
<updated>2021-12-08T18:39:54Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-12-01T17:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05db148ee9a7c7d2a690ff2862fac77be06ce667'/>
<id>urn:sha1:05db148ee9a7c7d2a690ff2862fac77be06ce667</id>
<content type='text'>
The earlier __packed annotations added in commit d71038c05970 ("libertas:
Fix alignment issues in libertas core") were not duplicated when
libertas_af was added in commit 7670e62c7ed6 ("libertas_tf: header file"),
even though they share several structure definitions. Add the missing
annotations which commit 642a57475b30 ("libertas_tf: Use struct_group()
for memcpy() region") exposed. Quoting the prior libertas fix: "Data
structures that come over the wire from the WLAN firmware must be
packed."

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/linux-mm/202111302102.apaePz2J-lkp@intel.com
Fixes: 642a57475b30 ("libertas_tf: Use struct_group() for memcpy() region")
Fixes: 7670e62c7ed6 ("libertas_tf: header file")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20211201173234.578124-3-keescook@chromium.org
</content>
</entry>
<entry>
<title>libertas: Add missing __packed annotation with struct_group()</title>
<updated>2021-12-08T18:39:53Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-12-01T17:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=978090ae8856edbf4d01d0c1f2103831da25f04c'/>
<id>urn:sha1:978090ae8856edbf4d01d0c1f2103831da25f04c</id>
<content type='text'>
Build testing of the newly added struct_group() usage missed smaller
architecture width tests for changes to pahole output. Add the missed
__packed annotation with struct_group() usage in a __packed struct.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/linux-mm/202111302102.apaePz2J-lkp@intel.com
Fixes: 5fd32ae0433a ("libertas: Use struct_group() for memcpy() region")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20211201173234.578124-2-keescook@chromium.org
</content>
</entry>
<entry>
<title>mwifiex: Fix possible ABBA deadlock</title>
<updated>2021-12-08T18:38:29Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2021-11-30T00:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b8bb8919ef81bfc8873d223b9361f1685f2106d'/>
<id>urn:sha1:1b8bb8919ef81bfc8873d223b9361f1685f2106d</id>
<content type='text'>
Quoting Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;:

  mwifiex_dequeue_tx_packet()
     spin_lock_bh(&amp;priv-&gt;wmm.ra_list_spinlock); --&gt; Line 1432 (Lock A)
     mwifiex_send_addba()
       spin_lock_bh(&amp;priv-&gt;sta_list_spinlock); --&gt; Line 608 (Lock B)

  mwifiex_process_sta_tx_pause()
     spin_lock_bh(&amp;priv-&gt;sta_list_spinlock); --&gt; Line 398 (Lock B)
     mwifiex_update_ralist_tx_pause()
       spin_lock_bh(&amp;priv-&gt;wmm.ra_list_spinlock); --&gt; Line 941 (Lock A)

Similar report for mwifiex_process_uap_tx_pause().

While the locking expectations in this driver are a bit unclear, the
Fixed commit only intended to protect the sta_ptr, so we can drop the
lock as soon as we're done with it.

IIUC, this deadlock cannot actually happen, because command event
processing (which calls mwifiex_process_sta_tx_pause()) is
sequentialized with TX packet processing (e.g.,
mwifiex_dequeue_tx_packet()) via the main loop (mwifiex_main_process()).
But it's good not to leave this potential issue lurking.

Fixes: f0f7c2275fb9 ("mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c")
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Reported-by: TOTE Robot &lt;oslab@tsinghua.edu.cn&gt;
Link: https://lore.kernel.org/linux-wireless/0e495b14-efbb-e0da-37bd-af6bd677ee2c@gmail.com/
Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/YaV0pllJ5p/EuUat@google.com
</content>
</entry>
<entry>
<title>mwl8k: Use named struct for memcpy() region</title>
<updated>2021-11-29T10:46:07Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-11-19T00:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f01b3774309fc60f8bf27354014459b63e667b32'/>
<id>urn:sha1:f01b3774309fc60f8bf27354014459b63e667b32</id>
<content type='text'>
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally writing across neighboring fields.

Use named struct in struct mwl8k_cmd_set_key around members key_material,
tkip_tx_mic_key, and tkip_rx_mic_key so they can be referenced
together. This will allow memcpy() and sizeof() to more easily reason
about sizes, improve readability, and avoid future warnings about writing
beyond the end of key_material.

"pahole" shows no size nor member offset changes to struct
mwl8k_cmd_set_key. "objdump -d" shows no object code changes.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20211119004905.2348143-1-keescook@chromium.org
</content>
</entry>
<entry>
<title>libertas_tf: Use struct_group() for memcpy() region</title>
<updated>2021-11-29T10:44:55Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-11-18T18:41:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=642a57475b30213ebac1f7061eaf4d0415d9c5a1'/>
<id>urn:sha1:642a57475b30213ebac1f7061eaf4d0415d9c5a1</id>
<content type='text'>
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field array bounds checking for memcpy(), memmove(), and memset(),
avoid intentionally writing across neighboring fields.

Use struct_group() in struct txpd around members tx_dest_addr_high
and tx_dest_addr_low so they can be referenced together. This will
allow memcpy() and sizeof() to more easily reason about sizes, improve
readability, and avoid future warnings about writing beyond the end
of tx_dest_addr_high.

"pahole" shows no size nor member offset changes to struct txpd.
"objdump -d" shows no object code changes.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20211118184121.1283821-1-keescook@chromium.org
</content>
</entry>
<entry>
<title>libertas: Use struct_group() for memcpy() region</title>
<updated>2021-11-29T10:44:29Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-11-18T18:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5fd32ae0433a7af37eac27ace3aabae8cb7c2fc4'/>
<id>urn:sha1:5fd32ae0433a7af37eac27ace3aabae8cb7c2fc4</id>
<content type='text'>
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally writing across neighboring fields.

Use struct_group() in struct txpd around members tx_dest_addr_high
and tx_dest_addr_low so they can be referenced together. This will
allow memcpy() and sizeof() to more easily reason about sizes, improve
readability, and avoid future warnings about writing beyond the end
of queue_id.

"pahole" shows no size nor member offset changes to struct txpd.
"objdump -d" shows no object code changes.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20211118184104.1283637-1-keescook@chromium.org
</content>
</entry>
<entry>
<title>mwifiex: Ignore BTCOEX events from the 88W8897 firmware</title>
<updated>2021-11-26T16:30:13Z</updated>
<author>
<name>Jonas Dreßler</name>
</author>
<published>2021-11-03T20:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84d94e16efa268e4f2887d858cd67ee37b870f25'/>
<id>urn:sha1:84d94e16efa268e4f2887d858cd67ee37b870f25</id>
<content type='text'>
The firmware of the 88W8897 PCIe+USB card sends those events very
unreliably, sometimes bluetooth together with 2.4ghz-wifi is used and no
COEX event comes in, and sometimes bluetooth is disabled but the
coexistance mode doesn't get disabled.

This means we sometimes end up capping the rx/tx window size while
bluetooth is not enabled anymore, artifically limiting wifi speeds even
though bluetooth is not being used.

Since we can't fix the firmware, let's just ignore those events on the
88W8897 device. From some Wireshark capture sessions it seems that the
Windows driver also doesn't change the rx/tx window sizes when bluetooth
gets enabled or disabled, so this is fairly consistent with the Windows
driver.

Signed-off-by: Jonas Dreßler &lt;verdre@v0yd.nl&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20211103205827.14559-1-verdre@v0yd.nl
</content>
</entry>
<entry>
<title>mwifiex: Ensure the version string from the firmware is 0-terminated</title>
<updated>2021-11-26T16:29:38Z</updated>
<author>
<name>Jonas Dreßler</name>
</author>
<published>2021-11-03T20:18:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=deb573f1d7ddd182ef1792c71d62883d0f833f17'/>
<id>urn:sha1:deb573f1d7ddd182ef1792c71d62883d0f833f17</id>
<content type='text'>
We assume at a few places that priv-&gt;version_str is 0-terminated, but
right now we trust the firmware that this is the case with the version
string we get from it.

Let's rather ensure this ourselves and replace the last character with
'\0'.

Signed-off-by: Jonas Dreßler &lt;verdre@v0yd.nl&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20211103201800.13531-4-verdre@v0yd.nl
</content>
</entry>
<entry>
<title>mwifiex: Add quirk to disable deep sleep with certain hardware revision</title>
<updated>2021-11-26T16:29:38Z</updated>
<author>
<name>Jonas Dreßler</name>
</author>
<published>2021-11-03T20:17:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=939b571a3b62b64cf407fa5dbc3941bc87e0ba3b'/>
<id>urn:sha1:939b571a3b62b64cf407fa5dbc3941bc87e0ba3b</id>
<content type='text'>
The 88W8897 PCIe+USB card in the hardware revision 20 apparently has a
hardware issue where the card wakes up from deep sleep randomly and very
often, somewhat depending on the card activity, maybe the hardware has a
floating wakeup pin or something. This was found by comparing two MS
Surface Book 2 devices, where one devices wifi card experienced spurious
wakeups, while the other one didn't.

Those continuous wakeups prevent the card from entering host sleep when
the computer suspends. And because the host won't answer to events from
the card anymore while it's suspended, the firmwares internal power
saving state machine seems to get confused and the card can't sleep
anymore at all after that.

Since we can't work around that hardware bug in the firmware, let's
get the hardware revision string from the firmware and match it with
known bad revisions. Then disable auto deep sleep for those revisions,
which makes sure we no longer get those spurious wakeups.

Signed-off-by: Jonas Dreßler &lt;verdre@v0yd.nl&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20211103201800.13531-3-verdre@v0yd.nl
</content>
</entry>
</feed>
