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] [day] [month] [year] [list]
Message-ID: <CAM_iQpUJ2KHhWYxuu0rJzwSLB_BdT_tGbuFCStpW97URcWmjpw@mail.gmail.com>
Date:   Thu, 1 Dec 2016 22:53:09 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Pavel Emelyanov <xemul@...nvz.org>
Subject: Re: [PATCH 2/3] netns: add dummy struct inside "struct net_generic"

On Thu, Dec 1, 2016 at 9:42 PM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Thu, Dec 1, 2016 at 5:12 PM, Alexey Dobriyan <adobriyan@...il.com> wrote:
>>  struct net_generic {
>> -       unsigned int len;
>> -       struct rcu_head rcu;
>> +       struct {
>> +               unsigned int len;
>> +               struct rcu_head rcu;
>> +       } s;
>>
>>         void *ptr[0];
>>  };
>
> I think you can put them in a union, since rcu is only used
> for kfree_rcu() where len is not needed and rcu_head doesn't
> need to be initialized by callers.

Never mind, readers could be still reading ->len while we modify
->rcu. So they can't be in a union.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ