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: <CANn89i+mK2VG2VnxPduSREHp70gJLP7oNp3SUoMW-YaSd7jJRA@mail.gmail.com>
Date:   Sat, 29 Oct 2022 08:23:36 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     menglong8.dong@...il.com
Cc:     kuba@...nel.org, davem@...emloft.net, pabeni@...hat.com,
        yoshfuji@...ux-ipv6.org, dsahern@...nel.org, imagedong@...cent.com,
        kafai@...com, asml.silence@...il.com, keescook@...omium.org,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/9] net: tcp: add 'drop_reason' field to struct tcp_skb_cb

On Sat, Oct 29, 2022 at 6:11 AM <menglong8.dong@...il.com> wrote:
>
> From: Menglong Dong <imagedong@...cent.com>
>
> Because of the long call chain on processing skb in TCP protocol, it's
> hard to pass the drop reason to the code where the skb is freed.
>
> Therefore, we can store the drop reason to skb->cb, and pass it to
> kfree_skb_reason(). I'm lucky, the struct tcp_skb_cb still has 4 bytes
> spare space for this purpose.

No, we have needs for this space for future use.

skb->cb[] purpose is to store semi-permanent info, for skbs that stay
in a queue.

Here, you need a state stored only in the context of the current context.
Stack variables are better.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ