From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B763E37B3EF for ; Fri, 27 Feb 2026 23:41:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772235694; cv=none; b=G1t8P3tDiirEjt0Hd6cm2q/SwmqWS8WVYk6BJHfHWGNHxnUFthVszTM+F4kfmlUn+Sa3k9YeXLx88zpS/pbewSgach1nifafeM+yKiuwB0Q9cUCINwNpCx12KaeU3NHdcM3clxcXAATHOGLAJ2Y2nuvwoipg8h9M8nx8SDqFK8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772235694; c=relaxed/simple; bh=6QvB7huYMux0VK3w60OaJPQ7kp21zCIfWmT+zsHmKVI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DKuRY8EOTn9U+o6OY79opWe2H5nwyqhiHM06lgRNKDYObsIeG+RG+/btlQ3DO5BnzUdhImbBNTNvNvmcSQyFjimblQYqm57WbWldmLcxqVnPuE3oZcLpKYmhDO8XC0pIkc8FcH1Nifx1y06DnCDziqFIm4nMkvmqVasEX5kImqY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=k2MAv5XU; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=AsUpYmtx; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="k2MAv5XU"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AsUpYmtx" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61RLRtI11104552 for ; Fri, 27 Feb 2026 23:41:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=b4RPVfEauVulPNQw2T/2xBrD ug+mzawESETX0L19vj0=; b=k2MAv5XU9/IyucUK2fIrUwROIS0Q0U70c4PayRyx d4TK+qUjx3MxyNNleQrDQ7ZsTcQ3dxiuy5J8SLoHFRz/gcGRhbquLpW8P3wZisbW s4DHz/5VJvXmcId00Vea4I1hoQJ1x57YP7pCCoilGuG4yOLKyAGnYJ+VGcI2+FQV IHmBjWq7RyvspaO7PcV80saLhBs2O6xYczPO2b+sM0XoOCXeurdt+73COjdmEgiV kfnRLYtMy51QBgX+kM20S7qWkj89SXVfBdxWE1cxpDRCkUIHpNPqtLkqDaLsUjuN KgH971N0TFi8ylHLofX82qPepJFvnfgbOjQZvaUP7MyN8w== Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ckk3frabh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 27 Feb 2026 23:41:26 +0000 (GMT) Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-7d4c7afa9e0so42465249a34.0 for ; Fri, 27 Feb 2026 15:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772235686; x=1772840486; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=b4RPVfEauVulPNQw2T/2xBrDug+mzawESETX0L19vj0=; b=AsUpYmtxvRWuJV/crLvY3fPnZ+1aY68fgXTWqdhcWh9lkGtof6po71QIP1a10ciVGN cUtOHFE0dDtY/5x9/crdFR1Ja7RzPyastYU9vLLB9M8WT5H7m9PbCibyd4n9osRiltlN YQtMBDN9MaQ7/WO13sGLgz0YnwrDtOchw+RHLPzsMX3Z5kgUMPjFn0El4TTguaSvLIkV 4X7oBuWAcIcIZjTKTppFzGP/KAZ51MhVxAySvnU5SxAwCoUM/mCe4LK3Px0FCD5dIyoT vk2NI2KdFv07YyQRAaoALnm1Xh49aclIpUwAbQGYAbwUgcipH/wg966EyY/p6MZl8qQD IRLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772235686; x=1772840486; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b4RPVfEauVulPNQw2T/2xBrDug+mzawESETX0L19vj0=; b=XDVBnNPWijQiKKedcKLJi85dssMkwV/gbdGBv6VxffLPiwKVe3rX4yecxOERzovMW1 mhUS2U8luRKiKVEe7aOyQA76q/JWxvShiNbYOSnATkNBL6ZjjsTqSkjiL1SesMRJnGCV cEI50+FpMnD1D3u/JfWEoPHFfhHr9RjbP+3acDV3BgdM6/ze8JMIqqZnPdjJoMN9ibRi NLFA3er+sP8R6jtSysmxNwwy+6OwoJ+mboqApV9g391EQwlERRVq8+ltSSEryCWIAWCm znTsub/NVHiCseRBTsObgc2B5NssXBnUZEQ/jYmOd8nNnKySzQaLcixqGP93tWD1t/ab +URg== X-Forwarded-Encrypted: i=1; AJvYcCXhEKdrjflw4hhDw8D4vVPdr0lnCJXukezGREUO2auGN3u3aAv8mZAnr0d/OpSerQYY509uig2Tgg2QW5E=@vger.kernel.org X-Gm-Message-State: AOJu0YxSXWiVEMKO+BeAzA+0mVPXFXVC0GbX3VandVj+0OJWo3x/9w1m SOx18viCJJqXNuwHQ8QHkRL8GmaOecd2Dl64j4Uqes6TgW8NOXmygCEQR6qV21pLlORbZlD6p2X nGCb2Dk0IjYapK1JLH5hBh9blNxdWjSgVGVetoVQX+ZVltKFWGUwUOzpcI2+H//X0Sho= X-Gm-Gg: ATEYQzyfT5xoN4lIU6nqiayFRdTpH8Q1mizpEUShKRf9Y28a+stS9lRF8//1LsYjho9 67IwwV6X2u2BszRl/jkAN9cGKfd6veUL7S9/WSYh8LSnTb4DJbdxEobzYoaoB58AjtpPGf5UvdF /08K/7HtwVXoc0bxBDZ412Oi3MowLJ3pjCe5tOzxkUT3EfAbr8KhUHB/HIbhoJVI8dHvm0qaXEF GZ1XXxsAB3nsuHmM4CjNoNV+MQebPUnReiWepstGAK161WtC0JAiRrdIsb+cPIGhlJeNnGy+YW1 /JMobFdc+nHsQLsNbXNaVHou8im5B3+XmJKDUunYKfyu02CFJqKxbl4RMt7tTsncSv0ChGzWJoT c/LSouQv1FLE8iNZ4sDqL6fOWi0YqrOxrnotWl5iH0kpUEjg25UBuoL3XDsoKAWWAXAWr2dpnA9 Y= X-Received: by 2002:a05:6808:1391:b0:462:aa0f:4375 with SMTP id 5614622812f47-464beb40bfamr2716103b6e.39.1772235685775; Fri, 27 Feb 2026 15:41:25 -0800 (PST) X-Received: by 2002:a05:6808:1391:b0:462:aa0f:4375 with SMTP id 5614622812f47-464beb40bfamr2716093b6e.39.1772235685424; Fri, 27 Feb 2026 15:41:25 -0800 (PST) Received: from hu-clew-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5614622812f47-464bb4028cdsm3001607b6e.9.2026.02.27.15.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 15:41:25 -0800 (PST) Date: Fri, 27 Feb 2026 15:41:22 -0800 From: Chris Lew To: Bjorn Andersson Cc: Bjorn Andersson , Konrad Dybcio , Alexander Wilhelm , Dmitry Baryshkov , Mathieu Poirier , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: Re: [PATCH v2] remoteproc: sysmon: Correct subsys_name_len type in QMI request Message-ID: References: <20260220-qmi-encode-invalid-length-v2-1-5674be35ab29@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260220-qmi-encode-invalid-length-v2-1-5674be35ab29@oss.qualcomm.com> X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjI3MDIxMiBTYWx0ZWRfX8+SCTT1Y8kXn cZlepYTuUcW4681BdkdgAEu+E1dZrX0WqoxM8XsoSFwShiR0O1BoVBB788hvCKSaFW23xNUacu1 QXKbOtrEeRAmzqpnbm5reNJZ0QXi37go2SI+1NfZD7cDmjACeucSS+X0O+h80QKEWNchFYZGIHV oPoE0VzCwDAesfniAdzNsg5pYNl5t/0GDGxK+Er/Erb3VNVs9H5Isb9af7C/8IawvgljeiGbvbA 2fXLeXtQFHNY74/jzg0ExRXAgMzgG42tx19mcg8ED2Qw4GaE5GM4Z+A3IdBSCE6mlxwE6y2xxrD YPk1XLdZ+CbUIlNIdcUNejv3TK1PXd/KBBVH5r70uD7MY3/OOjaSsDtQ30r7f4Lr6eYBMVY/19D WrYNZCRqUu6E8aiG5hbJNOja6Ry1VP2y+8mWlqIWFw2wLW6xfiIyWdeb+mS3ODMI0VRFMUYaH5p c+NUA/rtPOHdYJHdCNA== X-Authority-Analysis: v=2.4 cv=HY0ZjyE8 c=1 sm=1 tr=0 ts=69a22ba6 cx=c_pps a=OI0sxtj7PyCX9F1bxD/puw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=kj9zAlcOel0A:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=UyUhSrBohwOpVuKZ7twA:9 a=CjuIK1q_8ugA:10 a=Z1Yy7GAxqfX1iEi80vsk:22 X-Proofpoint-ORIG-GUID: FurbsARvF-PPUT3DcCbkH95Dgd0h2W3w X-Proofpoint-GUID: FurbsARvF-PPUT3DcCbkH95Dgd0h2W3w X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-27_04,2026-02-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 malwarescore=0 impostorscore=0 spamscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2602270212 On Fri, Feb 20, 2026 at 03:11:48PM -0600, Bjorn Andersson wrote: > The QMI message encoder has up until recently read a single byte (as > elem_size == 1), but with the introduction of big endian support it's > become apparent that this field is expected to be a full u32 - > regardless of the size of the length in the encoded message (which is > what elem_size specifies). > > The result is that the encoder now reads past the length byte and > rejects the unreasonably large length formed when including the > following 3 bytes from the subsys_name array. > > Fix this by changing to the expected type. > > Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon") > Signed-off-by: Bjorn Andersson > --- > I believe I've checked all the other users now, and this is the only > case I found that needs fixing. > Did a quick double check on ipa, ath10k, sysmon, pdr, slimbus and usb. Reviewed-by: Chris Lew > Changes in v2: > - Fix the sysmon driver instead of the encoder/decoder > - Link to v1: https://lore.kernel.org/r/20260214-qmi-encode-invalid-length-v1-0-780cb4e98b0f@oss.qualcomm.com > --- > drivers/remoteproc/qcom_sysmon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c > index 660ac6fc408213073942f20a2c4e43a0c9b9b37e..c6cc6e519fe566a92505dc57c30e8b3e0a697179 100644 > --- a/drivers/remoteproc/qcom_sysmon.c > +++ b/drivers/remoteproc/qcom_sysmon.c > @@ -203,7 +203,7 @@ static const struct qmi_elem_info ssctl_shutdown_resp_ei[] = { > }; > > struct ssctl_subsys_event_req { > - u8 subsys_name_len; > + u32 subsys_name_len; > char subsys_name[SSCTL_SUBSYS_NAME_LENGTH]; > u32 event; > u8 evt_driven_valid; > > --- > base-commit: fd9678829d6dd0c10fde080b536abf4b1121c346 > change-id: 20260214-qmi-encode-invalid-length-310dd551a186 > > Best regards, > -- > Bjorn Andersson >