Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4313933ybc; Fri, 15 Nov 2019 02:37:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxGo7Tul1GqvSHDsQaUcnovJN9BBAxqwzUZObonbcgtF6f0WzGJ0E+X7+QtNfNG322TpCwT X-Received: by 2002:a17:906:70e:: with SMTP id y14mr12766226ejb.70.1573814249427; Fri, 15 Nov 2019 02:37:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573814249; cv=none; d=google.com; s=arc-20160816; b=MXxL4om/q3g4Y1qThFrGqP+11XQNFLOC1hDMkTAq2mxy6U55odWkPoXDqa9Oh7ET4i yIHWjqClZMjmiFUI8PdWZqiRrnha402Ws1IfvCBNnQayJwfqocTzHIwWpGhaGvAMz1X/ OrtnVZhOzd0zfpND5qWAC7NfuV332aBFVY73IxMlaygXWnxv/3G6VD2+fMpfzHnR1KjE LyofNQwFbdrJM/In1sG57Bu/5QMwsJTskeU3TRldZplgwJP8dc9z2EtFUi/9+8qPlos0 2gK8L73n+6hHb0fUWPIHd/8M6F8UjA1Uq2EJ/qrE+amXvKoYZoPCJ3lJX1NuLtwqdVZo tk5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=f+PSnzKtja1Ax7hxE68546cbLixgKvyFJbg+bbzyNhg=; b=GJrITTpBeEDbI9SMQaOZgxWcc6o0FHAdqjJdc7qcLb5edY9tGg6JHgX8pSy4bm9QZ9 Lj7fNcq1HPmgwxg5bx/ZQafXrAPSV4zxH4rnGzx5gv5K9bak7AKm7bRD8B/8+eSbtwYl buq2Vus4vRcvceVwRGpC/n9FDIxqfs8jA6CZorek6Iy9qOw3Ae3StpT9ZQK/BflTcuig bIBRt/6FhBvdYqXxPguBF324cwG5fh6Wj2IySYXcKOskqIyWIr6Z4hOepDSvQ3M5kLDb Bcfhj8tPLYqkFdhqFg3qq1JxefNl8LX71hFC6WaxEDKkiSLSsUANCVyucQ7qjBxZo0gG QXew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UMHsl8nl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id jx9si5035446ejb.32.2019.11.15.02.37.03; Fri, 15 Nov 2019 02:37:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UMHsl8nl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727220AbfKOKfs (ORCPT + 99 others); Fri, 15 Nov 2019 05:35:48 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:36339 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727022AbfKOKfs (ORCPT ); Fri, 15 Nov 2019 05:35:48 -0500 Received: by mail-lf1-f66.google.com with SMTP id r14so1014048lff.3 for ; Fri, 15 Nov 2019 02:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f+PSnzKtja1Ax7hxE68546cbLixgKvyFJbg+bbzyNhg=; b=UMHsl8nlmA66VaV3D9wHoJhMCfUadP4SBWVwxFDj5aPll1Sff7hPsLyOB9PDLxedV+ +bFLeR70XvA14r8cpiwPF3RKDnk1bzILLFVHyx2qEfrn+3LB0DR2Rou4kZVDe0de0xGi vlSgH+f7xchJknSannwxUqmxFjPSN8X4qmltznf5JjY52rbHwM2OOWmMzDnNR5i/5ieV JdgnUBZYRz1ikHJOM5h1JShNdGUIDGDMkBAR1HyVaemzNbZON5m+q9bh8YhY4ziYI3J6 QqhB7zw0nxrioPQ94srgpnk69V0cVivjw+8z2p+SsK9KFXjUbws0ff3/VfjOLQ8ideZD pPXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f+PSnzKtja1Ax7hxE68546cbLixgKvyFJbg+bbzyNhg=; b=iOcnjTeLqbNHcRiRGTPqnxZ6xuBZhWfGWMtV1I94NWBYNmT7bqHfXsDI4+R0aVeJzi +3JMkZnsVP1CPM3DsZI7fTg5al8oJZWmM+55p+SChVhtK2IO5lNanEX9FS14qu+MqIoy vTdFEwmnDHN6KYmvlZ7hDXHLPj8BXIV5bT2xANPVMkyPy3UClFvJvtTB+512sozprBLJ qR46ksyIIA/8qRIpttqhpAO59WueLTWMxn+UaZ4Sl6gyI9YmuoOyF8xmwdVCwPhD0bWe h5mVybqc0VlVckbWRgmto+Ew1oArC47PoChvv3JvDSV3aTjejHLx8XQiQ7bE5dkPNXcc ECsw== X-Gm-Message-State: APjAAAWI2SF1d26t97Oe9lWgf7gNYJUU6ekvt1mSkeRl5gqjljMmrzhV 0nx+8r/TS6cmlHIDMB2/kPFiTw== X-Received: by 2002:ac2:5a11:: with SMTP id q17mr10922147lfn.41.1573814144566; Fri, 15 Nov 2019 02:35:44 -0800 (PST) Received: from jax (h-249-223.A175.priv.bahnhof.se. [98.128.249.223]) by smtp.gmail.com with ESMTPSA id 70sm4317905lfh.86.2019.11.15.02.35.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Nov 2019 02:35:44 -0800 (PST) Date: Fri, 15 Nov 2019 11:35:42 +0100 From: Jens Wiklander To: Sumit Garg Cc: Volodymyr_Babchuk@epam.com, tee-dev@lists.linaro.org, linux-kernel@vger.kernel.org, etienne.carriere@linaro.org Subject: Re: [Patch v2] tee: optee: Fix dynamic shm pool allocations Message-ID: <20191115103541.GA21189@jax> References: <1573212434-25526-1-git-send-email-sumit.garg@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1573212434-25526-1-git-send-email-sumit.garg@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sumit, On Fri, Nov 08, 2019 at 04:57:14PM +0530, Sumit Garg wrote: > In case of dynamic shared memory pool, kernel memory allocated using > dmabuf_mgr pool needs to be registered with OP-TEE prior to its usage > during optee_open_session() or optee_invoke_func(). > > So fix dmabuf_mgr pool allocations via an additional call to > optee_shm_register(). > > Also, allow kernel pages to be registered as shared memory with OP-TEE. > > Fixes: 9733b072a12a ("optee: allow to work without static shared memory") > Signed-off-by: Sumit Garg > --- > > Changes in v2: > Merge the dependency patch: https://lkml.org/lkml/2019/10/31/431 > Looks good, I'm picking this up. Thanks, Jens