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: <CACycT3vO53+GGZ+Lw2_ervZFk-J647gmGb+G6DFL6mpfk4+gbQ@mail.gmail.com>
Date:   Mon, 17 May 2021 17:41:31 +0800
From:   Yongji Xie <xieyongji@...edance.com>
To:     Johannes Berg <johannes@...solutions.net>
Cc:     "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Stefan Hajnoczi <stefanha@...hat.com>, amit@...nel.org,
        arei.gonglei@...wei.com, airlied@...ux.ie, kraxel@...hat.com,
        dan.j.williams@...el.com, Ohad Ben Cohen <ohad@...ery.com>,
        bjorn.andersson@...aro.org, david@...hat.com, vgoyal@...hat.com,
        miklos@...redi.hu, Stefano Garzarella <sgarzare@...hat.com>,
        virtualization <virtualization@...ts.linux-foundation.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: Re: [RFC PATCH 01/17] virtio_ring: Avoid reading unneeded used length

On Mon, May 17, 2021 at 5:12 PM Johannes Berg <johannes@...solutions.net> wrote:
>
> On Mon, 2021-05-17 at 17:08 +0800, Xie Yongji wrote:
> > If device driver doesn't need used length, it can pass a NULL
> > len in virtqueue_get_buf()/virtqueue_get_buf_ctx().
> >
>
> Well, actually, it can't right now?
>

Yes.

> You should probably rephrase this, saying something like
>
>    Allow passing NULL to len in ... if the device driver doesn't need
>    the length, and don't read it in that case.
>
> or so?
>

Looks good to me.

> >  Then
> > we can avoid reading and validating the len value in used
> > ring entries.
>
> Not sure what that "validating" is about, I only see reading?
>

The “validating" is actually done in the last patch of this series.
Will remove it.

Thanks,
Yongji

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ