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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230110231201.5eddb889@gandalf.local.home>
Date:   Tue, 10 Jan 2023 23:12:01 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     运辉崔 <cuiyunhui@...edance.com>
Cc:     Eric Dumazet <edumazet@...gle.com>, mhiramat@...nel.org,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        kuniyu@...zon.com, xiyou.wangcong@...il.com,
        duanxiongchun@...edance.com, linux-kernel@...r.kernel.org,
        linux-trace-kernel@...r.kernel.org, netdev@...r.kernel.org,
        dust.li@...ux.alibaba.com
Subject: Re: [External] Re: [PATCH v5] sock: add tracepoint for send recv
 length

On Wed, 11 Jan 2023 11:53:24 +0800
运辉崔 <cuiyunhui@...edance.com> wrote:

> Hi Steve, Based on your suggestion, can we use the following code
> instead of using DEFINE_EVENT_PRINT ?

I only suggested it because you didn't have that logic for the
sock_send_length trace event. But if you don't care about that one, then
sure, use it for both.

-- Steve


> 
> DECLARE_EVENT_CLASS(sock_msg_length,
> 
>         TP_PROTO(struct sock *sk, int ret, int flags),
> 
>         TP_ARGS(sk, ret, flags),
> 
>         TP_STRUCT__entry(
>                 __field(void *, sk)
>                 __field(__u16, family)
>                 __field(__u16, protocol)
>                 __field(int, ret)
>                 __field(int, flags)
>         ),
> 
>         TP_fast_assign(
>                 __entry->sk = sk;
>                 __entry->family = sk->sk_family;
>                 __entry->protocol = sk->sk_protocol;
>                 __entry->ret = ret;
>                 __entry->flags = flags;
>         ),
> 
>         TP_printk("sk address = %p, family = %s protocol = %s, length
> = %d, error = %d, flags = 0x%x",
>                   __entry->sk, show_family_name(__entry->family),
>                   show_inet_protocol_name(__entry->protocol),
>                   !(__entry->flags & MSG_PEEK) ?
>                   (__entry->ret > 0 ? __entry->ret : 0) : 0,
>                   __entry->ret < 0 ? __entry->ret : 0,
>                   __entry->flags)
> );

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ