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:   Tue, 22 Nov 2022 10:56:40 +0100
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Kurt Kanzenbach <kurt@...utronix.de>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2 net 7/7] hsr: Use a single struct for self_node.

On 2022-11-22 10:20:49 [+0100], Kurt Kanzenbach wrote:
> On Mon Nov 21 2022, Sebastian Andrzej Siewior wrote:
> > self_node_db is a list_head with one entry of struct hsr_node. The
> > purpose is to hold the two MAC addresses of the node itself.
> > It is convenient to recycle the structure. However having a list_head
> > and fetching always the first entry is not really optimal.
> >
> > Created a new data strucure contaning the two MAC addresses named
> > hsr_self_node. Access that structured like an RCU protected pointer so
>                              ^ structure
> 
> > it can be replaced on the fly withou blocking the reader.
>                                ^ without

argh.

> >
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> 
> Lacks a Fixes tag. Looks rather like an optimization than a bugfix? So,
> maybe this one should go to net-next instead.

The initial motivation for
	hsr: Avoid double remove of a node

was to use hlist_del_init_rcu() for the remove and then use
hlist_unhashed() for the check. This got me to this because I was not
sure why we have this list for a single node which isn't needed and
looks like waste of memory and confusion (a list for a single entry?).
In the end I decided midway to stay with the list_head and just add a
`removed' field to deal with this.

Can we ignore this patch and then I repost just that one for next?

> [snip]
> 
> > +struct hsr_self_node {
> > +	unsigned char	macaddress_A[6];
>                                     ^ ETH_ALEN
> 
> > +	unsigned char	macaddress_B[6];
>                                     ^ ETH_ALEN
> > +	struct rcu_head	rcu_head;
> > +};
> > +

Sure.

> Thanks,
> Kurt
Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ