From: shaozhengchao <shaozhengchao@huawei.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <zengyhkyle@gmail.com>, David Miller <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, netdev <netdev@vger.kernel.org>,
YueHaibing <yuehaibing@huawei.com>
Subject: Re: Question: Patch:("net: sched: cbq: dont intepret cls results when asked to drop") may be not bug for branch LTS 5.10
Date: Tue, 17 Jan 2023 09:03:29 +0800 [thread overview]
Message-ID: <8dabc718-4ffb-5178-6452-e634630814bb@huawei.com> (raw)
In-Reply-To: <4538d7d2-0d43-16b7-9f80-77355f08cc61@huawei.com>
+cc netdev@vger.kernel.org yuehaibing
On 2023/1/16 16:27, shaozhengchao wrote:
> When I analyzed the following LTS 5.10 patch, I had a small question:
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b2c917e510e5ddbc7896329c87d20036c8b82952
>
> As described in this patch, res is obtained through the tcf_classify()
> interface. If result is TC_ACT_SHOT, res may be an abnormal value.
> Accessing class in res will cause abnormal access.
>
> For LTS version 5.10, if tcf_classify() is to return a positive value,
> the classify hook function to the filter must be called, and the hook
> function returns a positive number. Observe the classify function of
> each filter. Generally, res is initialized in four scenarios.
> 1. res is assigned a value by res in the private member of each filter.
> Generally, kzalloc is used to assign initial values to res of various
> filters. Therefore, class in res is initialized to 0. Then use the
> tcf_bind_filter() interface to assign values to members in res.
> Therefore, value of class is assigned. For example, cls_basic.
> 2. The classify function of the filter directly assigns a value to the
> class of res, for example, cls_cgroup.
> 3. The filter classify function references tp and assigns a value to
> res, for example, cls_u32.
> 4. The change function of the filter references fh and assigns a value
> to class in res, for example, cls_rsvp.
>
> This Mainline problem is caused by commit:3aa260559455 (" net/sched:
> store the last executed chain also for clsact egress") and
> commit:9410c9409d3e ("net: sched: Introduce ingress classification
> function"). I don't know if my analysis is correct, please help correct,
> thank you very much.
>
> Zhengchao Shao
next parent reply other threads:[~2023-01-17 1:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4538d7d2-0d43-16b7-9f80-77355f08cc61@huawei.com>
2023-01-17 1:03 ` shaozhengchao [this message]
[not found] ` <CAM0EoM=rqF8K997AmC0VDncJ9LeA0PJku2BL96iiatAOiv1-vw@mail.gmail.com>
2023-01-17 19:07 ` Question: Patch:("net: sched: cbq: dont intepret cls results when asked to drop") may be not bug for branch LTS 5.10 Jamal Hadi Salim
2023-01-18 0:10 ` Kyle Zeng
2023-01-18 11:06 ` Davide Caratti
2023-01-18 13:06 ` Jamal Hadi Salim
2023-01-18 16:00 ` Davide Caratti
2023-01-18 17:00 ` Jamal Hadi Salim
2023-01-19 16:34 ` Davide Caratti
2023-01-23 19:50 ` Jamal Hadi Salim
2023-01-19 6:33 ` shaozhengchao
2023-01-19 7:00 ` shaozhengchao
2023-01-19 3:41 ` shaozhengchao
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=8dabc718-4ffb-5178-6452-e634630814bb@huawei.com \
--to=shaozhengchao@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashal@kernel.org \
--cc=xiyou.wangcong@gmail.com \
--cc=yuehaibing@huawei.com \
--cc=zengyhkyle@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).