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:   Thu, 17 Jun 2021 10:46:36 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Hans Verkuil <hverkuil-cisco@...all.nl>
Cc:     Sergey Senozhatsky <senozhatsky@...omium.org>,
        Tomasz Figa <tfiga@...omium.org>,
        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
Subject: Re: [PATCHv2 7/8] videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT
 flag

On (21/06/03 13:32), Hans Verkuil wrote:
[..]
> > +static void validate_memory_flags(struct vb2_queue *q,
> > +				  int memory,
> > +				  u32 *flags)
> > +{
> > +	if (!q->allow_cache_hints || memory != V4L2_MEMORY_MMAP) {
> > +		/*
> > +		 * This needs to clear V4L2_MEMORY_FLAG_NON_COHERENT only,
> > +		 * but in order to avoid bugs we zero out all bits.
> > +		 */
> > +		*flags = 0;
> 
> Wouldn't it make sense to add:
> 
> 	} else {
> 		*flags &= ~V4L2_MEMORY_FLAG_NON_COHERENT;
> 
> I.e., clear all unknown flags.

Done.

[..]
> > @@ -2003,9 +2003,6 @@ static int v4l_reqbufs(const struct v4l2_ioctl_ops *ops,
> >  
> >  	if (ret)
> >  		return ret;
> > -
> > -	CLEAR_AFTER_FIELD(p, capabilities);
> 
> Shouldn't this be:
> 
> 	CLEAR_AFTER_FIELD(p, flags);
> 
> You still need to zero the reserved array, after all.

Done.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ