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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241107054840.91923-1-kuniyu@amazon.com>
Date: Wed, 6 Nov 2024 21:48:40 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <gnaaman@...venets.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<kuniyu@...zon.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH net-next v8 4/6] neighbour: Convert iteration to use hlist+macro

From: Gilad Naaman <gnaaman@...venets.com>
Date: Thu,  7 Nov 2024 05:39:46 +0000
> > > diff --git a/include/net/neighbour.h b/include/net/neighbour.h
> > > index 69aaacd1419f..68b1970d9045 100644
> > > --- a/include/net/neighbour.h
> > > +++ b/include/net/neighbour.h
> > > @@ -309,12 +309,9 @@ static inline struct neighbour *___neigh_lookup_noref(
> > >  	u32 hash_val;
> > >  
> > >  	hash_val = hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
> > > -	for (n = rcu_dereference(nht->hash_buckets[hash_val]);
> > > -	     n != NULL;
> > > -	     n = rcu_dereference(n->next)) {
> > > +	neigh_for_each_in_bucket(n, &nht->hash_heads[hash_val])
> > 
> > Sorry, I missed this part needs to be _rcu version.
> > 
> > You can keep my Reviewed-by tag in v9.
> > 
> 
> No problem at all, will do.
> 
> Is it possible that the `_rcu` version will also be needed in `neigh_dump_table`?
> It is called from an `rcu_read_lock`ed section, and it doesn't hold the table-lock.

Right, there also should use _rcu one.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ