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 48463C77B7E for ; Mon, 29 May 2023 07:21:54 +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:From:References:CC:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E4DLnoyXiH8bitzB/lKUSt3O0bj8xjqQzqozRHV/oNI=; b=J4+WQgzz5QaRJu 0nkaD/8XOgEQSmWZnW2rOEwIVb4DXcQ8owd0pSMA/SUN5v5tc1YYtdmWbhEsatwFjyd2o2CYFEhfX gtUUR0fUH8On+YDDLsI2zVwMgtiHkqmgklzQyvjKsnjWttZo4cy8tTOgqOQZKD33BIoTJhTQ277+Y Is1nmxMtQKW7njq3/6epvrqEgHYqqjeBOTTCzeIywaU45fdshYYJe0gzUemdivZDO/3btjpcPB+IV bJXQIBkQ4aXGXuuXbHtdw4PXy68wGwhZmLV3W9ZbxQWUd12TbYrmN6fxFFPwO+WOrWeyyHj0IfqJX 6ZHkHrqbjEcSslKM5zKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q3XC4-009WOV-0K; Mon, 29 May 2023 07:21:28 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q3XC1-009WNQ-0n for linux-arm-kernel@lists.infradead.org; Mon, 29 May 2023 07:21:26 +0000 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34T6TFJd022657; Mon, 29 May 2023 09:21:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=R7U12OfPWbuKgyybSdqlH6r+NAGEknQL5yOH75+Ki/o=; b=mWTzap13IJD3sGmFPOA13Bs0t5d4pbafMu/Co6c4yHZ6oMTKxRLdVzGEToWs0IGUroNE QP8XfIRu9woFIYgnX97OZuo95eM/AFE1JWze1wNiqzOKITvsJ1CLLDxfMBUTIlm+ZFZ/ FBrZ6qj9twziD55xCwawiWR/CNMciHj8YUaZa+z1Br7LL4tV528fSTPjtWU59aU92Db2 eOpkZZ6wwruqY0h27P58IQd+Br0quuuOXF5mYuYH6E/WG1ObvkGfGUCKr115WlqWnG/g QfRuciXKo3pg0Dsakv3Ll9/s+AK8ty6lMl0IzMFg6wbiuu/JxiG6F3KJJduixrcFexxJ SQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3quag27vxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 May 2023 09:21:05 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 03EAB100039; Mon, 29 May 2023 09:21:04 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id EEF0B2132FC; Mon, 29 May 2023 09:21:03 +0200 (CEST) Received: from [10.201.21.9] (10.201.21.9) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 29 May 2023 09:21:02 +0200 Message-ID: <312a7c7a-165c-eb17-b6af-4c708d33afb4@foss.st.com> Date: Mon, 29 May 2023 09:17:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [RFC PATCH 1/4] tee: Re-enable vmalloc page support for shared memory Content-Language: en-US To: Christoph Hellwig CC: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , , , , , 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> From: Arnaud POULIQUEN Organization: STMicroelectronics In-Reply-To: X-Originating-IP: [10.201.21.9] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-29_04,2023-05-25_03,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230529_002125_573930_9DF488B3 X-CRM114-Status: GOOD ( 20.65 ) 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 5/26/23 14:37, Christoph Hellwig wrote: > 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. > Thanks for the advice! Regards, Arnaud _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel