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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Nov 2020 17:28:12 -0500
From:   Willem de Bruijn <>
To:     Arnd Bergmann <>
Cc:     Matthew Wilcox <>,
        David Laight <>,
        Linux FS-devel Mailing List <>,
        linux-kernel <>,
        Al Viro <>,
        Andrew Morton <>,
        Soheil Hassas Yeganeh <>,
        Arnd Bergmann <>, Shuo Chen <>,
        linux-man <>,
        Willem de Bruijn <>
Subject: Re: [PATCH v3 1/2] epoll: add nsec timeout support with epoll_pwait2

On Fri, Nov 20, 2020 at 2:23 PM Arnd Bergmann <> wrote:
> On Fri, Nov 20, 2020 at 5:01 PM Willem de Bruijn
> <> wrote:
> >
> > On Fri, Nov 20, 2020 at 3:13 AM Arnd Bergmann <> wrote:
> > >
> > > On Thu, Nov 19, 2020 at 9:13 PM Willem de Bruijn
> > > <> wrote:
> > > > On Thu, Nov 19, 2020 at 10:45 AM Arnd Bergmann <> wrote:
> > Thanks for the suggestion.
> >
> > I do have an initial patchset. As expected, it does involve quite a
> > bit of code churn to pass slack through the callers. I'll take a look
> > at your suggestion to simplify it.
> >
> > As is, the patchset is not ready to send to the list for possible
> > merge. In the meantime, I did push the patchset to github at
> > . I can send
> > a version marked RFC to the list if that's easier.
> Looks all good to me, just two small things I noticed that you can
> address before sending the new series:
> * The div_u64_rem() in ep_timeout_to_timespec() looks wrong, as
>   you are actually dividing a 'long' that does not need it.
> * In "epoll: wire up syscall epoll_pwait2", the alpha syscall has the
> wrong number, it
>    should be 110 higher than the others, not 109.

Thanks! I'll fix these up.

> > Btw, the other change, to convert epoll implementation to timespec64
> > before adding the syscall, equally adds some code churn compared to
> > patch v3. But perhaps the end state is cleaner and more consistent.
> Right, that's what I meant. If it causes too much churn, don't worry
> about it it.

I think it'll be better to split the patchsets:

epoll: convert internal api to timespec64
epoll: add syscall epoll_pwait2
epoll: wire up syscall epoll_pwait2
selftests/filesystems: expand epoll with epoll_pwait2


select: compute slack based on relative time
epoll: compute slack based on relative time

and judge the slack conversion on its own merit.

I also would rather not tie this up with the compat deduplication.
Happy to take a stab at that though. On that note, when combining
functions like

  int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
                           fd_set __user *exp, struct timespec64 *end_time,
                           u64 slack)


  static int compat_core_sys_select(int n, compat_ulong_t __user *inp,
        compat_ulong_t __user *outp, compat_ulong_t __user *exp,
        struct timespec64 *end_time, u64 slack)

by branching on in_compat_syscall() inside get_fd_set/set_fd_set and
deprecating their compat_.. counterparts, what would the argument
pointers look like? Or is that not the approach you have in mind?

Powered by blists - more mailing lists