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: <66d5ebbacf29c_67e67294e8@willemb.c.googlers.com.notmuch>
Date: Mon, 02 Sep 2024 12:45:46 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jason Xing <kerneljasonxing@...il.com>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: davem@...emloft.net, 
 edumazet@...gle.com, 
 kuba@...nel.org, 
 pabeni@...hat.com, 
 shuah@...nel.org, 
 jmaloy@...hat.com, 
 linux-kselftest@...r.kernel.org, 
 netdev@...r.kernel.org, 
 Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next] selftests: add selftest for UDP SO_PEEK_OFF
 support

Jason Xing wrote:
> On Mon, Sep 2, 2024 at 11:02 PM Willem de Bruijn
> <willemdebruijn.kernel@...il.com> wrote:
> >
> > Jason Xing wrote:
> > > From: Jason Xing <kernelxing@...cent.com>
> > >
> > > Add the SO_PEEK_OFF selftest for UDP. In this patch, I mainly do
> > > three things:
> > > 1. rename tcp_so_peek_off.c
> > > 2. adjust for UDP protocol
> > > 3. add selftests into it
> > >
> > > Suggested-by: Jon Maloy <jmaloy@...hat.com>
> > > Signed-off-by: Jason Xing <kernelxing@...cent.com>
> >
> > A few minor comments. Nothing important.
> >
> > Subject to Stan's point about .gitignore:
> >
> > Reviewed-by: Willem de Bruijn <willemb@...gle.com>
> 
> Thanks for your review!
> 
> >
> > > -int tcp_peek_offset_probe(sa_family_t af)
> > > +int sk_peek_offset_probe(sa_family_t af, int proto)
> > >  {
> > > +     int type = (proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM);
> > >       int optv = 0;
> > >       int ret = 0;
> > >       int s;
> > >
> > > -     s = socket(af, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP);
> > > +     s = socket(af, type, proto);
> >
> > Removing the SOCK_CLOEXEC because not relevant to this single thread
> > process, I suppose?
> 
> Yep. We don't need this one.
> 
> >
> > Not important, but no need for proto, can just be 0.
> 
> You're right. I wonder if it is better if we explicitly pass the proto
> here? I would like not to touch it here.

It's not better or worse. Just not needed. So either way.
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ