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  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, 12 Jan 2021 11:55:45 +0000
From:   Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
To:     Ricardo Ribalda <ribalda@...omium.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Sakari Ailus <sakari.ailus@...ux.intel.com>
Subject: Re: [PATCH 9/9] media: staging/intel-ipu3 : Do not zero reserved
 fields

Hi Ricardo,

On 11/01/2021 14:54, Ricardo Ribalda wrote:
> Core code already clears reserved fields of struct
> v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
> v4l2_plane_pix_format reserved fields").
> 
> Cc: Sakari Ailus <sakari.ailus@...ux.intel.com>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
>  drivers/staging/media/ipu3/ipu3-v4l2.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
> index 4dc8d9165f63..60aa02eb7d2a 100644
> --- a/drivers/staging/media/ipu3/ipu3-v4l2.c
> +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c

The ipu3-css.c also has a memset on the plane formats in the
migu_css_queue_init(), but that's possibly still out of scope for this
patch ('just')

        struct v4l2_pix_format_mplane *const f = &queue->fmt.mpix;
        memset(f->reserved, 0, sizeof(f->reserved));

I can't yet see anything that clears the reserved formats on queue
initialisations, so I don't think we can remove that yet unless I've
missed something anyway.

Seems like there is a lot more that could be cleared in core ...

But - as I said, I think that's out of scope here so

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>

> @@ -773,9 +773,6 @@ static int imgu_try_fmt(struct file *file, void *fh, struct v4l2_format *f)
>  
>  	pixm->pixelformat = fmt->fourcc;
>  
> -	memset(pixm->plane_fmt[0].reserved, 0,
> -	       sizeof(pixm->plane_fmt[0].reserved));
> -
>  	return 0;
>  }
>  
> 

Powered by blists - more mailing lists