From: Cong Wang <xiyou.wangcong@gmail.com>
To: Lin Ma <linma@zju.edu.cn>
Cc: jhs@mojatatu.com, jiri@resnulli.us, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net/sched: cls_api: complement tcf_tfilter_dump_policy
Date: Mon, 1 Jan 2024 10:42:54 -0800 [thread overview]
Message-ID: <ZZMHrqMO3sc6iINd@pop-os.localdomain> (raw)
In-Reply-To: <20231228064358.3042747-1-linma@zju.edu.cn>
On Thu, Dec 28, 2023 at 02:43:58PM +0800, Lin Ma wrote:
> In function `tc_dump_tfilter`, the attributes array is parsed via
> tcf_tfilter_dump_policy which only describes TCA_DUMP_FLAGS. However,
> the NLA TCA_CHAIN is also accessed with `nla_get_u32`.
>
> The access to TCA_CHAIN is introduced in commit 5bc1701881e3 ("net:
> sched: introduce multichain support for filters") and no nla_policy is
> provided for parsing at that point. Later on, tcf_tfilter_dump_policy is
> introduced in commit f8ab1807a9c9 ("net: sched: introduce terse dump
> flag") while still ignoring the fact that TCA_CHAIN needs a check. This
> patch does that by complementing the policy to allow the access
> discussed here can be safe as other cases just choose rtm_tca_policy as
> the parsing policy.
>
This patch looks good but you could use NLA_POLICY_MAX() to validate
TCA_CHAIN while you are on it.
Thanks.
next prev parent reply other threads:[~2024-01-01 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 6:43 [PATCH net-next v2] net/sched: cls_api: complement tcf_tfilter_dump_policy Lin Ma
2023-12-28 13:13 ` Jamal Hadi Salim
2024-01-01 18:42 ` Cong Wang [this message]
2024-01-03 12:00 ` patchwork-bot+netdevbpf
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=ZZMHrqMO3sc6iINd@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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