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]
Message-Id: <20220304060046.115414-1-imagedong@tencent.com>
Date:   Fri,  4 Mar 2022 14:00:39 +0800
From:   menglong8.dong@...il.com
To:     dsahern@...nel.org, kuba@...nel.org
Cc:     rostedt@...dmis.org, mingo@...hat.com, davem@...emloft.net,
        ast@...nel.org, daniel@...earbox.net, hawk@...nel.org,
        john.fastabend@...il.com, imagedong@...cent.com,
        edumazet@...gle.com, talalahmad@...gle.com, keescook@...omium.org,
        ilias.apalodimas@...aro.org, alobakin@...me,
        flyingpeng@...cent.com, mengensun@...cent.com, atenart@...nel.org,
        bigeasy@...utronix.de, memxor@...il.com, arnd@...db.de,
        pabeni@...hat.com, willemb@...gle.com, vvs@...tuozzo.com,
        cong.wang@...edance.com, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: [PATCH net-next v2 0/7] net: dev: add skb drop reasons to net/core/dev.c

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

In the commit c504e5c2f964 ("net: skb: introduce kfree_skb_reason()"),
we added the support of reporting the reasons of skb drops to kfree_skb
tracepoint. And in this series patches, reasons for skb drops are added
to the link layer, which means that 'net/core/dev.c' is our target.

Following functions are processed:

sch_handle_egress()
__dev_xmit_skb()
enqueue_to_backlog()
do_xdp_generic()
sch_handle_ingress()
__netif_receive_skb_core()

and following new drop reasons are added (what they mean can be see in
the document of them):

SKB_DROP_REASON_TC_EGRESS
SKB_DROP_REASON_QDISC_DROP
SKB_DROP_REASON_CPU_BACKLOG
SKB_DROP_REASON_XDP
SKB_DROP_REASON_TC_INGRESS
SKB_DROP_REASON_PTYPE_ABSENT

In order to add skb drop reasons to kfree_skb_list(), the function
kfree_skb_list_reason() is introduced in the 2th patch, which will be
used in __dev_xmit_skb() in the 3th patch.

Changes since v1:
- rename SKB_DROP_REASON_QDISC_EGRESS to SKB_DROP_REASON_TC_EGRESS in the
  1th patch
- remove the 'else' in the 4th patch
- rename SKB_DROP_REASON_QDISC_INGRESS to SKB_DROP_REASON_TC_INGRESS in
  the 6th patch

Menglong Dong (7):
  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     | 26 +++++++++++++++++++++++++-
 include/trace/events/skb.h |  6 ++++++
 net/core/dev.c             | 24 +++++++++++++++---------
 net/core/skbuff.c          |  7 ++++---
 4 files changed, 50 insertions(+), 13 deletions(-)

-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ