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: <f44a64cc-c267-48e9-8838-4bc7c34fcbda@default>
Date:   Tue, 20 Nov 2018 02:41:52 -0800 (PST)
From:   Manish Kumar Singh <mk.singh@...cle.com>
To:     Michal Kubecek <mkubecek@...e.cz>,
        David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, eric.dumazet@...il.com,
        j.vosburgh@...il.com, vfalico@...il.com, andy@...yhouse.net,
        linux-kernel@...r.kernel.org
Subject: RE: [PATCH] bonding:avoid repeated display of same link status change

> -----Original Message-----
> From: Michal Kubecek [mailto:mkubecek@...e.cz]
> Sent: 05 नवम्बर 2018 01:11
> To: David Miller
> Cc: Manish Kumar Singh; netdev@...r.kernel.org; eric.dumazet@...il.com;
> j.vosburgh@...il.com; vfalico@...il.com; andy@...yhouse.net; linux-
> kernel@...r.kernel.org
> Subject: Re: [PATCH] bonding:avoid repeated display of same link status
> change
> 
> On Fri, Nov 02, 2018 at 11:31:38PM -0700, David Miller wrote:
> > From: mk.singh@...cle.com
> > Date: Wed, 31 Oct 2018 16:27:28 +0530
> >
> > > -			if (slave->delay) {
> > > +			if (slave->delay &&
> > > +			    !atomic64_read(&bond->rtnl_needed)) {
> >  ...
> > > +			    !atomic64_read(&bond->rtnl_needed)) {
> >  ...
> > > +			atomic64_set(&bond->rtnl_needed, 1);
> >  ...
> > > +		atomic64_set(&bond->rtnl_needed, 0);
> >  ...
> > > @@ -229,6 +229,7 @@ struct bonding {
> > >  	struct	 dentry *debug_dir;
> > >  #endif /* CONFIG_DEBUG_FS */
> > >  	struct rtnl_link_stats64 bond_stats;
> > > +	atomic64_t rtnl_needed;
> >
> > There is nothing "atomic" about a value that is only set and read.
> >
> > And using a full 64-bit value for something taking on only '0' and
> > '1' is unnecessary as well.
> 
> Part of the misunderstanding is caused by the fact that this is actually
> a v4 but not marked as such:
> 
>   v1: https://patchwork.ozlabs.org/patch/955789/
>   v2: https://patchwork.ozlabs.org/patch/970421/
>   v3: https://patchwork.ozlabs.org/patch/988241/
> 
> When commenting v3, I didn't know about the v2 discussion where Eric
> Dumazet NACKed the patch because of potential conflict issues:
> 
>   https://patchwork.ozlabs.org/patch/970421/#1992397
>   https://patchwork.ozlabs.org/patch/988241/#2017317
> 
> On the other hand, there is no need for atomic64_t. Simple atomic_t
> (with explaining comment) would suffice. On architectures allowing
> atomic read/write for 32-bit integers, there would be no performance
> penalty. On architectures not allowing it, atomic_read() and
> atomic_set() are implemented to be safe.

Sorry for late response, I was off to work for couple of weeks.

v3: https://patchwork.ozlabs.org/patch/988241/  was sent with atomic_t and after seeing your comment, I sent it with atomic64_t.
Please let me know if v3 was fine ? 

Thanks,
Manish
> 
> Michal Kubecek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ