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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 May 2020 16:05:19 +0200
From:   Tomasz Figa <>
To:     Ezequiel Garcia <>
Cc:     Linux Media Mailing List <>,
        "open list:ARM/Rockchip SoC..." <>,
        Linux Kernel Mailing List <>,, Jonas Karlman <>,
        Heiko Stuebner <>,
        Hans Verkuil <>,
        Alexandre Courbot <>,
        Jeffrey Kardatzke <>,
        Gustavo Padovan <>
Subject: Re: [PATCH v3 1/3] media: rkvdec: Fix .buf_prepare

On Tue, May 5, 2020 at 3:59 PM Ezequiel Garcia <> wrote:
> On Tue, 2020-05-05 at 15:56 +0200, Tomasz Figa wrote:
> > Hi Ezequiel,
> >
> > On Tue, May 5, 2020 at 3:41 PM Ezequiel Garcia <> wrote:
> > > The driver should only set the payload on .buf_prepare
> > > if the buffer is CAPTURE type, or if an OUTPUT buffer
> > > has a zeroed payload.
> >
> > Thanks for the patch. Just one question below.
> >
> > Where does the requirement to set OUTPUT buffer bytesused to sizeimage
> > if the original bytesused is 0 come from?
> >
> If I'm reading english correctly, it's here:
> """
> The number of bytes occupied by the data in the buffer. It depends on the negotiated data format and may change with each buffer for compressed
> variable size data like JPEG images. Drivers must set this field when type refers to a capture stream, applications when it refers to an output
> stream. If the application sets this to 0 for an output stream, then bytesused will be set to the size of the buffer (see the length field of this
> struct) by the driver. For multiplanar formats this field is ignored and the planes pointer is used instead.
> """

Okay, thanks. I wonder if this shouldn't be handled by the core,
though. Especially given that the document refers to the length field
specifically and not the sizeimage set in the format.

Best regards,

Powered by blists - more mailing lists