lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Feb 2022 19:27:53 +0800
From:   menglong8.dong@...il.com
To:     dsahern@...nel.org, kuba@...nel.org
Cc:     edumazet@...gle.com, davem@...emloft.net, rostedt@...dmis.org,
        mingo@...hat.com, yoshfuji@...ux-ipv6.org, ast@...nel.org,
        daniel@...earbox.net, hawk@...nel.org, john.fastabend@...il.com,
        imagedong@...cent.com, talalahmad@...gle.com,
        keescook@...omium.org, ilias.apalodimas@...aro.org, alobakin@...me,
        memxor@...il.com, atenart@...nel.org, bigeasy@...utronix.de,
        pabeni@...hat.com, linyunsheng@...wei.com, arnd@...db.de,
        yajun.deng@...ux.dev, roopa@...dia.com, willemb@...gle.com,
        vvs@...tuozzo.com, cong.wang@...edance.com,
        luiz.von.dentz@...el.com, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org, flyingpeng@...cent.com
Subject: [PATCH net-next 00/19] net: add skb drop reasons for TCP, IP, dev and neigh

From: Menglong Dong <imagedong@...cent.com>

In this series patches, reasons for skb drops are added to TCP, IP, dev
and neigh.

For TCP layer, the path of TCP data receive and enqueue are considered.
However, it's more complex for TCP state processing, as I find that it's
hard to report skb drop reasons to where it is freed. For example,
when skb is dropped in tcp_rcv_state_process(), the reason can be caused
by the call of tcp_v4_conn_request(), and it's hard to return a drop
reason from tcp_v4_conn_request(). So I just skip such case for this
moment.

For IP layer, skb drop reasons are added to the packet outputting path.
Seems the reasons are not complex, so I didn't split the commits by
functions.

For neighbour part, SKB_DROP_REASON_NEIGH_FAILED and
SKB_DROP_REASON_NEIGH_QUEUEFULL are added.

For link layer, reasons are added for both packet inputting and
outputting path.

The amount of patches in this series seems a bit too many, maybe I should
join some of them? For example, combine the patches of dev to one.

Menglong Dong (19):
  net: tcp: introduce tcp_drop_reason()
  net: tcp: add skb drop reasons to tcp_v4_rcv()
  net: tcp: use kfree_skb_reason() for tcp_v6_rcv()
  net: tcp: add skb drop reasons to tcp_v{4,6}_inbound_md5_hash()
  net: tcp: add skb drop reasons to tcp_add_backlog()
  net: tcp: use kfree_skb_reason() for tcp_v{4,6}_do_rcv()
  net: tcp: use tcp_drop_reason() for tcp_rcv_established()
  net: tcp: use tcp_drop_reason() for tcp_data_queue()
  net: tcp: use tcp_drop_reason() for tcp_data_queue_ofo()
  net: ip: add skb drop reasons during ip outputting
  net: neigh: use kfree_skb_reason() for __neigh_event_send()
  net: neigh: add skb drop reasons to arp_error_report()
  net: dev: use kfree_skb_reason() for sch_handle_egress()
  net: skb: introduce the function kfree_skb_list_reason()
  net: dev: add skb drop reasons to __dev_xmit_skb()
  net: dev: use kfree_skb_reason() for enqueue_to_backlog()
  net: dev: use kfree_skb_reason() for do_xdp_generic()
  net: dev: use kfree_skb_reason() for sch_handle_ingress()
  net: dev: use kfree_skb_reason() for __netif_receive_skb_core()

 include/linux/skbuff.h     | 82 +++++++++++++++++++++++++++++++++++++-
 include/net/tcp.h          |  3 +-
 include/trace/events/skb.h | 21 ++++++++++
 net/core/dev.c             | 25 +++++++-----
 net/core/neighbour.c       |  4 +-
 net/core/skbuff.c          |  7 ++--
 net/ipv4/arp.c             |  2 +-
 net/ipv4/ip_output.c       |  6 +--
 net/ipv4/tcp_input.c       | 45 ++++++++++++++++-----
 net/ipv4/tcp_ipv4.c        | 36 ++++++++++++-----
 net/ipv6/ip6_output.c      |  6 +--
 net/ipv6/tcp_ipv6.c        | 42 ++++++++++++++-----
 12 files changed, 227 insertions(+), 52 deletions(-)

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ