Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp808808ybg; Tue, 28 Jul 2020 20:52:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXvasmIYVuYvKS4fJ0cxmpcRA7RtFiGgbWhgzyPCwQK+5AZsJITJHQzZf27Jkz3RTe5Bsz X-Received: by 2002:a17:906:6408:: with SMTP id d8mr12857142ejm.345.1595994739063; Tue, 28 Jul 2020 20:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595994739; cv=none; d=google.com; s=arc-20160816; b=sh/cQAG7vyj6FTjLglEyE36pvpPA7Oc3rXcda/HpzBJGbvDNUmltt/GJkyo6Ewixgt btzWqsX4hd+fV+Bh+ltvGjzWWwNj30RWAmFtmQ2/qcIl8JOwg0+nzoT8XOqW6XTmbfTI BmR/a47m4DBSXP1CdyyzyJraTYRtqg69w8keSu7YLKlrOO/hMZe6eQ84iwrI/fIw2w4S slx2WTub3fDb5pXg/KeqjIpIW/DzycuCHMhu55ruy8Uc2/+UEALW0zQdJE4zDV4Djsvc wJM5Lh2hfWzzZJLpxFhhTfec4QqYCC069rvanBmGJ3/gFxgDYP0sQj4O+udsQ2PJqowB SBHA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:references:cc:to:from:dkim-signature; bh=7ussQbKjWAE3jac6ZnQJpyAa/4HACISV3jjrEApZQNc=; b=mgxGLvPUoBGGkwqpYSSiQtURPbeYVHX0uC/W+n5oqrGxLtnmcCQs5eWYb0IJxnfxzl 2EhRbKjHq2RBWbLaNzAYEjn/SJo550bif4ovQJFiKkT5AoL9czVhKOkJnjDAsEalgp/Z Wx0zmi8PDheW5HggBOLE1Ajdrl8eCl0arjeOg7thBK7FQxxKW7NqQ0r0STUjaXZBk881 1v88Us4gcG74cebRO+T2yl0daVECgIivgq6L8mFM0owhSaXkponvJRAaVzVfPol4CTMW NVa73N6Vez4UOIO37lNsmj6WBsGn8yOaLmnuZQlaSYfAHA5LlOt2uXOEPx7BGgwjK+Hl nFnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@embeddedor.com header.s=default header.b=EJg6hTGc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si644764edv.191.2020.07.28.20.51.56; Tue, 28 Jul 2020 20:52: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; dkim=fail header.i=@embeddedor.com header.s=default header.b=EJg6hTGc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726548AbgG2Dvt (ORCPT + 99 others); Tue, 28 Jul 2020 23:51:49 -0400 Received: from gateway24.websitewelcome.com ([192.185.50.93]:41307 "EHLO gateway24.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbgG2Dvt (ORCPT ); Tue, 28 Jul 2020 23:51:49 -0400 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 6418B2ECD3 for ; Tue, 28 Jul 2020 22:51:45 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id 0d85kjmoeBb5d0d85kONgS; Tue, 28 Jul 2020 22:51:45 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:Subject:References:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7ussQbKjWAE3jac6ZnQJpyAa/4HACISV3jjrEApZQNc=; b=EJg6hTGcxZwCALGc1STXI5/FWa QMqnEcqWY0dcpRzT6v0HrZwdBdZXOJf7SJYL6kJSuHjP1+I92u6LAm1CbQ259AziBlGSDfkndjQUB o5y6URa7u8FpfjBJHBGNn9pTLem+J+hFyGA7a+T+MGnPEWVWSjrglxrzvKqGeS1Q3R0T7E2U5+KC/ p3cRiBgf42I7eFmNTOA9P50YX2lkUIIQQPjLo+ul9BllczS9+QDvHhyidqY2pxOCRN5CH6YupwCQ5 TzwYkThiIDylyTmUxuxq48aaVe82Ah2UpQ5XMnq4/kSs+SlwAtVVjjqa2EgAJjqbTcSPvbDSd7Wf9 8C4MmxzQ==; Received: from 187-162-31-110.static.axtel.net ([187.162.31.110]:35894 helo=[192.168.15.2]) by gator4166.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1k0d85-003qkV-1R; Tue, 28 Jul 2020 22:51:45 -0500 From: "Gustavo A. R. Silva" To: "Winkler, Tomas" , Greg Kroah-Hartman Cc: "Usyskin, Alexander" , "linux-kernel@vger.kernel.org" , "Gustavo A . R . Silva" References: <20200728214139.3129532-1-tomas.winkler@intel.com> <8ec7601780b542c2bc0168e03749ec0e@intel.com> <398e20e8c3f7436bb50d671b9aa9f809@intel.com> <6736aefa05e84b30bcc91003b55c7644@intel.com> Autocrypt: addr=gustavo@embeddedor.com; keydata= xsFNBFssHAwBEADIy3ZoPq3z5UpsUknd2v+IQud4TMJnJLTeXgTf4biSDSrXn73JQgsISBwG 2Pm4wnOyEgYUyJd5tRWcIbsURAgei918mck3tugT7AQi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pbizWdLNz2hc907DvoPm6HEGCanpcAEQEAAcLBZQQY AQgADwUCWywcDAIbDAUJCWYBgAAKCRBHBbTLRwbbMdsZEACUjmsJx2CAY+QSUMebQRFjKavw XB/xE7fTt2ahuhHT8qQ/lWuRQedg4baInw9nhoPE+VenOzhGeGlsJ0Ys52sdXvUjUocKgUQq 6ekOHbcw919nO5L9J2ejMf/VC/quN3r3xijgRtmuuwZjmmi8ct24TpGeoBK4WrZGh/1hAYw4 ieARvKvgjXRstcEqM5thUNkOOIheud/VpY+48QcccPKbngy//zNJWKbRbeVnimua0OpqRXhC rEVm/xomeOvl1WK1BVO7z8DjSdEBGzbV76sPDJb/fw+y+VWrkEiddD/9CSfgfBNOb1p1jVnT 2mFgGneIWbU0zdDGhleI9UoQTr0e0b/7TU+Jo6TqwosP9nbk5hXw6uR5k5PF8ieyHVq3qatJ 9K1jPkBr8YWtI5uNwJJjTKIA1jHlj8McROroxMdI6qZ/wZ1ImuylpJuJwCDCORYf5kW61fcr HEDlIvGc371OOvw6ejF8ksX5+L2zwh43l/pKkSVGFpxtMV6d6J3eqwTafL86YJWH93PN+ZUh 6i6Rd2U/i8jH5WvzR57UeWxE4P8bQc0hNGrUsHQH6bpHV2lbuhDdqo+cM9ehGZEO3+gCDFmK rjspZjkJbB5Gadzvts5fcWGOXEvuT8uQSvl+vEL0g6vczsyPBtqoBLa9SNrSVtSixD1uOgyt AP7RWS474w== Subject: Re: [char-misc-next] Revert "mei: hdcp: Replace one-element array with flexible-array member" Message-ID: Date: Tue, 28 Jul 2020 22:57:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 187.162.31.110 X-Source-L: No X-Exim-ID: 1k0d85-003qkV-1R X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 187-162-31-110.static.axtel.net ([192.168.15.2]) [187.162.31.110]:35894 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 4 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/28/20 18:16, Gustavo A. R. Silva wrote: > > > On 7/28/20 18:04, Gustavo A. R. Silva wrote: >> Tomas, >> >> Please, see some comments below... >> >> On 7/28/20 17:29, Winkler, Tomas wrote: >>>>>>> >>>>>>> Hi Tomas, >>>>>>> >>>>>>> On 7/28/20 16:41, Tomas Winkler wrote: >>>>>>>> Greg please revert, this commit it changes size of struct >>>>>>>> wired_cmd_repeater_auth_stream_req_in, this is not what firmware >>>>>>>> is expecting. >>>>>>> Instead of reverting that commit, I think this patch should be applied to fix it, if Tomas consider this is the appropiate solution: diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c index d1d3e025ca0e..852374565cba 100644 --- a/drivers/misc/mei/hdcp/mei_hdcp.c +++ b/drivers/misc/mei/hdcp/mei_hdcp.c @@ -572,12 +572,12 @@ 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))); + flex_array_size(&verify_mprime_in, streams, data->k)); verify_mprime_in.k = cpu_to_be16(data->k); byte = mei_cldev_send(cldev, (u8 *)&verify_mprime_in, - sizeof(verify_mprime_in)); + struct_size(&verify_mprime_in, streams, data->k)); if (byte < 0) { dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte); return byte; I'll write up a proper patch after getting some feedback. Thanks -- Gustavo >>>>>>> Could you elaborate on what's the firmware expecting, exactly? >>>>>> struct wired_cmd_repeater_auth_stream_req_in { >>>>>> - struct hdcp2_streamid_type streams[1]; >>>>>> + struct hdcp2_streamid_type streams[]; >>>>>> } >>>>>> >>>>>> But then you have, which you haven't changed to + 1 byte = >>>>>> mei_cldev_send(cldev, (u8 *)&verify_mprime_in, >>>>>> sizeof(verify_mprime_in)); >>>>>> >> >> I don't think the fix for this is to add 1 byte, if any, it seems >> to be sizeof(*data->streams), or sizeof(struct hdcp2_streamid_type) >> what needs to be added. >> >> But it might be better to code something like this, instead: >> >> diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c >> index e6c3dc595617..7fe63c915548 100644 >> --- a/drivers/misc/mei/hdcp/mei_hdcp.c >> +++ b/drivers/misc/mei/hdcp/mei_hdcp.c >> @@ -572,12 +572,12 @@ 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, >> - (data->k * sizeof(struct hdcp2_streamid_type))); >> + (data->k * sizeof(*data->streams))); >> >> verify_mprime_in.k = cpu_to_be16(data->k); >> >> byte = mei_cldev_send(cldev, (u8 *)&verify_mprime_in, >> - sizeof(verify_mprime_in)); >> + struct_size(&verify_mprime_in, streams, data->k)); >> if (byte < 0) { >> dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte); >> return byte; >> >> struct_size(&verify_mprime_in, streams, data->k) will give us the size, in bytes, >> of struct wired_cmd_repeater_auth_stream_req_in plus the size in bytes for >> the streams[] flexible-array, which is determined by struct hdcp2_streamid_type and >> data->k. >> >> What do you think? >> > > This is even better: > > diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c > index e6c3dc595617..852374565cba 100644 > --- a/drivers/misc/mei/hdcp/mei_hdcp.c > +++ b/drivers/misc/mei/hdcp/mei_hdcp.c > @@ -572,12 +572,12 @@ 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, > - (data->k * sizeof(struct hdcp2_streamid_type))); > + flex_array_size(&verify_mprime_in, streams, data->k)); > > verify_mprime_in.k = cpu_to_be16(data->k); > > byte = mei_cldev_send(cldev, (u8 *)&verify_mprime_in, > - sizeof(verify_mprime_in)); > + struct_size(&verify_mprime_in, streams, data->k)); > if (byte < 0) { > dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte); > return byte; > > the flex_array_size() is a new helper that was designed for this situations. :) > It calculates the size of a flexible array member within an enclosing structure, > which is exactly the case. > > Thanks > -- > Gustavo > >> See more comments below... >> >>>>> >>>>> I see, this is the kind of feedback I need from people that knows the >>>>> code better. Thanks! >>>>> >>>>>> But that's not the major point. Point is that we should be able to >>>>>> review and test the code before it is merged. You haven't run it, right? >>>>>> There is MAINTAINERS file for a reason. >>>>>> >>>>> >>>>> I'm using this command: >>>>> >>>>> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback >>>>> >>>>> and this is the output for both files: >>>>> >>>>> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback >>>>> drivers/misc/mei/hdcp/mei_hdcp.c Arnd Bergmann >>>>> (supporter:CHAR and MISC DRIVERS) Greg Kroah-Hartman >>>>> (supporter:CHAR and MISC DRIVERS) linux- >>>>> kernel@vger.kernel.org (open list) $ scripts/get_maintainer.pl >>>>> --nokeywords -- nogit --nogit-fallback >>>>> drivers/misc/mei/hdcp/mei_hdcp.h Arnd Bergmann >>>>> (supporter:CHAR and MISC DRIVERS) Greg Kroah-Hartman >>>>> (supporter:CHAR and MISC DRIVERS) linux- >>>>> kernel@vger.kernel.org (open list) >>>> >>>> >>>>> For some reason you don't appear on the list above. Do you see >>>>> anything wrong with the command I'm running to get the maintainers and >>>> lists? >>>> >>>> Not sure, it should be caught by drivers/misc/mei/* ? >>>> Maybe it is not recursive? Need to check the script, frankly I usually check this >>>> manually. >>>> >>>> INTEL MANAGEMENT ENGINE (mei) >>>> M: Tomas Winkler >>>> L: linux-kernel@vger.kernel.org >>>> S: Supported >>>> F: Documentation/driver-api/mei/* >>>> F: drivers/misc/mei/* >>>> F: drivers/watchdog/mei_wdt.c >>>> F: include/linux/mei_cl_bus.h >>>> F: include/uapi/linux/mei.h >>>> F: samples/mei/* >>>> >>> >>> It's not recursive, when I add drivers/misc/mei/hdcp/* . It works correctly >>> I will post a patch. >>> >> >> Great. I'm glad we got to the root cause of this issue. :) >> >> Thanks >> -- >> Gustavo >> >>> Thanks >>> Tomas >>> >>> >>>> >>>>> >>>>> Thanks >>>>> -- >>>>> Gustavo >>>>> >>>>>>> >>>>>>>> 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 { >>>>>>>>