From: Davide Caratti <dcaratti@redhat.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>, David Miller <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH net] net/sched: properly init chain in case of multiple control actions
Date: Sun, 14 Oct 2018 16:14:44 +0200 [thread overview]
Message-ID: <d4164a82e5927d389d2b9ca989162c82327b9f87.camel@redhat.com> (raw)
In-Reply-To: <9e6516f7-92b9-b151-42ba-2b658d289ae3@mojatatu.com>
On Sun, 2018-10-14 at 09:46 -0400, Jamal Hadi Salim wrote:
> On 2018-10-13 11:23 a.m., Davide Caratti wrote:
> >
> > A (legal?) trick is to let tcf_action store the fallback action when it
> > contains a 'goto chain' command, I just posted a proposal for gact. If you
> > think it's ok, I will test and post the same for act_police.
> >
>
> Need some more thought. So the issue here is the goto chain failed
> the configured chain doesnt exist?
'goto chain' works only if it's stored in tcfa_action: if not, it does
NULL dereference. That's ok for most actions, but not for gact and police
- as they allow two control actions simultaneously, and the one that is
stored in the action-specific data does not initialize any chain (because
the initialization of 'goto_chain' data is done at [1])
(while at it, I also checked act_bpf, and it seems ok because 'goto chain'
does not seem to be a valid control action for eBPF programs.)
regards,
--
davide
[1] https://elixir.bootlin.com/linux/v4.19-rc7/source/net/sched/act_api.c#L888
next prev parent reply other threads:[~2018-10-14 21:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 20:39 [PATCH net] net/sched: properly init chain in case of multiple control actions Davide Caratti
2018-10-12 20:57 ` Cong Wang
2018-10-13 15:23 ` Davide Caratti
2018-10-14 13:46 ` Jamal Hadi Salim
2018-10-14 14:14 ` Davide Caratti [this message]
2018-10-15 18:31 ` Cong Wang
2018-10-16 17:38 ` Davide Caratti
2018-10-18 5:35 ` Cong Wang
2018-10-18 8:38 ` Davide Caratti
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=d4164a82e5927d389d2b9ca989162c82327b9f87.camel@redhat.com \
--to=dcaratti@redhat.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.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).