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, 26 Jul 2021 13:05:57 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
Cc:     Tomasz Figa <tfiga@...omium.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Ricardo Ribalda <ribalda@...omium.org>,
        Christoph Hellwig <hch@....de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Collabora Kernel ML <kernel@...labora.com>,
        Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCHv3 7/8] videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT
 flag

On (21/07/26 10:40), Sergey Senozhatsky wrote:
> On (21/07/22 19:33), Dafna Hirschfeld wrote:
> [..]
> > >   int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req)
> > >   {
> > >   	int ret = vb2_verify_memory_type(q, req->memory, req->type);
> > > +	u32 flags = req->flags;
> > >   	fill_buf_caps(q, &req->capabilities);
> > > -	return ret ? ret : vb2_core_reqbufs(q, req->memory, 0, &req->count);
> > > +	validate_memory_flags(q, req->memory, &flags);
> > > +	req->flags = flags;
> > 
> > you can do instead
> > 
> > validate_memory_flags(q, req->memory, &req->flags);
> 
> ->flags are u32 for create-bufs and u8 for reqi-bufs. So `*flags = <value>`
> can write to ->reserved[] for req-bufs (if the value is huge enough).

I guess ->flags can become u8 for both create-bufs and req-bufs.
We had ->flags in both structs as u32, but then decided to leave
some reserved[] space in req-bufs and switched to u8 there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ