From: Jakub Kicinski <kuba@kernel.org>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: netdev@vger.kernel.org, jiri@resnulli.us,
xiyou.wangcong@gmail.com, davem@davemloft.net,
edumazet@google.com, security@kernel.org, nnamrec@gmail.com
Subject: Re: [PATCH net 1/1 v2] net: sched: Disallow replacing of child qdisc from one parent to another
Date: Fri, 10 Jan 2025 18:33:07 -0800 [thread overview]
Message-ID: <20250110183307.4bfba412@kernel.org> (raw)
In-Reply-To: <CAM0EoMn7uADZkTQkg48VP7K7KD=ZVHPLfZheAwXSumqFWommNg@mail.gmail.com>
On Fri, 10 Jan 2025 09:48:02 -0500 Jamal Hadi Salim wrote:
> There are two possible intentions/meanings from reading that dump:
> a) the pfifo queue with handle 204: is intended to be shared by both
> parent 100:1 and 100:4 --> refcount of 2 takes care of that. But then
> you can question should the parent have stayed the same or should we
> use the new one? We could keep track of both parents but that is
> another surgery which seemed unnecessary.
> b) We intended "replace" to move the pfifo queue id 204: from 100:4 to
> 100:1. In which case we would need to do some other surgery which
> includes getting things pointed to the new parent only.
>
> While #a may be practical it could be achieved by building the proper
> qdisc/class hierarchies. I am not sure of practical use #b. In both
> cases it seemed to me prevention is better than the cure.
> Question for you for that test: Which of these two were you intending?
> It could be you just wanted to ensure some grafting happened, in
> which case we can adjust the test case.
Yes, adjusting the test sounds good. I was testing visibility after
supported operations. If the operation is no longer supported there's
nothing to test :)
> Like 99.99% of bugs being reported on tc, someone found a clever way
> to use netlink to put kernel state in an awkward position. And like
> most fixes it just requires more checks against incoming control into
> the kernel.
next prev parent reply other threads:[~2025-01-11 2:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 14:33 [PATCH net 1/1 v2] net: sched: Disallow replacing of child qdisc from one parent to another Jamal Hadi Salim
2025-01-09 14:45 ` Jakub Kicinski
2025-01-09 18:29 ` Jakub Kicinski
2025-01-10 14:48 ` Jamal Hadi Salim
2025-01-11 2:33 ` Jakub Kicinski [this message]
2025-01-11 14:49 ` Jamal Hadi Salim
2025-01-10 5:44 ` Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250110183307.4bfba412@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=nnamrec@gmail.com \
--cc=security@kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).