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: <D5C1322C3E673F459512FB59E0DDC3290344621B@orsmsx414.amr.corp.intel.com>
Date:	Sat, 21 Jul 2007 11:55:39 -0700
From:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
To:	"Patrick McHardy" <kaber@...sh.net>
Cc:	<netdev@...r.kernel.org>
Subject: RE: Question: how to detect if a qdisc is root or not?

> > Anyways, I tried a few different things, and what it looks like is
> > sch->parent will be NULL (0) for the top-level device.  This is 
> > sch->correct,
> > and trying to mess with that screws up qdisc_graft() when unloading 
> > the qdisc.  I also tried adding a TCQ_F_ROOT flag to 
> sch->flags when 
> > classid is TC_H_ROOT, but that also screwed up unloading the qdisc.
> 
> 
> I dont think I understand. Whats the problem with setting 
> sch->parent on initialization instead on grafting as I did in 
> my example patch?
> Please explain the problems arrising on unload in detail.

sch->parent is getting set on initialization, and for the root and
ingress qdiscs, it's left at zero.  If I change that value, when the
root qdisc is unloaded and pfifo_fast is put back into place, the
qdisc_destroy() walks the tree and attempts to free memory from the
handle pointed at by sch->parent.  It stops when sch->parent is NULL, so
sch->parent is actually being set as intended.  The only thing that
confused me is that nowhere in the qdisc is TC_H_ROOT included
explicitly, rather, the root qdisc is where sch->parent is NULL.

So I misunderstood what was actually wrong.  The qdisc code is ok as-is,
it's just that the top-level qdisc (root and ingress) have a sch->parent
of NULL, which is being set correctly today.

Hope that clarifies.

Thanks,
-PJ
-
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