From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf 7/7] netfilter: x_tables: use pr ratelimiting in all remaining spots
Date: Wed, 7 Feb 2018 20:23:23 +0100 [thread overview]
Message-ID: <20180207192323.GG14261@breakpoint.cc> (raw)
In-Reply-To: <20180207170052.x6n6kod2zld7wuqd@salvia>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > --- a/net/bridge/netfilter/ebt_among.c
> > +++ b/net/bridge/netfilter/ebt_among.c
> > @@ -187,17 +187,17 @@ static int ebt_among_mt_check(const struct xt_mtchk_param *par)
> > expected_length += ebt_mac_wormhash_size(wh_src);
> >
> > if (em->match_size != EBT_ALIGN(expected_length)) {
> > - pr_info("wrong size: %d against expected %d, rounded to %zd\n",
> > - em->match_size, expected_length,
> > - EBT_ALIGN(expected_length));
> > + pr_info_ratelimited("wrong size: %d against expected %d, rounded to %zd\n",
>
> Shouldn't all these be pr_err_ratelimited instead?
Don't know.
This could even be pr_debug actually since this message is
useless unless you're doing ebtables development work.
> Probably this is a good chance to homogeneize all error reporting in
> xtables.
Yes.
> > if (wh_dst && (err = ebt_mac_wormhash_check_integrity(wh_dst))) {
> > - pr_info("dst integrity fail: %x\n", -err);
> > + pr_info_ratelimited("dst integrity fail: %x\n", -err);
> > return -EINVAL;
> > }
> > if (wh_src && (err = ebt_mac_wormhash_check_integrity(wh_src))) {
> > - pr_info("src integrity fail: %x\n", -err);
> > + pr_info_ratelimited("src integrity fail: %x\n", -err);
> > return -EINVAL;
Same for these two, I'll convert all to pr_debug instead.
> > if (info->queues_total == 0) {
> > - pr_err("NFQUEUE: number of total queues is 0\n");
> ^^^^^^^^
>
> We can probably add this all over the place in the same go?
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Yes.
> > if (index == IPSET_INVALID_ID) {
> > - pr_warn("Cannot find set identified by id %u to match\n",
> > - info->match_set.index);
> > + pr_warn_ratelimited("Cannot find set identified by id %u to match\n",
> > + info->match_set.index);
>
> Use pr_err_ratelimited instead?
I think we should settle on a single pr_foo, i suggest
pr_info(_ratelimited).
This is not an error condition, we only have these
printks because we can't return a proper error to userspace.
If this was netlink, it would be converted to extack instead...
next prev parent reply other threads:[~2018-02-07 19:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 13:48 netfilter: x_tables: ratelimit most printks Florian Westphal
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 [this message]
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=20180207192323.GG14261@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).