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]
Date:   Tue, 29 Jun 2021 14:51:16 +0300
From:   Nikolay Aleksandrov <nikolay@...dia.com>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Ido Schimmel <idosch@...sch.org>,
        Tobias Waldekranz <tobias@...dekranz.com>,
        Roopa Prabhu <roopa@...dia.com>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH v4 net-next 01/14] net: bridge: switchdev: send FDB
 notifications for host addresses

On 29/06/2021 14:35, Vladimir Oltean wrote:
> On Tue, Jun 29, 2021 at 01:40:20PM +0300, Nikolay Aleksandrov wrote:
>>> @@ -117,18 +118,16 @@ br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
>>>  		.is_local = test_bit(BR_FDB_LOCAL, &fdb->flags),
>>>  		.offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
>>>  	};
>>> -
>>> -	if (!fdb->dst)
>>> -		return;
>>> +	struct net_device *dev = fdb->dst ? fdb->dst->dev : br->dev;
>>
>> you should use READ_ONCE() for fdb->dst here to make sure it's read only once,
>> to be fair the old code had the same issue :)
> 
> Thanks for the comment. I still have budget for one patch until I hit
> the 15 limit, so I guess I'll do that separately before this one.
> Just trying to make sure I get it right. You want me to annotate
> fdb_create(), br_fdb_update(), fdb_add_entry() and
> br_fdb_external_learn_add() with WRITE_ONCE() too, right?
> Can I resend right away or did you notice other issues in the other
> patches?
> 

That would be best, yes. The rest of the changes look good to me.

Thanks,
 Nik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ