linux/drivers/net/wireless/marvell
Kees Cook f01b377430 mwl8k: Use named struct for memcpy() region
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 <keescook@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211119004905.2348143-1-keescook@chromium.org
2021-11-29 12:46:07 +02:00
..
libertas libertas: Use struct_group() for memcpy() region 2021-11-29 12:44:29 +02:00
libertas_tf libertas_tf: Use struct_group() for memcpy() region 2021-11-29 12:44:55 +02:00
mwifiex mwifiex: Ignore BTCOEX events from the 88W8897 firmware 2021-11-26 18:30:13 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
mwl8k.c mwl8k: Use named struct for memcpy() region 2021-11-29 12:46:07 +02:00