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 D0B4EC77B7A for ; Fri, 26 May 2023 12:38:21 +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=hj5FLSPdxejBzAUZCOKjqfIQY5qVJWnh9DvW5Gjib0w=; b=g0O6hvbJfjILxB ghyeng3DORHZ6Gg74OOCmHWHUAL9sSg9+eVexl8T2WSpvHwNnmIOADjj6MlURJSnVuIClV9EzzzNx jek6pIWhzS95iw7S04yoLpjv23tQP4+I9Adho+qRam4WHFoTAmvkXZD4/aOHviAHVknp5gX22tahd 7loYr2U/F9TYXW9rouVSKe8rV/AurCRglT3+/ew0UpKaxxP8+OIRcEsQ1zye5I4O+xxA3DyyOiMNT oCoWYfLMLCM069i0ESNeyEHJizMubAjKEDxC4ETjwUGTtTepJyP4+k7rG0Blh6FE1BD6AeGv2CX0s NYcsPsm02aOVz++ShUgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q2Whi-002VEL-0I; Fri, 26 May 2023 12:37:58 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q2Whg-002VDl-2Y; Fri, 26 May 2023 12:37:56 +0000 Date: Fri, 26 May 2023 05:37:56 -0700 From: Christoph Hellwig To: Arnaud POULIQUEN Cc: Christoph Hellwig , Bjorn Andersson , Mathieu Poirier , Jens Wiklander , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org Subject: Re: [RFC PATCH 1/4] tee: Re-enable vmalloc page support for shared memory Message-ID: References: <20230523091350.292221-1-arnaud.pouliquen@foss.st.com> <20230523091350.292221-2-arnaud.pouliquen@foss.st.com> <18a8528d-7d9d-6ed0-0045-5ee47dd39fb2@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <18a8528d-7d9d-6ed0-0045-5ee47dd39fb2@foss.st.com> 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 24, 2023 at 04:01:14PM +0200, Arnaud POULIQUEN wrote: > > As per the discussion back then: don't just blindly do the same dumb > > thing again and fix the interfae to actually pass in a page array, > > or iov_iter or an actually useful container that fits. > > > > I suppose your are speaking about this discussion: > https://lore.kernel.org/all/20221002002326.946620-3-ira.weiny@intel.com/ Yes. > > If I'm not mistaken, I should modify at tee_shm_register_kernel_buf API and > register_shm_helper inernal function, right? > > What about having equivalent of shm_get_kernel_pages in an external helper (to > defined where to put it), could it be an alternative of the upadate of the > tee_shm API? I think the fundamentally right thing is to pass an iov_iter to register_shm_helper, and then use the new as of 6.3 iov_iter_extract_pages helper to extract the pages from that. For the kernel users you can then simply pass down an ITER_BVEC iter that you can fill with vmalloc pages if you want. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel