netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/5] net: CONFIG_DEBUG_NET and friends
@ 2022-05-10  3:57 Eric Dumazet
  2022-05-10  3:57 ` [PATCH v2 net-next 1/5] net: add include/net/net_debug.h Eric Dumazet
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Eric Dumazet @ 2022-05-10  3:57 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Eric Dumazet, Eric Dumazet

From: Eric Dumazet <edumazet@google.com>

This patch series is inspired by some syzbot reports
hinting that skb transport_header might be not set
in places we expect it being set.

Add a new CONFIG_DEBUG_NET option
and DEBUG_NET_WARN_ON_ONCE() helper, so that we can start
adding more sanity checks in the future.

Replace two BUG() in skb_checksum_help()
with less risky code.

v2: make first patch compile on more arches/compilers
    add the 5th patch to add more debugging in skb_checksum_help()

Eric Dumazet (5):
  net: add include/net/net_debug.h
  net: add CONFIG_DEBUG_NET
  net: warn if transport header was not set
  net: remove two BUG() from skb_checksum_help()
  net: add more debug info in skb_checksum_help()

 include/linux/netdevice.h | 141 +---------------------------------
 include/linux/skbuff.h    |   2 +
 include/net/net_debug.h   | 157 ++++++++++++++++++++++++++++++++++++++
 net/Kconfig.debug         |   7 ++
 net/core/dev.c            |  12 ++-
 5 files changed, 176 insertions(+), 143 deletions(-)
 create mode 100644 include/net/net_debug.h

-- 
2.36.0.512.ge40c2bad7a-goog


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

end of thread, other threads:[~2022-05-11 12:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10  3:57 [PATCH v2 net-next 0/5] net: CONFIG_DEBUG_NET and friends Eric Dumazet
2022-05-10  3:57 ` [PATCH v2 net-next 1/5] net: add include/net/net_debug.h Eric Dumazet
2022-05-10  3:57 ` [PATCH v2 net-next 2/5] net: add CONFIG_DEBUG_NET Eric Dumazet
2022-05-10  3:57 ` [PATCH v2 net-next 3/5] net: warn if transport header was not set Eric Dumazet
2022-05-10  3:57 ` [PATCH v2 net-next 4/5] net: remove two BUG() from skb_checksum_help() Eric Dumazet
2022-05-10  3:57 ` [PATCH v2 net-next 5/5] net: add more debug info in skb_checksum_help() Eric Dumazet
2022-05-11 12:00 ` [PATCH v2 net-next 0/5] net: CONFIG_DEBUG_NET and friends patchwork-bot+netdevbpf

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