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]
Message-ID: <CAHk-=wgQm4CgRJmmRdNjUCsX+F+mKxeUE_Siikuz6q_FbEySxA@mail.gmail.com>
Date:   Wed, 15 Mar 2023 16:47:01 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org,
        eric.dumazet@...il.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH net-next 1/8] inet: preserve const qualifier in inet_sk()

On Wed, Mar 15, 2023 at 4:37 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> Yep. my goal was to have const awareness.
>
> This:
>
> #define inet_sk(ptr) container_of(ptr, struct inet_sock, sk)
>
> does not really cover what I wanted, does it ?

Ugh. You should use "container_of_const()" of course.

I *thought* we already fixed plain "container_of()" to do the right
thing,, and got rid of "container_of_const()", but that was obviously
in my dreams.

           Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ