From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 322D632C323 for ; Wed, 18 Feb 2026 18:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771437628; cv=none; b=JacQ1wdzbF+GI3fK9UIP9RQhUQ8mjxuaOITM2zd3POoBu/AND33BsBbvkC8rWOc+xS0yFdYFfZh5dDSRY/RDJEHCLheMIJ4R36lYKalCmtKecf5j4tYaIL6cAas9X/m3y0C0QxovdGZOvdWFpuwbMTCTVcRZ/gjElUorBztn7nQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771437628; c=relaxed/simple; bh=Diw1gjudoUUpgXc12VDDK6rvyfujDuJrptvUlV7zhOM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QsmbZA1N+en3gQZZO9E/nBjtFQgvlAguYea/oHWiTN9kUSpjabZ8q8X5TByuzAijijYLAhjNXPcMz2ZEia97TEAdox//gadoMyv3bg8O8aVowu2lmH4OZUiuorc1tRFs4TEaIKLF4gUEXP45EZDEcG4lXb9qUYTTEdqsuSCAV5I= 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=MkXkkUXE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gnWCp06r; arc=none smtp.client-ip=205.220.168.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="MkXkkUXE"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gnWCp06r" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61I9LMw12784789 for ; Wed, 18 Feb 2026 18:00:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= gvgZL5fYRbbNaCYDrVwHrqLZUu2F2eOiunykdEYbTCE=; b=MkXkkUXEWW/YoLul fLyS6tzl1qWnX+rPDYn2snJDzmzNC1SAaR0FvubdOJTfpa7lee+JOrHHSCgx32h2 qEy7VTfVtTwyX7pS8qdKu/YjUo56NhRHZz88gZrv8pGHc95Imuq/hB6pfVd6NkNE 0ENAUI9r0tb7PBeTQMeu9bd/QA6cwVzoP5Cm2lcTN/65I8ceQ2u27DYYSk0uTN7K FnAKP0MLc+hWD7ZYxv2R0T63M6ngpkJiJlL5Kj1VnKoxvTC20KqWuX+DWWdPFX2U uR0SOpA1fHF23v9bzdieZ6rBeEYTFK30Zd6fnff6C7SUoi8lqDvQuzawZbbdSjdW miEcNg== Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ccyrk32jx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 18 Feb 2026 18:00:26 +0000 (GMT) Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-7d4bd29099eso2220587a34.2 for ; Wed, 18 Feb 2026 10:00:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771437626; x=1772042426; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gvgZL5fYRbbNaCYDrVwHrqLZUu2F2eOiunykdEYbTCE=; b=gnWCp06rKKmAmyt+fs2Eoaspfle8y9hPrhuUbGxlqGbUcI4+t9RtElI0WB0xpq3+ZP Pe0AfhMJiY5UJ4E6jRzFS4p4lyeop/7iqBYbGgnbBMZQI8ceiPQqcm0RC94i9ZBKmhzf XF7/Xf18rYyZ6M/s8SmNPFbayHyCQOa7jnWQAj39h9sY76Ipscmdoi4RJAmMyliQVny/ qV79DoYKJjhoeBAOtxIS4GK/doQQ0G1j0AbLXW/QxWvUevNmsKV19eFuKVtASVRHUsPl gj5sluHkMbAIpMymr8lymv8YaakrXrXqUGzdPzUIcJKWdMaxXNDBPbsEEWDAsVXzL32p rbAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771437626; x=1772042426; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gvgZL5fYRbbNaCYDrVwHrqLZUu2F2eOiunykdEYbTCE=; b=tW2R7sNHKchlMIbTPJ7Fwei198dr6hSQdQf2xp6r+ZrAkh+U8C50ayrvDyGRcEAByS rcusR4JUKSC2FwDVl4zlDt0ZWs96q5EhSHSs6XyNREMLv3LNwbpCtizWctAMeGIFrIdh voqzWPRX/oF/QziYnpB/s6qDTH1Z3/9lgqXh5pqdc5dygvqjhGht8JYTARL7Kr79uNJc BDCMaXC6OvipVpHmiWB5kFnlKhNPqGsO9rGCcdsGcRvYw4+hR3/ijhRTEg2Kh5070ZZ1 3GnPfXjftLrxBbCif88AEtYNKKGomSiijnF4M6ZgPiwGs5S01COopU8rKyG8XnMWgczG n8zA== X-Forwarded-Encrypted: i=1; AJvYcCV/6OlNhr8hquFt6VYRWTIfZX4KZoCD61t2gEuK1NLln0Zf/Dg+y0V+ebFzfotqt24kCAOWG4tEPNMxi8Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwRGyA1ciqjVsxTloAYWlevAFOZR/lCrGI1tr+uYxPABDSKlRXR vJJ9vIxqS4QNmSkeBxRpnry1Uzb573pgURe9PoX/eIGzIhT/DYeqzupg2EqSbBfcU/LKsiFfC5O HGecq2ynx+d7o8KPQRqprwxKkOs5HNXaSL9bGbZpeHT2h0SkpQl8qE1QkqfaV4hvNKUA= X-Gm-Gg: AZuq6aL+v2D/vJ+o51BzckdzJrCKOFygg2lNNf0lFvrC8JloK9ybcueJjKhC1udY1JE HjInbkOc4Mk7DydQz/WprBlAFaajRAueADh/Y231L173c/O34MIVWuV0P7hTkQGGLjtZKuB+Le9 QFaNYoI1DFuGalMmTSxVFPqY67UmTjxjr/PrVYP03+N8neWRrb9rX9iRBUzPgOgV1GCSCgywLm6 UVj7d9miBwW2bxu/cSq/drfSpiBYbjk8ZD+oG8ZlXojJshgakZKR2WIlayeaewdPGuQZrOo7Pxz 7sRD768De1JrWEgYyBn6TVFRAGF2BvylDfdT/8SRU2yypNOIMrmU49vuJD0z0/EYX4H2fqXxPpf +7t3+anTCyIhB3z1DjIOi2ep3M0TNFiXpQW09KeV5lwRqOXkS/VQRnNxifqeM+A/MecVsUCSlXD XeruAaZw== X-Received: by 2002:a05:6830:dca:b0:7d1:95c7:f4cf with SMTP id 46e09a7af769-7d5127d2d67mr105907a34.14.1771437625508; Wed, 18 Feb 2026 10:00:25 -0800 (PST) X-Received: by 2002:a05:6830:dca:b0:7d1:95c7:f4cf with SMTP id 46e09a7af769-7d5127d2d67mr105892a34.14.1771437625085; Wed, 18 Feb 2026 10:00:25 -0800 (PST) Received: from [10.227.110.203] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d4a754b4bbsm17960110a34.11.2026.02.18.10.00.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Feb 2026 10:00:24 -0800 (PST) Message-ID: <608ff2a7-775e-46ae-ba8b-9d9c2f8219bc@oss.qualcomm.com> Date: Wed, 18 Feb 2026 10:00:22 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] soc: qcom: qmi: Fix "invalid data length" in encoder To: Bjorn Andersson , Alexander Wilhelm , Chris Lew Cc: Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, David Heidelberg , Jeff Johnson , ath11k@lists.infradead.org, ath12k@lists.infradead.org References: <20260214-qmi-encode-invalid-length-v1-0-780cb4e98b0f@oss.qualcomm.com> <20260214-qmi-encode-invalid-length-v1-1-780cb4e98b0f@oss.qualcomm.com> From: Jeff Johnson Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: 8KnlFl4Lro3-9p7awGsLm7kXwKa-z-dl X-Proofpoint-ORIG-GUID: 8KnlFl4Lro3-9p7awGsLm7kXwKa-z-dl X-Authority-Analysis: v=2.4 cv=eOweTXp1 c=1 sm=1 tr=0 ts=6995fe3a cx=c_pps a=7uPEO8VhqeOX8vTJ3z8K6Q==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=NEAV23lmAAAA:8 a=vZmAtJSpd1NQ6jeXC_kA:9 a=QEXdDO2ut3YA:10 a=ZXulRonScM0A:10 a=EXS-LbY8YePsIyqnH6vw:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE4MDE1MyBTYWx0ZWRfXwsWvZ130xVVB P6HV7wTQyNzalDSMpMaKePNMTcmmrzPFgFCRscmjE2XwQBRTEjFy2Mq8auJUay011pajvOR1TCD CrEpPasR7j27bHojq+M1VGjd8bJDAbSD885DcCz2RnSiQKQe8vwVMkUKHDSlW5v79KWo7A8jAPX edAl0lvEmJps4I9/KrgVkWLvYEeejvPvzN15ESbU/lZTm4RhAzJbY8fzH/vCCJE+8Lx+VN+kRF7 kkHt8bTyiUb9+LJ8KfpTf5SSjPPqzvBZFA17ABRitaSPEabEQslgZjeL+bPkynmJUNt8vKekfID dCL+KGeZYGXedSyxUIlRgl7/lGK2/zG2dyi/ih8si6hU5iSa+djeA2DwB9Ol1nKwe1kFvhzJaFW 7bM74pXsPOaW5EZ0lQgPos95ACljvMGxXGgCShntpWicCsJjfCHYnLaEV7C2vZF1Ss//kFiK2a2 inlWI9NU+/T9FPIy/9Q== 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-18_03,2026-02-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 bulkscore=0 clxscore=1015 phishscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602180153 On 2/16/2026 7:25 AM, Bjorn Andersson wrote: > It might very well be that the underlying bug is my expectation that > elem_size should be reflected in the struct and not only in the encoded > message, and hence what I wrote in https://github.com/linux-msm/qmic. > Perhaps the length-specifier of an array should always be u32? > > @Chris, what does the downstream generator produce here? Is this behavior just constrained to QMI_DATA_LEN TLVs? I'm looking at downstream Android WLAN code and it has the same discrepancy, so it appears the code generator is always producing a u32 member in the host struct to hold a QMI_DATA_LEN member even though the actual element size as defined in the qmi_elem_info array is either sizeof(u8) or sizeof(u16). Does this issue get fixed if we change the member in the host struct, i.e. for the issue mentioned (that I chopped off) modify: struct qmi_wlanfw_request_mem_ind_msg_v01 { - u32 mem_seg_len; + u8 mem_seg_len;