Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp63575pxb; Thu, 27 Jan 2022 15:09:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwk9t8jLiDaQq5wK9bO8SDWxUQYrf0dkwG9T2oWFB6jzMJdMGHsr+skSdnlK86eOtCqNV5h X-Received: by 2002:a17:906:58c5:: with SMTP id e5mr4880936ejs.526.1643324989506; Thu, 27 Jan 2022 15:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643324989; cv=none; d=google.com; s=arc-20160816; b=JvX1upNJN5zbQnz+diW6ZeVygQp+dwF54Sryh3eMjFQrzgR68u6CfiY4lCc1d/lWrv suJz++TC+KqY1nnq6ULbCi7vNL2u9QXHmIgGES430J02nV8aqeQTTxmuL9JxnM0fTpVf g1m04327EYy77sEYoSO1cZSxoVZ+1Mqinq6JaDT7G6wOWiq5L4ufIpQiJxtKs6OHjuA5 M4p+sLuKU6PLc/Ph/kyzqlUhgo3VerL/oXB/IPo0USvjkMz0Gk7+rt0m5HCBJAj7qDug 6JclqFfUeAcRfqsaJ+k46+NEN5QjQlFKtUVOGHFbHQMGv3Y17HOfqlU+tW2X9dbsev2E vZKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=mVxBAkWsQpPETTTC043ddBxh6xT5/MragtmZsS3czxs=; b=mJ0issiDQv3CZ9zOfzfwgegFoym2cY+IW2hcRrL9FEC6pcyjhko4hkmk6ZxwqNtEQU PqqhROwjDUnJRAorJEqTRi7+xMLGqovgCdAffARlMV1GxOQbeIW95eJVAySkDZE+OoGY Bnuginn6q1Ug7KnlXJTy8d1fji82Rbi6voqygwTpey8wflpSlkMvL0vxm+JrUqJpQtcQ lkukaHLgECNhnwjKRc4b5hFVrXHjn1orGol5MeioVUkGiQFg3hjZzHN8zwGt9o2tRj5i Ot9lqJ0zm3C0Y+OuhF7i3+gt184uItf55F2Z/WcfstCWDWpgGSUt32DSzNfY5yz6IISQ bu4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ev++BUaI; 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 gm1si2249183ejc.14.2022.01.27.15.09.03; Thu, 27 Jan 2022 15:09:49 -0800 (PST) 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=Ev++BUaI; 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 S241193AbiA0MjW (ORCPT + 99 others); Thu, 27 Jan 2022 07:39:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241186AbiA0MjW (ORCPT ); Thu, 27 Jan 2022 07:39:22 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E2FCC06173B for ; Thu, 27 Jan 2022 04:39:22 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id h20-20020a17090adb9400b001b518bf99ffso7427605pjv.1 for ; Thu, 27 Jan 2022 04:39:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mVxBAkWsQpPETTTC043ddBxh6xT5/MragtmZsS3czxs=; b=Ev++BUaIm5pi6ngoEhGe0N3rFzGd2uTb+8FgOKtOCRisKN40hbQWQxEVjcncYyF+kY htly4sXh0A8K1m9mLyi6x+oq7DAXq9chUWr1pHrh02IhL0FttyLxyiycEOdaxcpepa17 qggZESAwS4Z6FnjATKHp+UuXr6nwuasT7NYptzB+jakcQrUTSYLXe/9Q4x4OIV1iUkLw ktqH6X3os+muR6z7hQMwwkJEg4Xy7U8inbNUnVGW6aH4UecQOyLmL931BJX9ML2IcyZx WMfEqPhK75uQO5EMZNCSYCxRJgYuAldh6hHAoiNRUslmmg/eQ+S80ln9NAJyw1isgdDG ZXJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mVxBAkWsQpPETTTC043ddBxh6xT5/MragtmZsS3czxs=; b=IPVKhK8DmNjLdoAzPNAK8UUYT35Uv6V7GP7WlQNr0MYirjMTutcWGmPvvLYWIr5+ca f3SENy+URNHEJGNQIn8cZRK8AwTqChRls548kmhluvTOz3xPRZA5OaM2Yqm5XsUbRTQZ JkroJtnqCFGwkGNFHo4pgPhg8JrziK96i7EKv/8vOiGKJORap9FtVsLVLTn/w1DBJwWQ CJf2Z7VzOvpct33y1mtapfI0P33ZXNQw7RVYTwv7apdttlYC6pw+l2u/Pfcp8dJUsHD/ nfPtiuHC0WDRuiQDwOfwWCmw1rUPf4ykXAfWLEaAJe0iftSHdvuVsoeftvBRaQOewk8V JiZw== X-Gm-Message-State: AOAM533IXZsjWNYDMA7AHIZPIdCPaaCZORc4F6m7zq5CqgbNXw8iQdk7 8Fkj0BDUp2NAnRq4OyvhXbXsz+gjlWhrC6Paky4ZhQ== X-Received: by 2002:a17:903:41c9:: with SMTP id u9mr3036244ple.174.1643287161508; Thu, 27 Jan 2022 04:39:21 -0800 (PST) MIME-Version: 1.0 References: <20220125162938.838382-1-jens.wiklander@linaro.org> <20220125162938.838382-8-jens.wiklander@linaro.org> In-Reply-To: From: Jens Wiklander Date: Thu, 27 Jan 2022 13:39:10 +0100 Message-ID: Subject: Re: [PATCH v3 07/12] optee: use driver internal tee_contex for some rpc To: Sumit Garg Cc: linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, Herbert Xu , Devaraj Rangasamy , Rijo Thomas , David Howells , Tyler Hicks , stable@vger.kernel.org, Lars Persson Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 7:32 AM Sumit Garg wrote: > > +Lars > > Hi Jens, > > On Tue, 25 Jan 2022 at 21:59, Jens Wiklander wrote: > > > > Uses the new driver internal tee_context when allocating driver private > > shared memory. This decouples the shared memory object from its original > > tee_context. This is needed when the life time of such a memory > > allocation outlives the client tee_context. > > > > Fixes: 217e0250cccb ("tee: use reference counting for tee_context") > > Cc: stable@vger.kernel.org > > Reviewed-by: Sumit Garg > > Signed-off-by: Jens Wiklander > > --- > > drivers/tee/optee/ffa_abi.c | 17 +++++++++-------- > > drivers/tee/optee/smc_abi.c | 7 ++++--- > > 2 files changed, 13 insertions(+), 11 deletions(-) > > > > As this commit fixes multiple issues seen earlier due to pre-allocated > SHM cache in client's context. I think it makes sense to separate this > as a standalone fix with few bits from patch #6 to target 5.17 > release. As otherwise it will take a long path via 5.18 and then > backport to stable trees. In the meantime there can be other side > effects noticed similar to one from Lars. The few bits needed from #6 is actually the entire "optee: add driver private tee_context". I'll combine the two and send them as a separate patch, that way it's easier to keep track of what's needed for the stable trees. Thanks, Jens