Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4990366rwb; Mon, 31 Jul 2023 16:13:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlH7iXAiyLkfY+A0+mtYuNXSrPbFL5MCv0Q9LV9bB290MQf7z9KVVSiVkKP2sQa+p9kXszs3 X-Received: by 2002:a17:903:22c8:b0:1bb:b91b:2b40 with SMTP id y8-20020a17090322c800b001bbb91b2b40mr13305754plg.60.1690845227959; Mon, 31 Jul 2023 16:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690845227; cv=none; d=google.com; s=arc-20160816; b=fNhaeYAHhj1rKlmku+0/kZHbKirz5YEaEaUtsiVElaPUjFTf+RPlGWZyR+3VN7q4ka X5+s0utNZvZQnjH3F732HHyaeB0IvMmiBFdQ2k7cReGYp3vrclK6EVUCOKj7H2NAiojf TYfEIO+55d7IymuWJDXeZe5/hpwVjTCwDnQxnEoMUupEtLiguGCih5itDiO9ylvamxH9 bSjAGV3/BkzTF3UahW1f7dlswDg2VdDIHU82ivAF0moIKWVI38Lop/K4xlbx6z1zSLSN fUGh9D2T41h81o9zATLNNQvIkqmg82BKoLeGHcv5D2C9kzgD3cY+1+GmpZE69Gd5dy9F rTUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Up7tl0qt0HQUQxtc3m8aLw88GzHGZyI41BmbxGn0+Rg=; fh=1UHFMP966dJVj/YbTgkKqUiyBK1XvUsPQDpHVV2dnDo=; b=XWcstxmXz8myWMpvkwkr5Nb7OdO3M3SZUZLlqnBHCLRI5COw1dsgeuQOR4katRdajs 0ZXYlVVXZr+9QNnPD/+1Owp0NKRn4CtxqE88xDu7D/M0H5lVYb62bZoJcCVca6U/W/pu 6Zo/IFFB/k4iUzxQPmcV26V5Uq+zXkMokNznEW6KLiZwv6ixXH4N6oIp76AzxtRT2Aaj pi1s1Dj9pBQiRyqgkPtij7vF3kNhsBpsOFtOSRfFp1Oxf4QvmcWl/x9mEqGT9l/+PJ++ 1hb+YV/V5ujqg7mympChQitKV/PHwRdoVm6O7UgrEFlhHPaxqugL9IdL6ogtbAp8Nl3R 26hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cmRZWd4T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020a170902c1d400b001b041591a5fsi7982669plc.459.2023.07.31.16.13.36; Mon, 31 Jul 2023 16:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cmRZWd4T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231328AbjGaVbS (ORCPT + 99 others); Mon, 31 Jul 2023 17:31:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231386AbjGaVaq (ORCPT ); Mon, 31 Jul 2023 17:30:46 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5820319A4; Mon, 31 Jul 2023 14:30:18 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36VLTKU1015630; Mon, 31 Jul 2023 21:30:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=Up7tl0qt0HQUQxtc3m8aLw88GzHGZyI41BmbxGn0+Rg=; b=cmRZWd4Tbdo17n3fEThbWNC6DPhf/oiVdrmw2DVE9HK0jIMYNOuTxzvy649wwkCKQ1j7 G9vkKTCuC0gYD3eypgC7nod/BxnxdbeW2odp1qYuI26AtBznXmrS8+PDaXV/ppofdQ+p uO0ryC66a8xKRWhsOU+14zPsGAba6b6WhroWIlp/E2Ib58UFYpTX0MLOkH6SixXlAk4F ct7ihkaMscpqu1wv+DzcjHzTdofR9Jh/rYV9K0YQw2XaXuVcmVLl05pHT0GZg9REm2W+ UxkVzTREFwgSNLWrHSM44DJ9NVVBChwJDk967m/Hg7E/w7UIPj7CjyN+23KX0TMEum0V Dw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s6fak8qcm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jul 2023 21:30:11 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36VLUAED016647 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jul 2023 21:30:10 GMT Received: from [192.168.142.6] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Mon, 31 Jul 2023 14:30:10 -0700 Message-ID: Date: Mon, 31 Jul 2023 14:29:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] soc: qcom: aoss: Move length requirements from caller Content-Language: en-US To: Bjorn Andersson , Bjorn Andersson , Konrad Dybcio CC: Alex Elder , "David S. Miller" , Jakub Kicinski , Mathieu Poirier , , , , References: <20230731041013.2950307-1-quic_bjorande@quicinc.com> <20230731041013.2950307-2-quic_bjorande@quicinc.com> From: Chris Lew In-Reply-To: <20230731041013.2950307-2-quic_bjorande@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: roTXaohgMY-WI2SQze1t3CVll6O2G3BE X-Proofpoint-GUID: roTXaohgMY-WI2SQze1t3CVll6O2G3BE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-31_15,2023-07-31_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 bulkscore=0 phishscore=0 malwarescore=0 spamscore=0 clxscore=1011 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307310195 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/30/2023 9:10 PM, Bjorn Andersson wrote: > diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c > /* The message RAM only implements 32-bit accesses */ > __iowrite32_copy(qmp->msgram + qmp->offset + sizeof(u32), > - data, len / sizeof(u32)); > - writel(len, qmp->msgram + qmp->offset); > + buf, sizeof(buf) / sizeof(u32)); > + writel(sizeof(buf), qmp->msgram + qmp->offset); > Looks like we are telling the firmware the packet size will always be QMP_MSG_LEN? This should be ok but might be a problem when debugging. The AOSS firmware only logs size of the message instead of the full string because of memory constraints. We would normally match the firmware and host logs based on size, but won't be able to differentiate this way with a fixed size.