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 9637A2C11E2 for ; Tue, 2 Jun 2026 07:18:00 +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=1780384681; cv=none; b=HPth5K+9kR6GUwC4tg2KKDDrj2t64CBZWVqxov9eCeLQK7R9bYoJKQs5A6wIZBimzZLwqmdAEfT5lhgzvGx9Tj/nsERfCRKwXtrx35NS4eK6awhxCmkRDnmhomII0G3zYC8zl7Zuv8drQZM8F7lNamBnWk4zXYuJ4OBiatl/PJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780384681; c=relaxed/simple; bh=7KN7x93W6aGKzndfTdkiK4lfejhnXD9PmLGQ7Mx1BFI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=dTnCsWgsuZBpQCgt0JrzTwIPgwld/iUxpsmnugBtepy7ltHdaAp2Se6mPdhxxspDGK/D+MCrQvLaIavjv2AFA9ncnxto3PkfNWINei0e436yDdj9b6jP6rxApm2PNdkGOAdox0LuUT4Ufr4HsSZJYuZeUBFPl23HfFg7ZtnqApQ= 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=mvvBIJvE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XqhwGq/n; 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="mvvBIJvE"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XqhwGq/n" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65230c5u3128015 for ; Tue, 2 Jun 2026 07:17:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=IEO53fTfGnYj/uK6CggP7yVALgVJ97/bhq7 uN/lgdLg=; b=mvvBIJvEB1XNVOWuTCDGtvFQ4QXssMi4xBUIH7937bLuSajmpXd Xtp00Qb9L9+/8ZZOSyaasjRomZChRa+Xc+dUA+Y/A5maxwJtBT5qdCJw8g2d4vAR JQRA8px4oI3qurbeaB9GUZk2u/68bQVctsK+CzEggpOgzMR0LJkcO5wMkl4+k2LT jvrctL0jtLZV0VTjEgGUIQz81em6VUDjhlAdSl5BsEAQsWNnOQf0gS6aKLvJQ4Ii lp3ZGik28Ikot3gxzX952fhtK/z3bb7WIUYSXvPLQZ9UHhqirP8AVtYteLUmwTIu tEw/qVggJbR69rCgnW/qA0VgX7YZarKfBLg== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eh9014jsf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 02 Jun 2026 07:17:59 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-36b982ec27aso3830772a91.1 for ; Tue, 02 Jun 2026 00:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780384678; x=1780989478; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IEO53fTfGnYj/uK6CggP7yVALgVJ97/bhq7uN/lgdLg=; b=XqhwGq/nfQgm3AIGHBmazLK1rU56QdE4vm6xAun2YslqJKk8CWWwP2Sv7jb1lm9ISQ N1hXAKolvRlwwYSx9kYmlOSYOi5uTUedfAh9rSmW6Wh8aIa+4PwmqkE0ct+yQ8+VHAmU z0E13mm8x50RnHZlQC6PYtzFVW8hr04X7eq3B/TUmbd9Z8bLO69S/zoIYUWszfHl0V7n ph4frNA2JQv0x0/pe8O3TwV0IfEzRz8H8Y626OPpuDg2VGlAU4Ygc94oR8gOeLHJTpfo GAnGr++Gip66P5OJmpmBM9vf3qgcwqXf43zPQT5jtNQa/WSZJH/lmq8/A67K6J9relzM sCeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780384678; x=1780989478; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IEO53fTfGnYj/uK6CggP7yVALgVJ97/bhq7uN/lgdLg=; b=Wd32qeL2ZOa0vs3WynC9/va9hmp57KU/6x87BK385sxvKnDmd1lI9NqZemKOXPsFCs Rm8qFN89fYlWTAkDDWD1RKK8YW7ycewqTpVRfsX6WqyB+KAIf2+EWeRpZc+NGkHDHGWs pOTzuLTBjGxOIbe+GiBG+MU5eKvrI746ABp2/FI/74ZLXHIC6xzuw+1ABlBe7+uPYM4a 4QdODQ4B7G9nuU4wvFU3TnZyf8yp+uko1xX+Djei+8UF7GFSXFZQuI+aqtOhVTz9lSra zIYPXKaoaJ3l20zB+rWv/9vNNgXXx8WBE1Tbm5T06qYMx71Xx43G16a616KcF4qUkcjH LWTw== X-Forwarded-Encrypted: i=1; AFNElJ+cFx+iP/nLS6BjjwO9t5d6KTTJzF/z/ijffC4iUWW45DDHXV6CUZqfoH2dhtieeeBtYBRTTGr03JABj4s=@vger.kernel.org X-Gm-Message-State: AOJu0YyM0HRNUI9ZbHNSAZQsXICuwOSj8dypBJ4VDOYdrTv8HjSl5IV+ kE8STuR0JtPaZztwCI0SsxNVNtsjnITY+uW6mM4xdLGVPcNRhDVzH7OPhnd+GAjFWPBPsTHoXt3 MVz0WVOqUWfD9cMB8ZMdS9i/ZSkphFVtk+a5hWnIYleo1U+U7rlTGzLyPPcjJtuJVUWE= X-Gm-Gg: Acq92OFpI5uijajMqUYYMY+z5r2conFa7zAqaOa/Uzwf1ozqEyG4m8UASpMR33GxLpT 4NysGSF6rHplhMSsSPPnUEpvj/0ERof4smRQNthnhBHFNXn62UYwHXriNo4B7dAq63oaE36/DDc JN9u2olTqgdwqHzdKqDQIasfKnCjEGBRPnhTU55Qoy7ykMGJGM37/Ox0+qwXVzS1Go3J08wUfPj 59iJ8dB3l+6xoH1FcoCiKIIBLx4+ozp8lp1yNF6OjfdUMUuLkUur4aLofTZk1dqmgVV4EeJQ+/+ AO5aAGt8KMM5UdNL/pxNpzGUz4PgcQ5qphd50jXRzl4tfZJV/d5ejsSrroKF4Jim0xMqtV1+YmS hIiQ2XMNHHCaGhvmQJrq3CSWsBkMidb1zzY6OkinHbXctQx+FauN+FZRiSH5tn2x8fJYmwq6t0N 5ZpkkRfALeMFBXONG2h4Ryx2cbyTftCA== X-Received: by 2002:a17:90b:4b47:b0:36d:ae6a:22fe with SMTP id 98e67ed59e1d1-36dae6a241dmr9389520a91.16.1780384678458; Tue, 02 Jun 2026 00:17:58 -0700 (PDT) X-Received: by 2002:a17:90b:4b47:b0:36d:ae6a:22fe with SMTP id 98e67ed59e1d1-36dae6a241dmr9389491a91.16.1780384677982; Tue, 02 Jun 2026 00:17:57 -0700 (PDT) Received: from QCOM-SocCW5bzXR.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36dd91c9991sm1766279a91.7.2026.06.02.00.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 00:17:57 -0700 (PDT) From: Jianping Li To: srini@kernel.org, amahesh@qti.qualcomm.com, arnd@arndb.de, gregkh@linuxfoundation.org, abelvesa@kernel.org, jorge.ramirez@oss.qualcomm.com Cc: Jianping Li , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ekansh.gupta@oss.qualcomm.com, quic_chennak@quicinc.com Subject: [PATCH v7 0/5] misc: fastrpc: Add missing bug fixes Date: Tue, 2 Jun 2026 15:17:45 +0800 Message-Id: <20260602071750.526-1-jianping.li@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=H6nrBeYi c=1 sm=1 tr=0 ts=6a1e83a7 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=iZgqdknpxvlyNCGGVIUA:9 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-ORIG-GUID: Hx1ilp_Dc-3fV6occnCb48hVxCVSa2z- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAyMDA2NiBTYWx0ZWRfX7puMvJmNydt0 BlZVBkG9BIVRcG8cHkqlQ2YR1upjEJdNmcXvHqwtc5szpR2Mcy7u71wa6eI33akPHGuGxIxeFIX d/Vx+ijYcSMy5ubI+wlXonFKm6pIOadCLOgLAIX9orHfvcCopXlTHla0LK4jyGHdqy2D2fWikbH rIoIwGG9g1OGsu0ok6wnHsDPr0sCQT5PO4thXBirk5sLkmgeSQ/5inpsNvtGxrlGxeJxeWwylIN 78VVRPIEQaYKZzuSmbRs3jVGFWi7qhU+7jXQW5sN/tj1KtJnvUl+1Nb5pdC6jJIo0P4JGGEzBL/ cvxnTRmO+iB/gvede00f/9BpfJncHGEgj2u8J1sz7DFJDUxUcg8xrE3+orlBNfHh/rTb5TDfj59 9bz952jwJioBoOZzovocZSb74EL7FfvBT99o37DKg8y7CDx43XPpgt1iGJZGv5pqXay11xRtZyL VyjBcuoKwdarrMoCVCA== X-Proofpoint-GUID: Hx1ilp_Dc-3fV6occnCb48hVxCVSa2z- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-01_07,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 clxscore=1015 phishscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606020066 Add missing bug fixes in memory areas. This patch series fixes multiple memory handling issues in the FastRPC driver, primarily around the Audio PD remote heap. The Audio PD uses a reserved memory-region that is shared between HLOS and the DSP. Allocating and freeing this memory from userspace is unsafe, as the kernel cannot reliably determine when the DSP has finished using the buffers. To address this, the entire reserved memory-region for the Audio PD is now fully assigned to the DSP during remoteproc boot-up, and its lifetime is tied to the rpmsg channel. Patch [v6]: https://lore.kernel.org/all/20260526111124.515-2-jianping.li@oss.qualcomm.com/ Change in v7: - Removed duplicate remote heap validation check; keep it only at the beginning of fastrpc_init_create_static_process() Change in v6: - Separate the handling of err_copy - Place the check for remote_heap at the beginning of the function Change in v5: - Split reserved-memory handling into separate patches Change in v4: - Fail Audio PD static process creation when no reserved memory-region is present, instead of silently proceeding Change in v3: - Adjusted the order of the series, placing NULL check changes that are not bug fixes at the end - Modified the commit message to describe the bug background in detail - Switch buf->list_lock back to fl->lock - Add locking to the operation of audio_init_mem Changes in v2: - Remove the if check outside fastrpc_buf_free - Store the spinlock pointer in the struct fastrpc_buf instead - Allocate entire reserved memory to audio PD through remote heap Ekansh Gupta (3): misc: fastrpc: Fix initial memory allocation for Audio PD memory pool misc: fastrpc: Remove buffer from list prior to unmap operation misc: fastrpc: Allow fastrpc_buf_free() to accept NULL Jianping Li (2): misc: fastrpc: Fail Audio PD init when reserved memory is missing misc: fastrpc: Allocate entire reserved memory for Audio PD in probe drivers/misc/fastrpc.c | 128 +++++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 62 deletions(-) -- 2.43.0