From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF5A1C77B75 for ; Wed, 17 May 2023 09:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IBTXKqI0AnDNQmnP9INC8Gz1GQYAB+rJy3hTVqtj/Ng=; b=R9m1Bz6sCNb5bY VRxfHLC/TYZMQ/9K9iAqJcGLapTr7N1EXTyG8228h60fpDcjhdepXThH7c3vvfewIGPQLKrnPKfCy IQVd4AHnPudCWMGLbCgxoIBHcfTM2TDwcKzx45avyB4U0P2sqwD4xeDLAn4AZU0lLSu04GgtWR8Gj QuBR/04eq3dDkjKT69RCVREs6rzIFla/5hnOpTicDwGHFAV2m/KUuQDCsL6LwHxK+v4gV5+SgpTQK 2XtQbDL3xHzKXVwvXxzv3w+67tKFQY48w1r6Bl9VQpa5oGw4NOOamHOJJUJiBbNBE8bvcTyJeEtpW /BWFfSDtq/rLaHMWiTuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzDZr-0095Au-1t; Wed, 17 May 2023 09:36:11 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pzDZp-0095AA-1E; Wed, 17 May 2023 09:36:09 +0000 Date: Wed, 17 May 2023 02:36:09 -0700 From: Christoph Hellwig To: Sumit Garg Cc: Christoph Hellwig , Xiaoming Ding , Jens Wiklander , Matthias Brugger , AngeloGioacchino Del Regno , op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, fei.xu@mediatek.com, srv_heupstream@mediatek.com, linux-mm@kvack.org Subject: Re: [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm Message-ID: References: <20230517031856.19660-1-xiaoming.ding@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 17, 2023 at 02:56:13PM +0530, Sumit Garg wrote: > Do you mean a pinned user-space page can be paged out automatically? No, pinned pages can't be paged out. But a short term pin implies it will be release after a short delay, and it is feasible for wait for the pin to go away. For a long term pin waiting is not an option, and anyone wanting to do something with the pinned page that requires it to not be pinned must simply give up. > Just FYI, the underlying use-case for TEE registered shared memory is > that the references to pinned pages are provided to TEE implementation > to operate upon. This can happen over multiple syscalls and we want > the pinned pages to be always in RAM as otherwise the physical > addresses may change if they are paged out in between. That's a very use clear case for a long term pin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel