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]
Date:   Mon, 16 Nov 2020 17:11:24 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Willem de Bruijn' <willemdebruijn.kernel@...il.com>,
        Matthew Wilcox <willy@...radead.org>
CC:     "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Soheil Hassas Yeganeh" <soheil.kdev@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        "Shuo Chen" <shuochen@...gle.com>
Subject: RE: [PATCH v2] epoll: add nsec timeout support

From: Willem de Bruijn
> Sent: 16 November 2020 17:01
> 
> On Mon, Nov 16, 2020 at 11:19 AM Matthew Wilcox <willy@...radead.org> wrote:
> >
> > On Mon, Nov 16, 2020 at 11:10:01AM -0500, Willem de Bruijn wrote:
> > > diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h
> > > index 8a3432d0f0dc..f6ef9c9f8ac2 100644
> > > --- a/include/uapi/linux/eventpoll.h
> > > +++ b/include/uapi/linux/eventpoll.h
> > > @@ -21,6 +21,7 @@
> > >
> > >  /* Flags for epoll_create1.  */
> > >  #define EPOLL_CLOEXEC O_CLOEXEC
> > > +#define EPOLL_NSTIMEO 0x1
> > >
> > >  /* Valid opcodes to issue to sys_epoll_ctl() */
> > >  #define EPOLL_CTL_ADD 1
> >
> > Not a problem with your patch, but this concerns me.  O_CLOEXEC is
> > defined differently for each architecture, so we need to stay out of
> > several different bits when we define new flags for EPOLL_*.  Maybe
> > this:
> >
> > /*
> >  * Flags for epoll_create1.  O_CLOEXEC may be different bits, depending
> >  * on the CPU architecture.  Reserve the known ones.
> >  */
> > #define EPOLL_CLOEXEC           O_CLOEXEC
> > #define EPOLL_RESERVED_FLAGS    0x00680000
> > #define EPOLL_NSTIMEO           0x00000001
> 
> Thanks. Good point, I'll add that in v3.

You could also add a compile assert to check that the flag is reserved.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ