All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: wlan-ng: Avoid duplicate header in tx/rx frames
@ 2021-08-19 17:45 Kees Cook
  2021-08-19 17:45 ` [PATCH 1/2] staging: wlan-ng: Remove pointless a3/a4 union Kees Cook
  2021-08-19 17:45 ` [PATCH 2/2] staging: wlan-ng: Avoid duplicate header in tx/rx frames Kees Cook
  0 siblings, 2 replies; 3+ messages in thread
From: Kees Cook @ 2021-08-19 17:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Kees Cook, Allen Pais, Romain Perier, Chen Lin, Ivan Safonov,
	Arnd Bergmann, David S. Miller, Abheek Dhawan, Colin Ian King,
	Ashish Kalra, linux-kernel, linux-staging, linux-hardening

Hi,

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.

In this case, there is a lot of redundant struct member declarations,
and everything can be made smaller, more description, and drop a
field-spanning memcpy() call all at the same time. The result is no
warning from the future FORTIFY_SOURCE and identical machine code.

Thanks,

-Kees

Kees Cook (2):
  staging: wlan-ng: Remove pointless a3/a4 union
  staging: wlan-ng: Avoid duplicate header in tx/rx frames

 drivers/staging/wlan-ng/hfa384x.h      | 19 ++--------
 drivers/staging/wlan-ng/hfa384x_usb.c  | 13 ++++---
 drivers/staging/wlan-ng/p80211conv.c   | 48 +++++++++++++-------------
 drivers/staging/wlan-ng/p80211conv.h   |  2 +-
 drivers/staging/wlan-ng/p80211hdr.h    | 30 +++++-----------
 drivers/staging/wlan-ng/p80211mgmt.h   | 24 ++++++-------
 drivers/staging/wlan-ng/p80211netdev.c | 12 +++----
 drivers/staging/wlan-ng/p80211netdev.h |  2 +-
 drivers/staging/wlan-ng/prism2sta.c    |  6 ++--
 9 files changed, 64 insertions(+), 92 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-19 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 17:45 [PATCH 0/2] staging: wlan-ng: Avoid duplicate header in tx/rx frames Kees Cook
2021-08-19 17:45 ` [PATCH 1/2] staging: wlan-ng: Remove pointless a3/a4 union Kees Cook
2021-08-19 17:45 ` [PATCH 2/2] staging: wlan-ng: Avoid duplicate header in tx/rx frames Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.