public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [char-misc-next] Revert "mei: hdcp: Replace one-element array with flexible-array member"
@ 2020-07-28 21:41 Tomas Winkler
  2020-07-28 21:56 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 13+ messages in thread
From: Tomas Winkler @ 2020-07-28 21:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Alexander Usyskin, linux-kernel, Tomas Winkler,
	Gustavo A . R . Silva

Greg please revert, this commit it changes size of
struct wired_cmd_repeater_auth_stream_req_in, this is
not what firmware is expecting.
I really do not appreciate that the code is bypassing
driver maintaner review, I think this is a minimum
we can ask for, this is not for a first time.

This reverts commit c56967d674e361ebe716e66992e3c5332b25ac1f.

Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/hdcp/mei_hdcp.c | 2 +-
 drivers/misc/mei/hdcp/mei_hdcp.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c
index d1d3e025ca0e..e6c3dc595617 100644
--- a/drivers/misc/mei/hdcp/mei_hdcp.c
+++ b/drivers/misc/mei/hdcp/mei_hdcp.c
@@ -572,7 +572,7 @@ static int mei_hdcp_verify_mprime(struct device *dev,
 	       HDCP_2_2_MPRIME_LEN);
 	drm_hdcp_cpu_to_be24(verify_mprime_in.seq_num_m, data->seq_num_m);
 	memcpy(verify_mprime_in.streams, data->streams,
-	       array_size(data->k, sizeof(*data->streams)));
+	       (data->k * sizeof(struct hdcp2_streamid_type)));
 
 	verify_mprime_in.k = cpu_to_be16(data->k);
 
diff --git a/drivers/misc/mei/hdcp/mei_hdcp.h b/drivers/misc/mei/hdcp/mei_hdcp.h
index 834757f5e072..18ffc773fa18 100644
--- a/drivers/misc/mei/hdcp/mei_hdcp.h
+++ b/drivers/misc/mei/hdcp/mei_hdcp.h
@@ -358,7 +358,7 @@ struct wired_cmd_repeater_auth_stream_req_in {
 	u8				seq_num_m[HDCP_2_2_SEQ_NUM_LEN];
 	u8				m_prime[HDCP_2_2_MPRIME_LEN];
 	__be16				k;
-	struct hdcp2_streamid_type	streams[];
+	struct hdcp2_streamid_type	streams[1];
 } __packed;
 
 struct wired_cmd_repeater_auth_stream_req_out {
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-07-29  3:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-28 21:41 [char-misc-next] Revert "mei: hdcp: Replace one-element array with flexible-array member" Tomas Winkler
2020-07-28 21:56 ` Gustavo A. R. Silva
2020-07-28 22:01   ` Winkler, Tomas
2020-07-28 22:14     ` Gustavo A. R. Silva
2020-07-28 22:14       ` Winkler, Tomas
2020-07-28 22:29         ` Winkler, Tomas
2020-07-28 23:04           ` Gustavo A. R. Silva
2020-07-28 23:07             ` Winkler, Tomas
2020-07-28 23:16             ` Gustavo A. R. Silva
2020-07-29  3:57               ` Gustavo A. R. Silva
2020-07-28 23:06         ` Joe Perches
2020-07-28 23:08           ` Winkler, Tomas
2020-07-28 22:17       ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox