kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] bnx2x: Remove function casts
@ 2019-11-15  5:07 Kees Cook
  2019-11-15  5:07 ` [PATCH 1/5] bnx2x: Drop redundant callback " Kees Cook
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Kees Cook @ 2019-11-15  5:07 UTC (permalink / raw)
  To: David S. Miller
  Cc: Kees Cook, Ariel Elior, Sudarsana Kalluru, GR-everest-linux-l2,
	Sami Tolvanen, netdev, kernel-hardening, linux-kernel

In order to make the entire kernel usable under Clang's Control Flow
Integrity protections, function prototype casts need to be avoided
because this will trip CFI checks at runtime (i.e. a mismatch between
the caller's expected function prototype and the destination function's
prototype). Many of these cases can be found with -Wcast-function-type,
which found that bnx2x had a bunch of needless (or at least confusing)
function casts. This series removes them all.

-Kees

Kees Cook (5):
  bnx2x: Drop redundant callback function casts
  bnx2x: Remove read_status_t function casts
  bnx2x: Remove config_init_t function casts
  bnx2x: Remove format_fw_ver_t function casts
  bnx2x: Remove hw_reset_t function casts

 .../net/ethernet/broadcom/bnx2x/bnx2x_link.c  | 351 +++++++++---------
 .../net/ethernet/broadcom/bnx2x/bnx2x_link.h  |   6 +-
 2 files changed, 171 insertions(+), 186 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-11-16 20:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15  5:07 [PATCH 0/5] bnx2x: Remove function casts Kees Cook
2019-11-15  5:07 ` [PATCH 1/5] bnx2x: Drop redundant callback " Kees Cook
2019-11-15  5:07 ` [PATCH 2/5] bnx2x: Remove read_status_t " Kees Cook
2019-11-15  5:07 ` [PATCH 3/5] bnx2x: Remove config_init_t " Kees Cook
2019-11-15  5:07 ` [PATCH 4/5] bnx2x: Remove format_fw_ver_t " Kees Cook
2019-11-15  5:07 ` [PATCH 5/5] bnx2x: Remove hw_reset_t " Kees Cook
2019-11-16 20:51 ` [PATCH 0/5] bnx2x: Remove " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).