linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: ipa: fix validation
@ 2021-03-20 14:17 Alex Elder
  2021-03-20 14:17 ` [PATCH net-next v2 1/2] net: ipa: fix init header command validation Alex Elder
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Alex Elder @ 2021-03-20 14:17 UTC (permalink / raw)
  To: davem, kuba
  Cc: leon, andrew, bjorn.andersson, evgreen, cpratapa, subashab,
	elder, netdev, linux-kernel

There is sanity checking code in the IPA driver that's meant to be
enabled only during development.  This allows the driver to make
certain assumptions, but not have to verify those assumptions are
true at (operational) runtime.  This code is built conditional on
IPA_VALIDATION, set (if desired) inside the IPA makefile.

Unfortunately, this validation code has some errors.  First, there
are some mismatched arguments supplied to some dev_err() calls in
ipa_cmd_table_valid() and ipa_cmd_header_valid(), and these are
exposed if validation is enabled.  Second, the tag that enables
this conditional code isn't used consistently (it's IPA_VALIDATE
in some spots and IPA_VALIDATION in others).

This series fixes those two problems with the conditional validation
code.

Version 2 removes the two patches that introduced ipa_assert().  It
also modifies the description in the first patch so that it mentions
the changes made to ipa_cmd_table_valid().

					-Alex

Alex Elder (2):
  net: ipa: fix init header command validation
  net: ipa: fix IPA validation

 drivers/net/ipa/Makefile       |  2 +-
 drivers/net/ipa/gsi_trans.c    |  8 ++---
 drivers/net/ipa/ipa_cmd.c      | 54 ++++++++++++++++++++++------------
 drivers/net/ipa/ipa_cmd.h      |  6 ++--
 drivers/net/ipa/ipa_endpoint.c |  6 ++--
 drivers/net/ipa/ipa_main.c     |  6 ++--
 drivers/net/ipa/ipa_mem.c      |  6 ++--
 drivers/net/ipa/ipa_table.c    |  6 ++--
 drivers/net/ipa/ipa_table.h    |  6 ++--
 9 files changed, 58 insertions(+), 42 deletions(-)

-- 
2.27.0


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

end of thread, other threads:[~2021-03-23  0:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-20 14:17 [PATCH net-next v2 0/2] net: ipa: fix validation Alex Elder
2021-03-20 14:17 ` [PATCH net-next v2 1/2] net: ipa: fix init header command validation Alex Elder
2021-03-20 14:17 ` [PATCH net-next v2 2/2] net: ipa: fix IPA validation Alex Elder
2021-03-21  8:21   ` Leon Romanovsky
2021-03-21 13:21     ` Alex Elder
2021-03-21 13:49       ` Leon Romanovsky
2021-03-21 17:19         ` Alex Elder
2021-03-22  6:40           ` Leon Romanovsky
2021-03-22 13:17             ` Alex Elder
2021-03-22 14:17               ` Leon Romanovsky
2021-03-22 15:06                 ` Alex Elder
2021-03-22 22:56               ` Andrew Lunn
2021-03-23  0:03                 ` Alex Elder
2021-03-22 13:22 ` [PATCH net-next v2 0/2] net: ipa: fix validation Alex Elder
2021-03-22 14:16   ` Leon Romanovsky

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).