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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABeXuvofQQ6GoL9TEgaNRkkFE5RDdrWUmkKOPQUP4f9Zg1KBXA@mail.gmail.com>
Date:   Tue, 18 Dec 2018 13:22:05 -0800
From:   Deepa Dinamani <deepa.kernel@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        David Miller <davem@...emloft.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        y2038 Mailman List <y2038@...ts.linaro.org>,
        Chris Zankel <chris@...kel.net>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Richard Henderson <rth@...ddle.net>,
        Thomas Gleixner <tglx@...utronix.de>, ubraun@...ux.ibm.com,
        linux-alpha@...r.kernel.org,
        linux-arch <linux-arch@...r.kernel.org>,
        linux-ia64@...r.kernel.org,
        "open list:RALINK MIPS ARCHITECTURE" <linux-mips@...ux-mips.org>,
        linux-s390 <linux-s390@...r.kernel.org>,
        linux-xtensa@...ux-xtensa.org,
        sparclinux <sparclinux@...r.kernel.org>
Subject: Re: [PATCH v2 7/8] socket: Add SO_TIMESTAMPING_NEW

On Tue, Dec 18, 2018 at 8:16 AM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Wed, Dec 12, 2018 at 4:25 PM Willem de Bruijn
> <willemdebruijn.kernel@...il.com> wrote:
> > On Tue, Dec 11, 2018 at 3:30 PM Deepa Dinamani <deepa.kernel@...il.com> wrote:
>
> > > @@ -851,39 +890,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
> > >                 break;
> > >
> > >         case SO_TIMESTAMPING_OLD:
> > > -               if (val & ~SOF_TIMESTAMPING_MASK) {
> > > -                       ret = -EINVAL;
> > > -                       break;
> > > -               }
> > > -
> > > -               if (val & SOF_TIMESTAMPING_OPT_ID &&
> > > -                   !(sk->sk_tsflags & SOF_TIMESTAMPING_OPT_ID)) {
> > > -                       if (sk->sk_protocol == IPPROTO_TCP &&
> > > -                           sk->sk_type == SOCK_STREAM) {
> > > -                               if ((1 << sk->sk_state) &
> > > -                                   (TCPF_CLOSE | TCPF_LISTEN)) {
> > > -                                       ret = -EINVAL;
> > > -                                       break;
> > > -                               }
> > > -                               sk->sk_tskey = tcp_sk(sk)->snd_una;
> > > -                       } else {
> > > -                               sk->sk_tskey = 0;
> > > -                       }
> > > -               }
> > > -
> > > -               if (val & SOF_TIMESTAMPING_OPT_STATS &&
> > > -                   !(val & SOF_TIMESTAMPING_OPT_TSONLY)) {
> > > -                       ret = -EINVAL;
> > > -                       break;
> > > -               }
> > > -
> > > -               sk->sk_tsflags = val;
> > > -               if (val & SOF_TIMESTAMPING_RX_SOFTWARE)
> > > -                       sock_enable_timestamp(sk,
> > > -                                             SOCK_TIMESTAMPING_RX_SOFTWARE);
> > > -               else
> > > -                       sock_disable_timestamp(sk,
> > > -                                              (1UL << SOCK_TIMESTAMPING_RX_SOFTWARE));
> > > +               ret = setsockopt_timestamping(sk, optname, val);
> >
> > Once again a lot of needless code churn. The only functional change is adding
>
> I think moving the code out into a separate function is a useful cleanup,
> but if we want to do that, it may be better done in another patch, to
> make it easier to review.

I already removed this addition of function. I have open coded all the
logic here and in the patch 6.
I will post an update.

-Deepa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ