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: <20240807093837.6aaa6566@kernel.org>
Date: Wed, 7 Aug 2024 09:38:37 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Joe Damato <jdamato@...tly.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, alexanderduyck@...com
Subject: Re: [PATCH net-next 1/2] eth: fbnic: add basic rtnl stats

On Wed, 7 Aug 2024 16:43:47 +0100 Joe Damato wrote:
> > +static void fbnic_aggregate_ring_rx_counters(struct fbnic_net *fbn,
> > +					     struct fbnic_ring *rxr)
> > +{
> > +	struct fbnic_queue_stats *stats = &rxr->stats;
> > +
> > +	if (!(rxr->flags & FBNIC_RING_F_STATS))
> > +		return;
> > +  
> 
> Nit: I noticed this check is in both aggregate functions and just
> before where the functions are called below. I'm sure you have
> better folks internally to review this than me, but: maybe the extra
> flags check isn't necessary?
> 
> Could be good if you are trying to be defensive, though.

Perils of upstreaming code that live out of tree for too long :(
These functions will also be called from the path which does runtime
ring changes (prepare/swap) and there the caller has no such check.

I'll drop it, and make a note to bring it back later.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ