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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Jun 2020 09:36:25 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] selftests/net: report etf errors correctly

On Thu, 18 Jun 2020 12:18:01 -0400 Willem de Bruijn wrote:
> On Thu, Jun 18, 2020 at 11:54 AM Jakub Kicinski <kuba@...nel.org> wrote:
> > On Thu, 18 Jun 2020 10:55:49 -0400 Willem de Bruijn wrote:  
> > > +             switch (err->ee_errno) {
> > > +             case ECANCELED:
> > > +                     if (err->ee_code != SO_EE_CODE_TXTIME_MISSED)
> > > +                             error(1, 0, "errqueue: unknown ECANCELED %u\n",
> > > +                                         err->ee_code);
> > > +                     reason = "missed txtime";
> > > +             break;
> > > +             case EINVAL:
> > > +                     if (err->ee_code != SO_EE_CODE_TXTIME_INVALID_PARAM)
> > > +                             error(1, 0, "errqueue: unknown EINVAL %u\n",
> > > +                                         err->ee_code);
> > > +                     reason = "invalid txtime";
> > > +             break;
> > > +             default:
> > > +                     error(1, 0, "errqueue: errno %u code %u\n",
> > > +                           err->ee_errno, err->ee_code);
> > > +             };
> > >
> > >               tstamp = ((int64_t) err->ee_data) << 32 | err->ee_info;
> > >               tstamp -= (int64_t) glob_tstart;
> > >               tstamp /= 1000 * 1000;
> > > -             fprintf(stderr, "send: pkt %c at %" PRId64 "ms dropped\n",
> > > -                             data[ret - 1], tstamp);
> > > +             fprintf(stderr, "send: pkt %c at %" PRId64 "ms dropped: %s\n",
> > > +                             data[ret - 1], tstamp, reason);  
> >
> > Hi Willem! Checkpatch is grumpy about some misalignment here:
> >
> > CHECK: Alignment should match open parenthesis
> > #67: FILE: tools/testing/selftests/net/so_txtime.c:187:
> > +                               error(1, 0, "errqueue: unknown ECANCELED %u\n",
> > +                                           err->ee_code);
> >
> > CHECK: Alignment should match open parenthesis
> > #73: FILE: tools/testing/selftests/net/so_txtime.c:193:
> > +                               error(1, 0, "errqueue: unknown EINVAL %u\n",
> > +                                           err->ee_code);
> >
> > CHECK: Alignment should match open parenthesis
> > #87: FILE: tools/testing/selftests/net/so_txtime.c:205:
> > +               fprintf(stderr, "send: pkt %c at %" PRId64 "ms dropped: %s\n",
> > +                               data[ret - 1], tstamp, reason);  
> 
> Thanks for the heads-up, Jakub.
> 
> I decided to follow the convention in the file, which is to align with
> the start of the string.

Ack, I remember the selftest was added with a larger series so I didn't
want to complain about minutia :)

> Given that, do you want me to resubmit with the revised offset? I'm
> fine either way, of course.

No strong feelings, perhaps it's fine if the rest of the file is
like that already.

> Also, which incantation of checkpatch do you use? I did run
> checkpatch, without extra args, and it did not warn me about this.

I run with --strict, and pick the warnings which make sense.

Powered by blists - more mailing lists