From nobody Tue Oct 7 02:17:38 2025 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 0B46A1E0E14; Wed, 16 Jul 2025 13:29:33 +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=1752672575; cv=none; b=Z/ob0bfvSBtShIPypwjnj2ICvBdEe3SP0Xb0CsElqkJ6B/dkJB5fIVZTHfMJ2i6jVieX0AmxjTOKFnFWamZscKFsx5FZU8D5VEKwfcGkOqgOJ0Dfpquy8lM1NjU00D7iEfMLTWMsL9oIrGWFjcPWkPB5SdimGz2V+6AIdNL9o60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752672575; c=relaxed/simple; bh=/Qxf9OQgbNZ8lEPRverfoI6dauoHlXtB9fZPg+YyCkM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=E1zv/6fIC2dnX5yTAcHgcN5Li8TXawy0zHN6eWG90OUlW4I/klAWRLH81iOxXrU25relXWDjuj0NQR3KQkUwFVQ2ZqRiObAjehlrraG2vef83gWCWR8eE/iTFMwFzgPgnWvnbujSpJd2oXWtj+x7vHZwQm4uh0qYXTNKVBJAGss= 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=FnoME18f; 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="FnoME18f" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56GD7p2V020748; Wed, 16 Jul 2025 13:29:28 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= 14q04gf4fzv+dKpNp2BtEhm9YcLHNdKkIxGKHLV2BRk=; b=FnoME18fT9NVycrL JRFDLxmZclHeyAZ7FdudMpvBtNZ4pRiKsIlLvACCKsQqC9dlIwCOM+ec8lIrWZzl TCN9yxZhpSD9QkPP60Xh0BJrg3beQZf7QT0oFJhXAkRg92vsNBnsmOFrl6dgFhBp F5UadC0U5hrSK3XWxATiINqd1+OcjcQkVCOUh2YeXaJqJGnjf+aIYn1hdVdgwOos z0/KAnvFSEflE9vB/X4L1XVTNhFg9d+TpAsg9Ql3AP1e9RVKiGxpaIvjUWf/0dVf ZlxJMBdmuXrWWMKeDIYD2JfmhuOAqS7MSFfuThAPOQDFmcmGBbvsb9tnLD6qzzJn r5eLqA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47wqsy3vs8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:28 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56GDTRZ2026903 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:27 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; Wed, 16 Jul 2025 06:29:23 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu Subject: [PATCH v9 3/5] misc: fastrpc: Remove kernel-side domain checks from capability ioctl Date: Wed, 16 Jul 2025 18:58:34 +0530 Message-ID: <20250716132836.1008119-4-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250716132836.1008119-1-quic_lxu5@quicinc.com> References: <20250716132836.1008119-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: AW1haW4tMjUwNzE2MDEyMSBTYWx0ZWRfX3jREg1QB62Nc ibxov0TwYSCmw3Sw6IcqmbD7of0qMALHR9zsgr2glpbAEM9bYBUWvcKjO2ZcOx1bbqJpDgLwu9T +Js0x2Co/K4KM2i9BO1o+wnQu9vuzUq3Kw/qB4cbLboXZ5324xJt0PFGK4dtne2/Ozb5eAaZvse 2afxzKOLyUkJX6E8/oRT8VF2tHDFWoUhB+5HRNe6SvKGBYqmXYo9S83VcGeMzra8YIG5SGx0Egs 92xk7kd693b5FHzE9jNARnlAEAd/M6Ew4WjpaWiM1j6+2BZwo6NjJbTCYFpCfxF5QAE68pSyhyY J1VdFJgm3a7vNv87MUk+tHPYDa4EaaFdNGBav7jAKSYZOR40+D7VMbjnu6lKUDBwxCQYzMIgeKL 9JWGXganoVGpz61jCsHXDXo9nYCDjG8J/mHpTZK63Tf+NuRiVZS56OxnbNtTevwZuGxLCv7e X-Proofpoint-GUID: _t2Hdo8EmtXAZeQgLm9IHD4T3xdTnjlI X-Proofpoint-ORIG-GUID: _t2Hdo8EmtXAZeQgLm9IHD4T3xdTnjlI X-Authority-Analysis: v=2.4 cv=McZsu4/f c=1 sm=1 tr=0 ts=6877a938 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=AVwB9L8OO_vht6zXYJ0A: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-07-16_02,2025-07-16_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 suspectscore=0 spamscore=0 priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507160121 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. Signed-off-by: Ling Xu Reviewed-by: Dmitry Baryshkov Reviewed-by: Ekansh Gupta --- 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 378923594f02..495ac47e7f90 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