From patchwork Thu Jun 6 16:59:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ekansh Gupta X-Patchwork-Id: 13688820 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 1FA141991C8; Thu, 6 Jun 2024 17:00:06 +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=1717693207; cv=none; b=hFSj9CrENWxL01x1AkZCmrlspE0V528IUQLQ2lAOrY8NB0hFD2dRcqBSvclUfID0/uB/rhcy1ieKXDyVzQhaYFoXe/VNdQBUXEVG0nxIukuOPfdvLMpS9ySF87BHJV9PiXVF/0iQxOMnHfouwagVnl61OfXsyfvOUVbC8z5wYU0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717693207; c=relaxed/simple; bh=9QTdEjLiw8c8qss/5BtW4vrkb7+nG9Cc14q2CfjXh78=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B3xKlRPZAU/73t52dslcbmo4zOOiDiUqpC9jZwAPbGV+hEUnWOeIfdNfhts7I2gi0rrGC4GpoFkteugG4Nn3K8lAPOl6AEomJf3uAmVUygHeTKZlrnHP35lZEYnyLBp9gsK7A70rp90jsiNaL9oi5oSBA6xKMoHrXAIzjbuUskU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=U6Othtmk; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="U6Othtmk" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45698hbc015037; Thu, 6 Jun 2024 17:00:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= uMZ6sZO7X/FVFigW42Ucgp5WFfqw0ZXCXlUVSefdVk4=; b=U6Othtmk4m2JuWYO n+8EtJQg621upbD56JokD/aFApJ+KmREQ91o73QVHTxNxNHJUjFnde2j35xRw8Kt X1vV8ngS+Whn8UB8+1wwJxL9DKhxCsWTjCTju0Ee3p4EQrZ2Tr6bBFyfxEM7px/0 UO50GJQtoAuE4uiN1BkjlKvLJtiRFe8q4ar4zVKAW8yXWGNchn2DLVnunRf52xIN m2oxLpu5ZIYR/g2raxSvnjbNQkxf4HF+TDryHWYs6yDlk41IJUwaH8qSWgzI/Ce/ ONSMUBDYBVA+2rqCGX4d1pbD7XDEHh/lv4wjKnnDVqGlPYSIBzmjjeoNlRoa2bWn 2+8qMg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yka7p93am-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jun 2024 17:00:02 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 456H01G4025080 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 6 Jun 2024 17:00:01 GMT Received: from hu-ekangupt-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 6 Jun 2024 09:59:58 -0700 From: Ekansh Gupta To: , CC: , , , , stable Subject: [PATCH v4 04/11] misc: fastrpc: Avoid updating PD type for capability request Date: Thu, 6 Jun 2024 22:29:24 +0530 Message-ID: <20240606165939.12950-5-quic_ekangupt@quicinc.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240606165939.12950-1-quic_ekangupt@quicinc.com> References: <20240606165939.12950-1-quic_ekangupt@quicinc.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 7ioqd74XDM6mhBEuz41XJZq7ay98pV-s X-Proofpoint-ORIG-GUID: 7ioqd74XDM6mhBEuz41XJZq7ay98pV-s X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-06_13,2024-06-06_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 clxscore=1015 phishscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406060120 When user is requesting for DSP capability, the process pd type is getting updated to USER_PD which is incorrect as DSP will assume the process which is making the request is a user PD and this will never get updated back to the original value. The actual PD type should not be updated for capability request and it should be serviced by the respective PD on DSP side. Adding changes to avoid process PD type modification. Fixes: 6c16fd8bdd40 ("misc: fastrpc: Add support to get DSP capabilities") Cc: stable Signed-off-by: Ekansh Gupta Reviewed-by: Caleb Connolly --- drivers/misc/fastrpc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index f64781c3012f..abdd35b7c3ad 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1703,7 +1703,6 @@ static int fastrpc_get_info_from_dsp(struct fastrpc_user *fl, uint32_t *dsp_attr args[1].ptr = (u64)(uintptr_t)&dsp_attr_buf[1]; args[1].length = dsp_attr_buf_len * sizeof(u32); args[1].fd = -1; - fl->pd = USER_PD; return fastrpc_internal_invoke(fl, true, FASTRPC_DSP_UTILITIES_HANDLE, FASTRPC_SCALARS(0, 1, 1), args);