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 9F4914343EC for ; Mon, 24 Aug 2026 14:09:45 +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=1787580587; cv=none; b=OQTQm+9Ss1TkjNSF8v2TnFbM6j7faxQrcMnEGrRj2/4f8t3aypTDWbRBEp02BSx18bMAX24U2j1j+z2UVTizJ5Vo/vNPP8spHBV3d27A8whorxpv2EyLEGEwfoaC3YZhFIlmC4MCxp3DutI4MAlMQce3emYVTI1ToDtU0zxaL3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787580587; c=relaxed/simple; bh=hnUwIQeTGt7/OqMyir0LwszHAezJI6J7EFXtq7uY7DQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=f4iyDITQqD9W14iciTJiwua+KJH8z/VqeweX0u3Ct1/MG3fjXGDiIcKwejtlUk2EZm5cDbmpXn6F4znMstQRlJG58tmOiOegb9GWUCurpX2MO8B4lNoVi9SEOxtYIzv7tDXrZf1VptUEsWAy3SM4s1oE1jghEMan0RwPIvYyozc= 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=ixlk5aCl; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JwsFqkI5; 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="ixlk5aCl"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JwsFqkI5" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67OCusbk2583535 for ; Mon, 24 Aug 2026 14:09:44 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= fzSeA7475RWMSNaesV+ZLrLV4ITpt8WwgOeEK96e7gc=; b=ixlk5aClLy/2C7Ul 7DDsRNNXRwzyinziMcsqDpypA9acVyuqTsqruyXpZ0FIaQX6bCutsMA+KnaW6EFC Lu4C1O9+vq/xoSu6UvJMnb/I6/FnDd+OPSFrk7uj9fC/ZK+ZDH6zHGOyD593y9h8 59ohiUbO0t0KZNGrqfFqQtzBMfiZprvUz3MEhfg1fpR41zWA5qtEhv/HGLD3FWgI TWKAmBQRMRQwdVgY47KXAbjCvbyJEh93a4/uDCcq2EiPLNrwwiX6F5PodmPyLIon 5f9WgTnKNY7P6WHqZnJxYjiISa+WAHzXSEbByLlBKRGxEuNrEvE/Gi/pbOrowiBk TTbT2w== Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g8hbthqng-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 24 Aug 2026 14:09:44 +0000 (GMT) Received: by mail-ot1-f72.google.com with SMTP id 46e09a7af769-7ebeeb51976so8695983a34.1 for ; Mon, 24 Aug 2026 07:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787580583; x=1788185383; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=fzSeA7475RWMSNaesV+ZLrLV4ITpt8WwgOeEK96e7gc=; b=JwsFqkI5Gb2BUj0DQoo/IIFdfN1FzNjE1piYeNMCYPsLC3/YyFwSM6F6xOBM05X2jQ MzT3bj43ZQHQmtSaaMEOJR60TJZapXp+LXlkyN0lZy3SRO76KlSu0LryIuGimbsIEGde d1Tf2d7PIajan08WB2ZogUcGbdiQcyBRUyqYkX3xY9FGTFpKPgV9NVSErsfrXbIkd14U gJie4j1hNf2TzEkQnqp67IWHUsx3Y0prI+Jx1B4lktN7XN8CoWYIF24facb4V580ZUik af5JOq30zxlX9DP7SeKksg0GKNhmiop/Mpzu+zawvy7juLLQzSC50lKFgpjEiOgK+lYQ h5Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787580583; x=1788185383; h=content-transfer-encoding:content-type:in-reply-to:from :content-language: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:content-type; bh=fzSeA7475RWMSNaesV+ZLrLV4ITpt8WwgOeEK96e7gc=; b=SCSX+npymbNU+NWff4/JmFttt3FvOedQaxTAQUOECII346HShDDs/5GTxPKUfJXhPJ oqIcrBS68/+TLW3aSgEuGAGLdoC+ry/3mRhbFt1/F/ecdqU/CDsUluWXp0w1D3BIiLOZ G8UMAhKQBrFT9YqzV518j0qQzGSBvFEuPsoS497XLwSJtR5MQ3mRdgr9sWA3wz4gJxje 2h97GpbXbFqP4UQtUwEGrTDrVeVVCI96Z6lpGllJlio9iXcIKHTsw6Yj7zrdyM3rF8l7 riG3/12CcZvXKEQud6P+A9PynSRlh4LGCW55Ia2FYkjHh2bogf6t6cZvCM/n1hwOH/rZ O4mA== X-Forwarded-Encrypted: i=1; AHgh+Rq6ynSbeR0TJF/qBGb3dnmYSc3POvDe69IW9nGPKG56EY4pqLgoZLuDlbGbuDG0HiZztZlQsXGHUmKSA98=@vger.kernel.org X-Gm-Message-State: AFuF++mPdboua3+TB+4fac24FL3MNPs0pKRkHXlMxZDvpNYL81gqIB9i ocSSAG/etlhI3uwdnG05sEms0qAmBDwrD/pmL022YZi5cHL5tc55eCDvP/g49s1frzpFvi11epq 9q9zp2JiYG3wkGWhSfB+wwLXOCXkzwfFyJBHRmKKsTPkTwAHNdNrH4WJ7sTsF+F79os+9/7m32c E= X-Gm-Gg: AR+sD10QpphdG4ttKoJLpFKZam2TpH2aU7BiQ/49OpUPjO4//7iMrDdRUjPRVeATPeV dLoTCN+LEie2cFlq14pDVRGvhKcnJO87/BNd28ELX83UQaLisSD4v+V72KHwpnKVnsWkmZV9Zgu yu/LfcNsq2dMlm1foyXiPCoLqx9Pu8Ht8drKfiM8hM0YBHYl+ZZXO+7UiUwt38apuCt76ZlRd1x sH8N30NG37QRrBF/TWhLzsQspRkD61U6KeJ5+4R1TK4MMdjpKlAbosBym8K+F3Hk7kDl3zxDBhY 6PANCzzPgJ6Nzg95fNvOeh86u3kxvaNwQJGwNuSgBUnZyki8T0Dqy5nihuQmPHgz7F4hKQBjqCP OdytQKlUAWjL6Hl1woldorSIJHsoylg== X-Received: by 2002:a05:6830:82aa:b0:7f3:9729:a9e3 with SMTP id 46e09a7af769-7f462bce15amr25970127a34.7.1787580583520; Mon, 24 Aug 2026 07:09:43 -0700 (PDT) X-Received: by 2002:a05:6830:82aa:b0:7f3:9729:a9e3 with SMTP id 46e09a7af769-7f462bce15amr25970068a34.7.1787580583002; Mon, 24 Aug 2026 07:09:43 -0700 (PDT) Received: from [192.168.0.6] ([49.204.106.1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7f48fb1db63sm4886236a34.12.2026.08.24.07.09.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Aug 2026 07:09:42 -0700 (PDT) Message-ID: <5d4e4e0b-3180-4ad9-90ad-2cb0482fc87b@oss.qualcomm.com> Date: Mon, 24 Aug 2026 19:39:38 +0530 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] serial: qcom-geni: Drop unsafe rx_buf realloc from setup_fifos() To: Greg Kroah-Hartman Cc: konrad.dybcio@oss.qualcomm.com, Jiri Slaby , chandana.chiluveru@oss.qualcomm.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Praveen Talari References: <20260824-drop-unsafe-rx-buf-realloc-from-setup-fifos-v1-1-52d231c840e1@oss.qualcomm.com> <2026082458-lung-knelt-e760@gregkh> Content-Language: en-US From: Praveen Talari In-Reply-To: <2026082458-lung-knelt-e760@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI0MDExOCBTYWx0ZWRfX+GEGSQj3619P hheaxCs5o/QYSg1k+gAtDjWH7jyuL2wFdm0XujuVFfZYb69tQurkB8p/fxaB9DVFp0m9xSlMTGa bZZcGivUCe1WKibLnR+teSYiYa7cjdxxaZmr1QLJ+s+Ww0eN6JAKdhFs8bwxGaKq1BXt+4oLrLD IhGmo+m9tMk+87Zr9k/Jv0cNnfIZ6QmnmVEUYCh/XrNJ/apxy54CR+2Z5R/nW4Eb7hsGCSrZbnY LemrcYwYMJtN28DL4zF5q12dSbqYKyzsAXXk4rLxQ8mlrRMK6oMc9L+HtNohQr5nO/dXO3dtYwq CGx853LKplJPQ0Iyoy7Hsr0JkL2rgYJaZ1kUADotiMEjU0MfQYKRd1aSw3rhaegFq64j6niD6UV qiTcpqPmrpA8Gp/J5RfsRy0tgnRnSwYjxxTtjzbKbTwluSgBzt3N2ZDCvWRAZ5jlMiKTODYBijF Kwy8Qc0cS+9r4a9W6Sg== X-Authority-Analysis: v=2.4 cv=JL0LdcKb c=1 sm=1 tr=0 ts=6a8c50a8 cx=c_pps a=+3WqYijBVYhDct2f5Fivkw==:117 a=3DKySdf3VQHjbkfL60kt6A==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=bwh0WvZscbM7pm4pYAQA:9 a=QEXdDO2ut3YA:10 a=eYe2g0i6gJ5uXG_o6N4q:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI0MDExOCBTYWx0ZWRfX8pRpPVTJUAww YxGYy/uzvkRjprr7QhO5tYb/3MnyD73bu8cGaF8sHhFF5WrM/l5OTPCwrV0F4O42Hmdpy9RqAmo BVe5Hftzvm+8qd3jTEL6hcgHMxxPyMk= X-Proofpoint-GUID: I-lpASF03fytfsw1Xp92WhB84CcnvYyX X-Proofpoint-ORIG-GUID: I-lpASF03fytfsw1Xp92WhB84CcnvYyX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-24_04,2026-08-24_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608240118 Hi On 24-08-2026 18:26, Greg Kroah-Hartman wrote: > On Mon, Aug 24, 2026 at 04:15:14PM +0530, Praveen Talari wrote: >> The RX buffer is allocated once during probe using a fixed DMA_RX_BUF_SIZE >> and is DMA-mapped for the lifetime of the port. However, setup_fifos() >> attempts to reallocate rx_buf whenever the reported RX FIFO depth changes. >> Since the DMA mapping is not re-established after reallocation, the buffer >> pointer may change while the DMA engine continues using the stale DMA >> address. This can result in RX DMA targeting memory that no longer >> corresponds to the active buffer, leading to invalid DMA accesses and >> potential memory corruption. >> >> The RX FIFO depth is unrelated to the size of rx_buf. The buffer is >> allocated independently using DMA_RX_BUF_SIZE and all RX DMA paths consume >> it at that fixed size. As such, resizing the buffer based on FIFO depth >> changes provides no functional benefit. >> >> Signed-off-by: Praveen Talari >> --- >> Signed-off-by: Praveen Talari > Why is this signed-off-by twice, with different email addresses? Apologies, that was a mistake while updating the commit message. Only praveen.talari@oss.qualcomm.com should be present for upstream submissions. I'll fix it in the next revision Thanks, Praveen Talari > > confused, > > greg k-h