Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp749656pxb; Wed, 29 Sep 2021 08:56:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWA/ZkO3b0R0idPhzK0kR+fIQ+BWeemRdnaIKx9kLs4ViURta6W1qctIHYrDS/gyqW5X2B X-Received: by 2002:a17:906:39d8:: with SMTP id i24mr514180eje.49.1632931015067; Wed, 29 Sep 2021 08:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632931015; cv=none; d=google.com; s=arc-20160816; b=Q9Imv2i/qDmMCbK4H9IROK/9P+AWhFmF4QsFepOX04QFjqBtyvcRh0Lxy/WLdBixqt zIb5taSHo2fvrYUrX5K6FPIexMop0/mGbfXjMF0wwFgpRrrSnUsAuXIFC4SLlRQ8Z8kz sJryP24jVyrmsG/3VOLkgSQ+0pOvIKVOzt9W28z6EXVb6NyWILpuwCQFNcM3g+2IiLh9 9y+rk5oHxUf4qgfDCRGLQ4V2hWRzPBhwsCRHTmQlmCJd5q5TaSC+wj29c5NUSObi0pFl tDIVJohrvYeHWtbaGeQYncr/ydd3HqaBQExtEtgaMp5rQ8KbZrRIGqPf4xR2eBte5kZv WRIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=nfEwGjgggAw3RC5PjtAlfM1IIPoHD22gcfe9Wxip+W4=; b=U/99at/q986zIn6UK77KvXMEQlNyEQXQYA6teuj/BAEXtbun8Ben2jP6D3n4uSfc7q IxT63JcHlQO5DvJazpzHbqqe2UCtZwdfVDZmUY6p6cMGJZUjZZ7SRFnluOW1WVSJtmoF /D6FOh7Ve4z3LHjIEbZbfTh+BSogEqyI774BrPTtxiAumHC8ut4NXnVToGw9JEl6Jmun HJtc5crNjzkwc0j+KnOIOk6ehvwwecOWKTU9aAqWJ+TaZ5UbyPjkN/vLzTk6w+2pBTK4 c2SEAdAoiVwVU2pbyYxLKKKiLbY1QMl3ftWn7oTTj/Kw9AaLL1D7AkbgpIMNiAL4HzGA xbPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vlEcJVIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs3si388676ejc.368.2021.09.29.08.56.19; Wed, 29 Sep 2021 08:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vlEcJVIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245505AbhI2OIu (ORCPT + 99 others); Wed, 29 Sep 2021 10:08:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245316AbhI2OIr (ORCPT ); Wed, 29 Sep 2021 10:08:47 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28CFEC061755 for ; Wed, 29 Sep 2021 07:07:06 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id t8so4515305wrq.4 for ; Wed, 29 Sep 2021 07:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nfEwGjgggAw3RC5PjtAlfM1IIPoHD22gcfe9Wxip+W4=; b=vlEcJVIE2drS5FUj2os8Q6I6RHJy+sLfslE4hVThyUrlkUyZNKbyCS7VrO9nonp4OA 4AedMORen+4vtoyZLSSn1Mt0l2IJ8mxEyfxB22ilo6Byd0AgNjaoSFY/y/p6bnbbp1vC icAGmkWfHHj4rCUaVAufKqAHRtx/pt9EWjDI5ILj8F/POYe5D3T98/eSq5YMMa3lrwWD pju8Vm7Rj0d8rOIdA8eBftUbRTqolRTe4wQ+1gHPaS2Ui/tVu+e0uACvgf1tyBlqwQVH Fcz5RbXAGcX1npqMW36hwbJiQR3BUXFghiWO371sNa1d0R6+Cl3cNAYqR3A0pm1xnWOs ifeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nfEwGjgggAw3RC5PjtAlfM1IIPoHD22gcfe9Wxip+W4=; b=xV8dGRUDbJIAo9L9Pw7FsmUIKCav4phaXaBlnkhliM4INXUw0KRu3WJwuIzAAo8nuv amq9ayNSRA2gOpl8b5Tgw7YiG/NrUoL0yBws8fM1SWnr/nRRaNrSWjzS3/4ZfKRqY6vm l7g1Ub5KNtQJdgKR487aOmuK2wvcFsHFY9XFQu7hVjTRQYa48NbNrCtq4Rs7zEFxje7s ZTZWFcCXYp67R4Yo8R/zfDlHbdKQH5edQfR+G6+YlY/BJu1pHLVQOSkk8jXwWWr1bSes xAQPyEOLfQUkMPcSiF1nL7yChFlvMOvhahD4y6rt2aa0/iLcWcZuVXE4hHhCQSY6F7VR +7nw== X-Gm-Message-State: AOAM530RIGlvxK4WbpDCRZebBLghNBB3TqBCdaCVIZ9JdO46k9rTRFqm 8h75+I7vFHuM3VUvCLE0F3T8pUer1Gm3dQ== X-Received: by 2002:adf:d1b3:: with SMTP id w19mr23794wrc.152.1632924424787; Wed, 29 Sep 2021 07:07:04 -0700 (PDT) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id n68sm1774875wmn.13.2021.09.29.07.07.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Sep 2021 07:07:03 -0700 (PDT) Subject: Re: [PATCH 3/4] misc: fastrpc: Set channel as secure To: Jeya R , linux-arm-msm@vger.kernel.org Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, fastrpc.upstream@qti.qualcomm.com References: <1632485951-13473-1-git-send-email-jeyr@codeaurora.org> <1632485951-13473-4-git-send-email-jeyr@codeaurora.org> From: Srinivas Kandagatla Message-ID: <1ec4cd1a-8e73-6c6f-da70-1ce01212269e@linaro.org> Date: Wed, 29 Sep 2021 15:07:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <1632485951-13473-4-git-send-email-jeyr@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/09/2021 13:19, Jeya R wrote: > Set channel as secure based on domain ID and secure domain DT property. > All DSP domains other than CDSP are set as secure by default and for > CDSP domain, secure flag is set if property is added to DT file. > > Signed-off-by: Jeya R > --- > drivers/misc/fastrpc.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c > index 07c41a5..631713d 100644 > --- a/drivers/misc/fastrpc.c > +++ b/drivers/misc/fastrpc.c > @@ -216,6 +216,7 @@ struct fastrpc_channel_ctx { > struct miscdevice miscdev; > struct miscdevice securedev; > struct kref refcount; > + bool secure; > }; > > struct fastrpc_user { > @@ -1646,6 +1647,12 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) > if (!data) > return -ENOMEM; > > + if (domain_id != CDSP_DOMAIN_ID) > + data->secure = true; > + else > + data->secure = of_property_read_bool(rdev->of_node, > + "qcom,secure-domain"); > + This whole logic of marking domains secured based on dsp type needs some explanation. --srini > data->miscdev.minor = MISC_DYNAMIC_MINOR; > data->miscdev.name = devm_kasprintf(rdev, GFP_KERNEL, "fastrpc-%s", > domains[domain_id]); >