Message ID | 1686155407-20054-2-git-send-email-quic_ekangupt@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp354573vqr; Wed, 7 Jun 2023 10:13:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ET7lfuHMNFEOBt992l2Y7epLhMWA3VnMQY4yb9GzV/rDkfV+8RG+mF4ngMPXIV+poCT/Q X-Received: by 2002:a17:902:c406:b0:1b0:49e1:6dc4 with SMTP id k6-20020a170902c40600b001b049e16dc4mr3446302plk.56.1686158034251; Wed, 07 Jun 2023 10:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686158034; cv=none; d=google.com; s=arc-20160816; b=ToP9UPrnyK8X5q5gBf1SX99IJfx/STcJFletbq78/kUu0XpPp0HDSAz45w7FUFsGIk 2IMs9y5E2+YkcSQ/hPQ4gSaGAqCcl4mgAczM+KoDvHgkKtu8rK9qi9d9VEUAJ0ejZ5d/ +xirUgxqF5owiA4s2tvptxHa+ASxjvFfvJGTNRm8aSREnKq89Wgsapn63KaudmETh2Ys aRH4NKTWtRKR/fxYCSz6mrNdLJ6uzHkCJVnmm8CvqDg4PH23F+x1aunWaAoANyLp/hXT +yk2qKztidkNX8ZHRGTYYuXIxlucIZDXOdO3Ib2ntgxo2MRwcl3tEkRpYvQXdzO+fWXj UUXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6WGzFGQ5zbxok2QL+v8A5MEM2UwtuU/HImhH6EHxrwM=; b=RiudRzLFseAUW4BoEcrqalmE54SqhlvedddB04ZyHoIBFaat5ayVb8fTe1yZbLreh9 OzEDD4Ttwc35dt9E9qwvqWuwRnOu0cpH4BX+luXHjbjnDiox+2b+blkWinRnLf/2QlsB 5/pLI0Hv2c+4J2G0jQBXPh7dIYLLM6VWaX3qwEaiYZHV+tQqUzc3wwajMXzV9/yhbHTa e+53Wt+fgbVfMh/zpiZqx5k+NBQvx83hHXH3PYF4XK9v27sRvPff8WUUvZVD0gfPhIg0 z++7q2FKCSmjzhFbyP0ooaH096SVy2n3XyEEkUrCcr6mVU6WFyJC7s35hlL539MZ3A/c ML3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EjVOWuFf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020a170902650200b0019926d9c734si8864373plk.602.2023.06.07.10.13.38; Wed, 07 Jun 2023 10:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EjVOWuFf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbjFGQbN (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 12:31:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232272AbjFGQa6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 12:30:58 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB54819BB; Wed, 7 Jun 2023 09:30:40 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 357EqDuY015824; Wed, 7 Jun 2023 16:30:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=6WGzFGQ5zbxok2QL+v8A5MEM2UwtuU/HImhH6EHxrwM=; b=EjVOWuFfubS/gbAtxNtiluuUqSqd/B8REB2jwZtNOp5MUu3Ii3MmuiSZI55Z89zRaV9H ER0Y/XbbXqRziHDCZjTCsjOFrX3hZZ+l+ymj3Vr/RnmAqj0uP4SFbQU9ZSNKtFhky0z1 IhSNhy56PmA098FdMRrTs7etAsDGZmev5NGURdrbvzEHM6ojc09oTAptiWRRaUcRQpIm aLV6lS9eCwC2KQ2YFfiJFs0/FUOuxVYN94g/7ytmHdbWIO4OBB/KU3j04XVC+mnByDxN tvNTLBC1bECYxTEMq9dvjGCSyGGzjft1bczmFqUOcrDcGiAJ2yDPYjKnOnSrY73KPa8Q mw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r2a6ytcuf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jun 2023 16:30:22 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 357GULHZ032203 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 7 Jun 2023 16:30:21 GMT Received: from ekangupt-linux.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.986.42; Wed, 7 Jun 2023 09:30:17 -0700 From: Ekansh Gupta <quic_ekangupt@quicinc.com> To: <srinivas.kandagatla@linaro.org>, <linux-arm-msm@vger.kernel.org> CC: Ekansh Gupta <quic_ekangupt@quicinc.com>, <ekangupt@qti.qualcomm.com>, <gregkh@linuxfoundation.org>, <linux-kernel@vger.kernel.org>, <fastrpc.upstream@qti.qualcomm.com>, <agross@kernel.org>, <andersson@kernel.org>, <konrad.dybcio@linaro.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <devicetree@vger.kernel.org> Subject: [RESEND PATCH v1 1/2] dt-bindings: misc: fastrpc: add fastrpc group IDs property Date: Wed, 7 Jun 2023 22:00:06 +0530 Message-ID: <1686155407-20054-2-git-send-email-quic_ekangupt@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1686155407-20054-1-git-send-email-quic_ekangupt@quicinc.com> References: <1686155407-20054-1-git-send-email-quic_ekangupt@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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-ORIG-GUID: egjENbV0krTsHU3f_TJzBDsqBEHX5YvC X-Proofpoint-GUID: egjENbV0krTsHU3f_TJzBDsqBEHX5YvC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-07_07,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 mlxscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070140 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768064846999016464?= X-GMAIL-MSGID: =?utf-8?q?1768064846999016464?= |
Series |
Privileged process support on remote subsystem
|
|
Commit Message
Ekansh Gupta
June 7, 2023, 4:30 p.m. UTC
Add "qcom,fastrpc-gids" property to the list of optional properties.
This property contains the list of privileged group IDs which is
used to offload process to remote subsystem with increased privileges.
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
---
Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On Wed, 07 Jun 2023 22:00:06 +0530, Ekansh Gupta wrote: > Add "qcom,fastrpc-gids" property to the list of optional properties. > This property contains the list of privileged group IDs which is > used to offload process to remote subsystem with increased privileges. > > Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> > --- > Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Error: Documentation/devicetree/bindings/misc/qcom,fastrpc.example.dts:36.17-18 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/misc/qcom,fastrpc.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1512: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/1686155407-20054-2-git-send-email-quic_ekangupt@quicinc.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 07/06/2023 18:30, Ekansh Gupta wrote: > Add "qcom,fastrpc-gids" property to the list of optional properties. > This property contains the list of privileged group IDs which is > used to offload process to remote subsystem with increased privileges. Why or when anyone would use this property? > > Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> > --- > Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml > index 1ab9588..2a2124f 100644 > --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml > +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml > @@ -57,6 +57,11 @@ properties: > Virtual machine IDs for remote processor. > $ref: "/schemas/types.yaml#/definitions/uint32-array" > > + qcom,fastrpc-gids: > + description: > + Group IDs for fastrpc. You just pasted here property name. It does not help me to understand what's this. Explain in description. > + $ref: "/schemas/types.yaml#/definitions/uint32-array" Drop quotes. missing min/maxItems. > + > "#address-cells": > const: 1 > > @@ -120,6 +125,7 @@ examples: > qcom,glink-channels = "fastrpcglink-apps-dsp"; > label = "sdsp"; > qcom,non-secure-domain; > + qcom,fastrpc-gids = <2908> Eh, what does 2908 stands for? Why not 3012 or 1842? How anyone can figure this out? Best regards, Krzysztof
On 6/7/2023 10:51 PM, Rob Herring wrote: > > On Wed, 07 Jun 2023 22:00:06 +0530, Ekansh Gupta wrote: >> Add "qcom,fastrpc-gids" property to the list of optional properties. >> This property contains the list of privileged group IDs which is >> used to offload process to remote subsystem with increased privileges. >> >> Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> >> --- >> Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 6 ++++++ >> 1 file changed, 6 insertions(+) >> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > Error: Documentation/devicetree/bindings/misc/qcom,fastrpc.example.dts:36.17-18 syntax error > FATAL ERROR: Unable to parse input tree > make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/misc/qcom,fastrpc.example.dtb] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1512: dt_binding_check] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/1686155407-20054-2-git-send-email-quic_ekangupt@quicinc.com > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema. > Thanks for helping with this information. I'll check and re-submit the patch.
On 6/8/2023 12:14 AM, Krzysztof Kozlowski wrote: > On 07/06/2023 18:30, Ekansh Gupta wrote: >> Add "qcom,fastrpc-gids" property to the list of optional properties. >> This property contains the list of privileged group IDs which is >> used to offload process to remote subsystem with increased privileges. > > Why or when anyone would use this property? > This property can be used for the use cases which requires prioritized access to remote subsystem resources. >> >> Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> >> --- >> Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml >> index 1ab9588..2a2124f 100644 >> --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml >> +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml >> @@ -57,6 +57,11 @@ properties: >> Virtual machine IDs for remote processor. >> $ref: "/schemas/types.yaml#/definitions/uint32-array" >> >> + qcom,fastrpc-gids: >> + description: >> + Group IDs for fastrpc. > > You just pasted here property name. It does not help me to understand > what's this. Explain in description. > I'll add more details here when I re-submit the patch. >> + $ref: "/schemas/types.yaml#/definitions/uint32-array" > > Drop quotes. > > missing min/maxItems. > I'll update this in v2. Thanks for reviewing. >> + >> "#address-cells": >> const: 1 >> >> @@ -120,6 +125,7 @@ examples: >> qcom,glink-channels = "fastrpcglink-apps-dsp"; >> label = "sdsp"; >> qcom,non-secure-domain; >> + qcom,fastrpc-gids = <2908> > > Eh, what does 2908 stands for? Why not 3012 or 1842? How anyone can > figure this out? > There is no hard restriction for this value to be 2908, it can be anything. Just that the process which needs a privileged offload to any remote subsystem should have the same gid which is defined here, whether it is 2908 or anything else. The intention of having 2908 in example is because this is used in Android world where any process running with 2908 gid can offload as privileged process to remote subsystem. Ref: https://review.lineageos.org/c/LineageOS/android_device_motorola_sm7250-common/+/305612/4/config.fs But, it can be set to anything just that the process also needs to adapt to this gid. Thanks, Ekansh > Best regards, > Krzysztof >
On 08/06/2023 12:36, Ekansh Gupta wrote: > > > On 6/8/2023 12:14 AM, Krzysztof Kozlowski wrote: >> On 07/06/2023 18:30, Ekansh Gupta wrote: >>> Add "qcom,fastrpc-gids" property to the list of optional properties. >>> This property contains the list of privileged group IDs which is >>> used to offload process to remote subsystem with increased privileges. >> >> Why or when anyone would use this property? >> > This property can be used for the use cases which requires prioritized > access to remote subsystem resources. This does not help me much yet.... Which systems or boards need prioritized access? >>> >>> Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> >>> --- >>> Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml >>> index 1ab9588..2a2124f 100644 >>> --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml >>> +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml >>> @@ -57,6 +57,11 @@ properties: >>> Virtual machine IDs for remote processor. >>> $ref: "/schemas/types.yaml#/definitions/uint32-array" >>> >>> + qcom,fastrpc-gids: >>> + description: >>> + Group IDs for fastrpc. >> >> You just pasted here property name. It does not help me to understand >> what's this. Explain in description. >> > I'll add more details here when I re-submit the patch. >>> + $ref: "/schemas/types.yaml#/definitions/uint32-array" >> >> Drop quotes. >> >> missing min/maxItems. >> > I'll update this in v2. Thanks for reviewing. >>> + >>> "#address-cells": >>> const: 1 >>> >>> @@ -120,6 +125,7 @@ examples: >>> qcom,glink-channels = "fastrpcglink-apps-dsp"; >>> label = "sdsp"; >>> qcom,non-secure-domain; >>> + qcom,fastrpc-gids = <2908> >> >> Eh, what does 2908 stands for? Why not 3012 or 1842? How anyone can >> figure this out? >> > There is no hard restriction for this value to be 2908, it can be > anything. Just that the process which needs a privileged offload to any > remote subsystem should have the same gid which is defined here, whether > it is 2908 or anything else. > > The intention of having 2908 in example is because this is used in > Android world where any process running with 2908 gid can offload as > privileged process to remote subsystem. > Ref: > https://review.lineageos.org/c/LineageOS/android_device_motorola_sm7250-common/+/305612/4/config.fs > > But, it can be set to anything just that the process also needs to adapt > to this gid. So this is process ID? Group ID? GID? Why would you ever encode group IDs, which change in every installation, or process IDs, which change every boot, in DTS common for all devices? This is not a DT property. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml index 1ab9588..2a2124f 100644 --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml @@ -57,6 +57,11 @@ properties: Virtual machine IDs for remote processor. $ref: "/schemas/types.yaml#/definitions/uint32-array" + qcom,fastrpc-gids: + description: + Group IDs for fastrpc. + $ref: "/schemas/types.yaml#/definitions/uint32-array" + "#address-cells": const: 1 @@ -120,6 +125,7 @@ examples: qcom,glink-channels = "fastrpcglink-apps-dsp"; label = "sdsp"; qcom,non-secure-domain; + qcom,fastrpc-gids = <2908> #address-cells = <1>; #size-cells = <0>;