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]
Message-ID: <lu2haon4sj3kvge6cowqgratgnoxg26kiwrjyjdgh7pt5v2hwi@v3xulffewwy6>
Date: Wed, 8 Jan 2025 12:43:21 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Hermes.wu@....com.tw
Cc: Andrzej Hajda <andrzej.hajda@...el.com>, 
	Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>, 
	Laurent Pinchart <Laurent.pinchart@...asonboard.com>, Jonas Karlman <jonas@...boo.se>, 
	Jernej Skrabec <jernej.skrabec@...il.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
	Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, 
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	Pet.Weng@....com.tw, Kenneth.Hung@....com.tw, treapking@...omium.org
Subject: Re: [PATCH] drm/bridge: it6505: fix HDCP V match check is not
 performed correctly

On Wed, Jan 08, 2025 at 01:45:14PM +0800, Hermes Wu via B4 Relay wrote:
> From: Hermes Wu <Hermes.wu@....com.tw>
> 
> The loop of V compare is expected to iterate for 5 times
> which compare V array form av[0][] to av[4][].
> It should check loop counter reach the last statement before return true
> 
> Fixes: 0989c02c7a5c ("drm/bridge: it6505: fix HDCP CTS compare V matching")
> 
> Signed-off-by: Hermes Wu <Hermes.wu@....com.tw>

No empty lines between tags, please.

> ---
>  drivers/gpu/drm/bridge/ite-it6505.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> index 88ef76a37fe6accacdd343839ff2569b31b18ceb..e87247aea1d2ffbdad192e241056d34fdfb32163 100644
> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> @@ -2254,9 +2254,12 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
>  			if (bv[i][3] != av[i][0] || bv[i][2] != av[i][1] ||
>  			    av[i][1] != av[i][2] || bv[i][0] != av[i][3])
>  				break;
> -
> -			DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i);
> -			return true;
> +			if (i == 4) {

I think there was a similar patch yesteday.
Anyway, I have exactly the same feedback: please pull this out of the
loop, this is how it's usually checked / done.

> +				DRM_DEV_DEBUG_DRIVER(dev,
> +						     "V' all match!! %d",
> +						     retry);
> +				return true;
> +			}
>  		}
>  	}
>  
> 
> ---
> base-commit: 938fbb16aba8f7b88e0fdcf56f315a5bbad41aad
> change-id: 20250107-fix-hdcp-v-comp-3ba8e3d7adf3
> 
> Best regards,
> -- 
> Hermes Wu <Hermes.wu@....com.tw>
> 
> 

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ