From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Hermes Wu <hermes.wu@ite.com.tw>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: re: drm/bridge: it6505: fix HDCP CTS compare V matching
Date: Tue, 7 Jan 2025 09:31:23 +0000 [thread overview]
Message-ID: <22e6bda9-bb5b-43a2-b256-64ff789bbf69@gmail.com> (raw)
Hi,
static analysis on Linux-next has found a potential issue with the
following commit:
commit 0989c02c7a5c887c70deafen80c64d0291624e1a7
Author: Hermes Wu <hermes.wu@ite.com.tw>
Date: Mon Dec 30 18:51:26 2024 +0800
drm/bridge: it6505: fix HDCP CTS compare V matching
The issue is as follows:
Source: drivers/gpu/drm/bridge/ite-it6505.c, function:
it6505_hdcp_part2_ksvlist_check:
for (i = 0; i < 5; i++) {
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;
}
in the above for-loop, only iteration with i = 0 is performed, either
the if statement breaks out of the loop if the condition is true or
we reach the return true statement. Both conditions means the loop is
never iterated, yet the loop is expected to iterate for 5 times. This
looks incorrect.
Colin
next reply other threads:[~2025-01-07 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 9:31 Colin King (gmail) [this message]
2025-01-07 9:45 ` Hermes.Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22e6bda9-bb5b-43a2-b256-64ff789bbf69@gmail.com \
--to=colin.i.king@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hermes.wu@ite.com.tw \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®