Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp627231ybg; Tue, 28 Jul 2020 14:44:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5AKxc7haJfVTgqmBePs1uVJROl6gdVQrL20dhwgD7XlxxBPkJdyPNIC4XhWUZs5GyFupx X-Received: by 2002:aa7:c545:: with SMTP id s5mr27561001edr.19.1595972659532; Tue, 28 Jul 2020 14:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595972659; cv=none; d=google.com; s=arc-20160816; b=N7HMIyjeV0TBY7A3l5WXMJnbkdaa9mAp79OZ0vhWFpqOaCVGeYu0jAdmeL3UHyIy4W faadyUUxbpXYaccg+U7/fMtwPr5IToO+zevMajVIgA7k/Ta5f2VqgJ+3d6EpiS0Vw+ty rf1xVcDwsf9ZLFhNUazCclLQrFKB1YWI2HpGoo5zsYeBl4W1aIaxoJhYupT4xhYKvbQD o3zuHTb3M0m7KiPRsPj5JnB1Kaw3drQuVtSFCcmUc4t6zMbHWfP46DRSyPNkEahb3go7 jkCHvtB+fHwIQogau+DCfqwAMQRq7lgJklKsB6RkLq/LfOpQJtsNlRpGQSAA7PlsR2qU 6tLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=K+9ObEz/GN0rJerJ+Yviocj9jnDMmp4J+aC2o3D+4WE=; b=r37VVcvgzgHArSstva2mOJQP/JdsLLyL4I+EVTPDLrnMZ+1/DyVn8FhXvncitfKN0a 7PruR7DESLZD5Ar//mC6tbqlf7CNo/iL2ib9bXgy+84LzFvhlKtoFznWEPbY3KcqWHz3 r/TTjP9b0XFCFu1iJmWG96dTG1QjdRFtSF43YRPyPTWFBfxdl34pRnZFL91jBte3b5/l DMaJonvqu5V7mNhGoyEQSRqOLlpedh5iAxyWb/pMCjTq4tl9zS2+Ed0p7CAmlLiJeqE6 Gqz5b6wYhiYjLEmkOh8I0wl8tl0j3Ej0RQ/HUciAiYlZHT0KMJpPCaRvZi1Uj9ivAHHD IQuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si7647346ejr.721.2020.07.28.14.43.56; Tue, 28 Jul 2020 14:44:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729491AbgG1Vlo (ORCPT + 99 others); Tue, 28 Jul 2020 17:41:44 -0400 Received: from mga11.intel.com ([192.55.52.93]:14223 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729169AbgG1Vlo (ORCPT ); Tue, 28 Jul 2020 17:41:44 -0400 IronPort-SDR: UCQwPBO/6AHfF05V73ReJtrDGIb2ZK1asmUr8DmD8/etRg7xNaYQYZzj4K2cYvNUiRxEVdm8LK rOcDStFtbj3Q== X-IronPort-AV: E=McAfee;i="6000,8403,9696"; a="149171233" X-IronPort-AV: E=Sophos;i="5.75,407,1589266800"; d="scan'208";a="149171233" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2020 14:41:43 -0700 IronPort-SDR: Wc1QHnhPXg8oYrSvCwBZZPpcuuYFGs2lNOilOAMyc93z6v5vlP6bP/F5T3f3kSxgTa+SuZ8o6V E1uKEbJ26vbA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,407,1589266800"; d="scan'208";a="286301610" Received: from twinkler-lnx.jer.intel.com ([10.12.91.138]) by orsmga003.jf.intel.com with ESMTP; 28 Jul 2020 14:41:41 -0700 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Tomas Winkler , "Gustavo A . R . Silva" Subject: [char-misc-next] Revert "mei: hdcp: Replace one-element array with flexible-array member" Date: Wed, 29 Jul 2020 00:41:39 +0300 Message-Id: <20200728214139.3129532-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Tomas Winkler --- 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