lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpUvn+ijyZtLmca3n+nZmHY9cMmPYwZMp5BTv10bLUhg3Q@mail.gmail.com>
Date:   Thu, 2 Apr 2020 21:43:29 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net] net: sched: reduce amount of log messages in act_mirred

On Thu, Apr 2, 2020 at 6:14 PM Marcelo Ricardo Leitner
<marcelo.leitner@...il.com> wrote:
>
> On Thu, Apr 02, 2020 at 06:04:17PM -0700, David Miller wrote:
> > From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
> > Date: Thu,  2 Apr 2020 19:26:12 -0300
> >
> > > @@ -245,8 +245,8 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
> > >     }
> > >
> > >     if (unlikely(!(dev->flags & IFF_UP))) {
> > > -           net_notice_ratelimited("tc mirred to Houston: device %s is down\n",
> > > -                                  dev->name);
> > > +           pr_notice_once("tc mirred: device %s is down\n",
> > > +                          dev->name);
> >
> > This reduction is too extreme.
> >
> > If someone causes this problem, reconfigures everything thinking that the
> > problem will be fixed, they won't see this message the second time and
> > mistakenly think it's working.
>
> Fair point. Then what about removing it entirely? printk's are not the
> best way to debug packet drops anyway and the action already registers
> the drops in its stats.
>
> Or perhaps a marker in the message, stating that it is logged only
> once per boot. I'm leaning to the one above, to just remove it.

I think the reason why we print that is we do not handle
NETDEV_DOWN event in mirred_device_event() or check IFF_UP
in tcf_mirred_init(). I think if we can do both, we can remove
this message entirely. I am not sure whether the latter would break
existing expectations, as users may want to add a down device
as a target and bring it up afterward.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ