netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
To: netdev@vger.kernel.org
Cc: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Subject: [PATCH net-next 0/2] net: sched: act_ctinfo: fixes
Date: Mon, 17 Jun 2019 11:03:25 +0100	[thread overview]
Message-ID: <20190617100327.24796-1-ldir@darbyshire-bryant.me.uk> (raw)

This is first attempt at sending a small series.  Order is important
because one bug (policy validation) prevents us from encountering the
more important 'OOPS' generating bug in action creation.  Fix the OOPS
first.

Confession time: Until very recently, development of this module has
been done on 'net-next' tree to 'clean compile' level with run-time
testing on backports to 4.14 & 4.19 kernels under openwrt.  It turns out
that sched: action: based code has been under more active change than I
realised.

During the back & forward porting during development & testing, the
critical ACT_P_CREATED return code got missed despite being in the 4.14
& 4.19 backports.  I have now gone through the init functions, using
act_csum as reference with a fine toothed comb and am happy they do the
same things.

This issue hadn't been caught till now due to another issue caused by
new strict nla_parse_nested function failing parsing validation before
action creation.

Thanks to Marcelo Leitner <marcelo.leitner@gmail.com> for flagging
extack deficiency (fixed in 733f0766c3de sched: act_ctinfo: use extack
error reporting) which led to b424e432e770 ("netlink: add validation of
NLA_F_NESTED flag") and 8cb081746c03 ("netlink: make validation more
configurable for future strictness”) which led to the policy validation
fix, which then led to the action creation fix both contained in this
series.

If I ever get to a developer conference please feel free to
tar/feather/apply cone of shame.

Kevin Darbyshire-Bryant (2):
  net: sched: act_ctinfo: fix action creation
  net: sched: act_ctinfo: fix policy validation

 net/sched/act_ctinfo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.20.1 (Apple Git-117)


             reply	other threads:[~2019-06-17 10:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 10:03 Kevin Darbyshire-Bryant [this message]
2019-06-17 10:03 ` [PATCH net-next 1/2] net: sched: act_ctinfo: fix action creation Kevin Darbyshire-Bryant
2019-06-17 10:03 ` [PATCH net-next 2/2] net: sched: act_ctinfo: fix policy validation Kevin Darbyshire-Bryant
2019-06-17 21:01 ` [PATCH net-next 0/2] net: sched: act_ctinfo: fixes David Miller
2019-06-18  7:33   ` Kevin 'ldir' Darbyshire-Bryant

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=20190617100327.24796-1-ldir@darbyshire-bryant.me.uk \
    --to=ldir@darbyshire-bryant.me.uk \
    --cc=netdev@vger.kernel.org \
    /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).