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]
Date:	Thu, 21 Aug 2008 10:01:55 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	denys@...p.net.lb
Subject: Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().

On Tue, Aug 19, 2008 at 09:16:42AM +0000, Jarek Poplawski wrote:
> On Tue, Aug 19, 2008 at 06:55:04PM +1000, Herbert Xu wrote:
...
> > In fact we're not really adding anything new here, the qdiscs were
> > not accessed under RCU uniformly.  If you go back in the tree prior
> > to the multi-qdisc stuff, you'll find that only dev_queue_xmit works
> > under RCU.  qdisc_restart does not and therefore deferring the
> > destruction to RCU is pointless anyway.
> > 
> > So in fact we've already been relying on the fact that by the time
> > qdisc_destroy comes about nobody on the read side (i.e., the packet
> > transmission path) should have a reference to it.
> 
> Let's not discuss using such a qdisc by others but a possibility
> that some common lists could be broken for readers from upper qdiscs.
> (They were not deactivated.) Of course, if it's done properly with
> some references before qdisc_destroy then it's all right. I'd prefer
> to check this later yet.

So, what I was most suspicious of, cls_u32, looks like safe wrt. this.
Congratulations for good estimation of this.

But how about this part in qdisc_destroy(): 
        if (qdisc->parent)
                list_del(&qdisc->list);

If we do this with child qdisc from qdisc_graft() it's without
deactivation. The rest of the tree can be dequeued in the meantime
and call qdisc_tree_decrease_qlen() (like hfsc, tbf, netem), which
uses qdisc_lookup() to access this list. We list_del() under rtnl
lock only, they lookup under sch_tree_lock(). Is it a bit unsafe
or I miss something?

Thanks,
Jarek P.
--
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