netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Subject: netfilter: x_tables: ratelimit most printks
Date: Wed,  7 Feb 2018 14:48:21 +0100	[thread overview]
Message-ID: <20180207134828.18691-1-fw@strlen.de> (raw)

Aeons ago, before namespaces, there was no need to ratelimit this:
all of these error messages got triggered in response to iptables
commands, which need CAP_NET_ADMIN.

Nowadays we have namespaces, so its better to ratelimit these.
This should also help fuzzing (syzkaller), as it can generate a large
volume of error messages (which are useless there).

The patches are split as follows:
- first get rid of printks that should never be triggered, as userland
  doesn't generate such malformed rules anyway.
- second, switch some printks to pr_debug.  This is mostly for messages
  where it might make sense for developers to see what exactly went
  wrong.

Rest of the patches swap remaining pr_foo with pr_foo_ratelimited().

Note that most patches introduce overly long lines, but splitting these
would make it necessary to split the error messages which is worse.

46 files changed, 254 insertions(+), 257 deletions(-)


             reply	other threads:[~2018-02-07 13:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 13:48 Florian Westphal [this message]
2018-02-07 13:48 ` [PATCH nf 1/7] netfilter: x_tables: remove pr_info where possible Florian Westphal
2018-02-07 17:03   ` Pablo Neira Ayuso
2018-02-07 19:14     ` Florian Westphal
2018-02-07 13:48 ` [PATCH nf 2/7] netfilter: x_tables: prefer pr_debug " Florian Westphal
2018-02-07 17:02   ` Pablo Neira Ayuso
2018-02-07 19:15     ` Florian Westphal
2018-02-07 13:48 ` [PATCH nf 3/7] netfilter: xt_CT: use pr ratelimiting Florian Westphal
2018-02-07 13:48 ` [PATCH nf 4/7] netfilter: x_tables: rate limit pr_err warnings Florian Westphal
2018-02-07 13:48 ` [PATCH nf 5/7] netfilter: x_tables: rate-limit table mismatch warnings Florian Westphal
2018-02-07 13:48 ` [PATCH nf 6/7] netfilter: x_tables: use pr ratelimiting Florian Westphal
2018-02-07 13:48 ` [PATCH nf 7/7] netfilter: x_tables: use pr ratelimiting in all remaining spots Florian Westphal
2018-02-07 17:00   ` Pablo Neira Ayuso
2018-02-07 19:23     ` Florian Westphal
2018-02-07 19:30       ` Pablo Neira Ayuso
2018-02-14 19:49 ` netfilter: x_tables: ratelimit most printks Pablo Neira Ayuso

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=20180207134828.18691-1-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=netfilter-devel@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).