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: <20080125081315.467fad70@deepthought>
Date:	Fri, 25 Jan 2008 08:13:15 -0800
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	David Miller <davem@...emloft.net>, kaber@...sh.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH] fib_trie: rescan if key is lost during dump

On Fri, 25 Jan 2008 09:23:00 +0100
Jarek Poplawski <jarkao2@...il.com> wrote:

> On 24-01-2008 22:51, Stephen Hemminger wrote:
> > Normally during a dump the key of the last dumped entry is used for
> > continuation, but since lock is dropped it might be lost. In that case
> > fallback to the old counter based N^2 behaviour.  This means the dump will end up
> > skipping some routes which matches what FIB_HASH does.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
> ...
> > @@ -1918,35 +1931,37 @@ static int fn_trie_dump(struct fib_table
> >  	struct leaf *l;
> >  	struct trie *t = (struct trie *) tb->tb_data;
> >  	t_key key = cb->args[2];
> > +	int count = cb->args[3];
> >  
> >  	rcu_read_lock();
> 
> Sorry, but I lost the point: is rtnl held or not held here at the moment?
> If held, how this rcu_read_lock can help? Maybe some additional comment
> in the code?
> 
> Thanks,
> Jarek P.

There are two different issues, (therefore two different patches).
1. How to handle multipart resume when the key was deleted during the
   period the lock was dropped.

   That is what this patch addresses.

2. RCU is unnecessary here because of use of RTNL.  I am going to defer
   on this till after #1. That patch is much less important.

-- 
Stephen Hemminger <stephen.hemminger@...tta.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ