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:   Tue, 30 Jul 2019 09:11:49 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     "zhangyi (F)" <yi.zhang@...wei.com>
Cc:     linux-aio <linux-aio@...ck.org>,
        Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Benjamin LaHaise <bcrl@...ck.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Jeff Moyer <jmoyer@...hat.com>,
        Deepa Dinamani <deepa.kernel@...il.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: Re: [PATCH v2] aio: add timeout validity check for io_[p]getevents

On Tue, Jul 30, 2019 at 3:46 AM zhangyi (F) <yi.zhang@...wei.com> wrote:

>  {
> -       ktime_t until = ts ? timespec64_to_ktime(*ts) : KTIME_MAX;
> -       struct kioctx *ioctx = lookup_ioctx(ctx_id);
> +       ktime_t until = KTIME_MAX;
> +       struct kioctx *ioctx = NULL;
>         long ret = -EINVAL;
>
> +       if (ts) {
> +               if (!timespec64_valid(ts))
> +                       return ret;
> +               until = timespec64_to_ktime(*ts);
> +       }

The man page should probably get updated as well to reflect that this
will now return -EINVAL for a negative timeout or malformed
nanoseconds.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ