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:44:33 +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:     Hans Verkuil <hverkuil-cisco@...all.nl>
Subject: Re: [PATCH 8/9] media: vicodec: 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: Hans Verkuil <hverkuil-cisco@...all.nl>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>

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


> ---
>  drivers/media/test-drivers/vicodec/vicodec-core.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c
> index 025f3ff77302..33f1c893c1b6 100644
> --- a/drivers/media/test-drivers/vicodec/vicodec-core.c
> +++ b/drivers/media/test-drivers/vicodec/vicodec-core.c
> @@ -811,9 +811,6 @@ static int vidioc_g_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f)
>  		pix_mp->xfer_func = ctx->state.xfer_func;
>  		pix_mp->ycbcr_enc = ctx->state.ycbcr_enc;
>  		pix_mp->quantization = ctx->state.quantization;
> -		memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved));
> -		memset(pix_mp->plane_fmt[0].reserved, 0,
> -		       sizeof(pix_mp->plane_fmt[0].reserved));
>  		break;
>  	default:
>  		return -EINVAL;
> @@ -886,8 +883,6 @@ static int vidioc_try_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f)
>  			info->sizeimage_mult / info->sizeimage_div;
>  		if (pix_mp->pixelformat == V4L2_PIX_FMT_FWHT)
>  			plane->sizeimage += sizeof(struct fwht_cframe_hdr);
> -		memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved));
> -		memset(plane->reserved, 0, sizeof(plane->reserved));
>  		break;
>  	default:
>  		return -EINVAL;
> 

Powered by blists - more mailing lists