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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 20 Sep 2021 09:54:02 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Zhongya Yan <yan2228598786@...il.com>
Cc:     Eric Dumazet <edumazet@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Brendan Gregg <brendan.d.gregg@...il.com>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        David Miller <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        dsahern@...nel.org, Yonghong Song <yhs@...com>, 2228598786@...com
Subject: Re: [PATCH] tcp: tcp_drop adds `SNMP` and `reason` parameter for tracing

On Tue, Sep 14, 2021 at 7:38 AM Zhongya Yan <yan2228598786@...il.com> wrote:
>
> When we wanted to trace the use of the `tcp_drop(struct sock *sk, struct sk_buff *skb)` function, we didn't know why `tcp` was deleting `skb'. To solve this problem, I updated the function `tcp_drop(struct sock *sk, struct sk_buff *skb, int field, const char *reason)`.
> This way you can understand the reason for the deletion based on the prompt message.
> `field`: represents the SNMP-related value
> `reason`: represents the reason why `tcp` deleted the current `skb`, and contains some hints.
> Of course, if you want to know more about the reason for updating the current function, you can check: https://www.brendangregg.com/blog/2018-05-31/linux-tcpdrop.html

I think you fail to explain why only TCP needs it? This should
be useful for all kinds of drops, not just TCP, therefore you should
consider extending net/core/drop_monitor.c instead of just tcp_drop().

Also, kernel does not have to explain it in strings, those SNMP
counters are already available for user-space, so kernel could
just use SNMP enums and let user-space interpret them. In many
cases, you are just adding strings for those SNMP enums.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ