From nobody Sat Oct 4 22:37:04 2025 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 D519629CB3C; Wed, 13 Aug 2025 03:07:25 +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=1755054447; cv=none; b=Qm9CrMiQ5nzfLCbSCUGhi3p4Moo4HK0OIjt4L55n4fPPb7zaR9TXbDRVmWcKuA79Abv1pETLf0YOqy6W+R3efgdzCCqPtqSx8RKAjh9Npx8m5Vjgrm0GiEtHamG/bdvA7IYouh2BGJgfcCmApTpibfKfZqvfhcnVViP8CGnFoxc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755054447; c=relaxed/simple; bh=+DbJ8vVk3Eeo+k/16WN6hNxNCFyC6LipNDuT7pPGXgs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iUJz16PCLCuOT+7/lUhSfrtjYVAFQY0Ux7CYPq+mE0UQK/fAbuvHdYIkzBe2XFEHjqj4HJTI50KjfBCfBV9Kr6uyjQrzsEUuIAJfI89ad2DOof64bZztgV3gZi+ydfBljR4ifgaoNoGBqt0XNjvDZK0J/J+lP1F5onG8R1IVxjI= 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=mPrP5JC4; arc=none smtp.client-ip=205.220.180.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="mPrP5JC4" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57D01ufm029045; Wed, 13 Aug 2025 03:07:19 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= 8PEKPUTP6LKmwaWly+WXM2OUEQeeuLc9kEHmal8yQ4o=; b=mPrP5JC4Efh+/R5N xiC96o5ImJ+igRoU3RY5ooAMYxyYNYecty6E6gK3DdcQElP//GkYBwJfJkDDwmtF V0ZmHDNIuYqFvdN5sKq+g/eSWU+a28lZ5s6IYCQqTlRZXrZaGSQO1tlJEpfkMe8C 2HwG4AlWENjDuHVbWpQrNzGW+/zcKVq5Vfwl1CRafjqGQhlmd2kSNRp0c0ayV7gk 2pFkpsrm5FTa9b+va6KT0jr9fm08JbrI5ss0VyA5cfZl7+7+cKVB2z0X7WGqnPEm pJVtnFSp3lhhIvJIlrEJ5hnydq7iETI3wN8qW8EreW9chpCXhgfEmrwB2AuOUe6N deXBqw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48g5hma5db-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Aug 2025 03:07:19 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 57D37ImW030266 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Aug 2025 03:07:18 GMT Received: from hu-lxu5-sha.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 12 Aug 2025 20:07:14 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Dmitry Baryshkov Subject: [PATCH v10 3/5] misc: fastrpc: Remove kernel-side domain checks from capability ioctl Date: Wed, 13 Aug 2025 08:36:36 +0530 Message-ID: <20250813030638.1075-4-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250813030638.1075-1-quic_lxu5@quicinc.com> References: <20250813030638.1075-1-quic_lxu5@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODEyMDExOSBTYWx0ZWRfX2kYzrXVFyL21 2PkD6Uq4aOOuVpjj/VULiE0yJL8KOUfr2FBSbjyHuUNsUAa4hZ4G+6l/JbIo08hVkiz+FzDzorE eVhuKR8UkrdGGarqc5no3S+YsENjHG/pol/MaNjRC0YaMeh86hQMWmRd0/7Adw7HGYLwLjOtYVr 2hoRnYV+MZYjOXJd3/wHzL4bDTIac7sRU1HwYmU6vpj6rzEUfoTimNujtNK052duPGHH6ctZ/Qd TwgrTB5Bwhh+ed8MCNQ5T6NZnITprIU5nNgFl/0HFS1J4uhQHcTDmTlRlQ/w637+x8gjdVgfYEj bYyJFk+mKS6Ql+QvRVxf/YnUU1VIJLGaLENTB9IXDVH4d1JIICyuNXIN+ukNPMD5ImoqCLyTpaM zR87Elar X-Proofpoint-GUID: tpOpRRMfQrbWGEvz0xYBcIFsUk6ZfWzH X-Proofpoint-ORIG-GUID: tpOpRRMfQrbWGEvz0xYBcIFsUk6ZfWzH X-Authority-Analysis: v=2.4 cv=d4b1yQjE c=1 sm=1 tr=0 ts=689c0167 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=2OwXVqhp2XgA:10 a=EUspDBNiAAAA:8 a=COk6AnOGAAAA:8 a=MG1_WR4Zzsb28POLZ0YA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-12_08,2025-08-11_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 spamscore=0 phishscore=0 adultscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508120119 Content-Type: text/plain; charset="utf-8" Domain ID in the uAPI is misleading. Remove checks and log messages related to 'domain' field in capability structure. Update UAPI to mark the field as unused. Reviewed-by: Dmitry Baryshkov Reviewed-by: Ekansh Gupta Signed-off-by: Ling Xu --- drivers/misc/fastrpc.c | 14 +------------- include/uapi/misc/fastrpc.h | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 53e88a1bc430..2dfcf8a66806 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1723,7 +1723,6 @@ static int fastrpc_get_info_from_kernel(struct fastrp= c_ioctl_capability *cap, uint32_t attribute_id =3D cap->attribute_id; uint32_t *dsp_attributes; unsigned long flags; - uint32_t domain =3D cap->domain; int err; =20 spin_lock_irqsave(&cctx->lock, flags); @@ -1741,7 +1740,7 @@ static int fastrpc_get_info_from_kernel(struct fastrp= c_ioctl_capability *cap, err =3D fastrpc_get_info_from_dsp(fl, dsp_attributes, FASTRPC_MAX_DSP_ATT= RIBUTES); if (err =3D=3D DSP_UNSUPPORTED_API) { dev_info(&cctx->rpdev->dev, - "Warning: DSP capabilities not supported on domain: %d\n", domain); + "Warning: DSP capabilities not supported\n"); kfree(dsp_attributes); return -EOPNOTSUPP; } else if (err) { @@ -1769,17 +1768,6 @@ static int fastrpc_get_dsp_info(struct fastrpc_user = *fl, char __user *argp) return -EFAULT; =20 cap.capability =3D 0; - if (cap.domain >=3D FASTRPC_DEV_MAX) { - dev_err(&fl->cctx->rpdev->dev, "Error: Invalid domain id:%d, err:%d\n", - cap.domain, err); - return -ECHRNG; - } - - /* Fastrpc Capablities does not support modem domain */ - if (cap.domain =3D=3D MDSP_DOMAIN_ID) { - dev_err(&fl->cctx->rpdev->dev, "Error: modem not supported %d\n", err); - return -ECHRNG; - } =20 if (cap.attribute_id >=3D FASTRPC_MAX_DSP_ATTRIBUTES) { dev_err(&fl->cctx->rpdev->dev, "Error: invalid attribute: %d, err: %d\n", diff --git a/include/uapi/misc/fastrpc.h b/include/uapi/misc/fastrpc.h index f33d914d8f46..c6e2925f47e6 100644 --- a/include/uapi/misc/fastrpc.h +++ b/include/uapi/misc/fastrpc.h @@ -134,7 +134,7 @@ struct fastrpc_mem_unmap { }; =20 struct fastrpc_ioctl_capability { - __u32 domain; + __u32 unused; /* deprecated, ignored by the kernel */ __u32 attribute_id; __u32 capability; /* dsp capability */ __u32 reserved[4]; --=20 2.34.1