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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25394C28B30 for ; Thu, 20 Mar 2025 11:17:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03A5F280006; Thu, 20 Mar 2025 07:17:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F2939280003; Thu, 20 Mar 2025 07:17:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF234280006; Thu, 20 Mar 2025 07:17:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id BFD85280003 for ; Thu, 20 Mar 2025 07:17:54 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id DC3ECC1254 for ; Thu, 20 Mar 2025 11:17:55 +0000 (UTC) X-FDA: 83241679710.03.7CBBA6F Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf24.hostedemail.com (Postfix) with ESMTP id 3FA9118000F for ; Thu, 20 Mar 2025 11:17:52 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of linyunsheng@huawei.com designates 45.249.212.190 as permitted sender) smtp.mailfrom=linyunsheng@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1742469474; a=rsa-sha256; cv=none; b=iOWnZQO5/PDgRzgagwHG5CXWIgDHeKlqRubXTtwl19xmHGaOPUvBLJhz6OrmWuM0r1wT94 IW5V5c0Ld+6eokVWOVvfoNzfSBdzZ/Ohfp+TMOxGqLulLpJyjFrJFaWgWo+DFDKklsKl5w bNYrPDhlKrwrxdwc/T9CfqZvbojmGXo= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of linyunsheng@huawei.com designates 45.249.212.190 as permitted sender) smtp.mailfrom=linyunsheng@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1742469474; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pUxu/J1JTBpvWD4cI84QQKAGQdyKrOKaGFTsgZkmAnQ=; b=oJIbAV/eVkTWA8sKyaErLTt+UnX8I5eZyu368OPXkSbptkXhOvgGT7n2nrXWXwwjjlj+QN tRmG3th5Aek69CLMGbKbM4lOt+mEifhhx3dqnNyKV4KHHlfy3j1MsnuuOSyHVcTbzZELsw pNKF++JjDSJeu7japTebqxsBwdIdbGU= Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4ZJNJT6YtXz2Cd0j; Thu, 20 Mar 2025 19:14:33 +0800 (CST) Received: from dggpemf200006.china.huawei.com (unknown [7.185.36.61]) by mail.maildlp.com (Postfix) with ESMTPS id 4B464180216; Thu, 20 Mar 2025 19:17:48 +0800 (CST) Received: from [10.67.120.129] (10.67.120.129) by dggpemf200006.china.huawei.com (7.185.36.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 20 Mar 2025 19:17:47 +0800 Message-ID: <7a604ae4-063f-48ff-a92f-014d1cf86adc@huawei.com> Date: Thu, 20 Mar 2025 19:17:47 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 3/3] page_pool: Track DMA-mapped pages and unmap them when destroying the pool To: =?UTF-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Yunsheng Lin , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Saeed Mahameed , Leon Romanovsky , Tariq Toukan , Andrew Lunn , Eric Dumazet , Paolo Abeni , Ilias Apalodimas , Simon Horman , Andrew Morton , Mina Almasry , Yonglong Liu , Pavel Begunkov , Matthew Wilcox , Robin Murphy , IOMMU , , , , CC: , , , , Qiuling Ren , Yuying Ma References: <20250314-page-pool-track-dma-v1-0-c212e57a74c2@redhat.com> <20250314-page-pool-track-dma-v1-3-c212e57a74c2@redhat.com> <87jz8nhelh.fsf@toke.dk> <7a76908d-5be2-43f1-a8e2-03b104165a29@huawei.com> <87wmcmhxdz.fsf@toke.dk> <87r02ti57p.fsf@toke.dk> Content-Language: en-US From: Yunsheng Lin In-Reply-To: <87r02ti57p.fsf@toke.dk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.120.129] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemf200006.china.huawei.com (7.185.36.61) X-Rspam-User: X-Rspamd-Queue-Id: 3FA9118000F X-Rspamd-Server: rspam05 X-Stat-Signature: mtj7xbwbtx9sjd5jkuc4gmbe11oj1chj X-HE-Tag: 1742469472-758781 X-HE-Meta: U2FsdGVkX19asnvZm2H1gz0DrePI9B0c6bN8IZcSTYsBz9K5w9CuCuwUmbfAs6yD7UFOUd94xOUbwZxpkuuehsu9LIQnvZi1kJ1/NhKVE+9WRzMunHyOHRehJFYw6okovFnWnGsH49Jv/JwqiWFz+54kKEDZ/KcknHvooGvxiufprMDcfEkQHXUoNz6lVdOGxVy5KhC1JB12z6rLezoRg07AVZ8p+nffZOZLBhyeLURYyejqvUU0i8rWQnErPeEQHh22M3bDZ/SPmPAtfb/LKCzmP5oRn+eXfwkxfiAwVgUgEquA13WPrGhy9aOEtvItO4krMt6meAA2ZWVCvI+2jbi5rUm1XnNceZIDbj92LvL/D+H8YzD2oXpoL4blhxmhYQLQtciEDRPYGW/ixinNHdMKCWTYpfMDAMds8chEte4/TWTucSAW3q7oQ0h6b4lWM+V+gqbP9U4DWdeasbl8NPv33tDLeMK5RQVvoDzur1d/YSuMzODZRtw2eTxeeqxNKw9fguaJmKG8vQYSC/Xvu/88ot228NUeGjXk/N7RARigKIMzqaVCWdYksprrPx/XmBcFDBVScBj3x2KaYRkGeLheap5mMFMOsNnH+S2GNclu6IEC7+Daz7luvHPhjLtbNxTR60Tx46rFYBuvOIGlNTaD0BCMaM7a1ueh0mC8zRAFIsP/ens0vddeClHQ1zSOG39uUojijsWZE+onIRgvsk6Dr2NAblKSSE7la0NoRcebsYKWXasWDwBpqWM1apneanbvAtBIG4MQRmZLBSNE9t1jiHOlphzzYI27Jc8mz3KZpqBQYYblZtTKqyahkIDq/MUMVSLRu/8adFi+NfFx5BPVmMGdTtd5vipKLCH8NoKAjjbWETkgWoO57hxbV22Ayk9t9CIDBWUoWDF5lxZfFOcoN0gaawV28+ZwPb4lYxAXWGWMqWvj+bvVmWtqWmwp9ZEbrHFDAQJuSqLM2ff kNR32hyP eBJJ09+tbTyF0BgcDWMMu/eJbocTuuY/XfRnroR3h2h21O21TRXTHtv4efZDV0bTAqCHsDkMGvmpnLmpsCo3pKciJ++dWXUrvJVggADUNbKNRkHgbW+LDmrf32cccQ+0Ne0N7qf8ucGVpjG4ALIZxiqi1r9YnzTaIqIIv8pllApRWd+QK6ZM8sCCebrm4qbROC8gJDY2lsSM+mnwFgipL1klt4ZHlNBn6kRlnUJOp8AZ8nVuxROLSQOQD7g41Kf7xc3intNJsPPJV7MPzg4crDnzhuAs6su0xaZptxZizkW+qjv4OzaX3o1o8w4BqbHcXNhaQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 2025/3/19 20:18, Toke Høiland-Jørgensen wrote: >> >> All I asked is about moving PP_MAGIC_MASK macro into poison.h if you >> still want to proceed with reusing the page->pp_magic as the masking and >> the signature to be masked seems reasonable to be in the same file. > > Hmm, my thinking was that this would be a lot of irrelevant stuff to put > into poison.h, but I suppose we could do so if the mm folks don't object :) The masking and the signature to be masked is correlated, I am not sure what you meant by 'irrelevant stuff' here. As you seemed to have understood most of my concern about reusing page->pp_magic, I am not going to argue with you about the uncertainty of security and complexity of different address layout for different arches again. But I am still think it is not the way forward with the reusing of page->pp_magic through doing some homework about the 'POISON_POINTER'. If you still think my idea is complex and still want to proceed with reusing the space of page->pp_magic, go ahead and let the maintainers decide if it is worth the security risk and performance degradation. > > -Toke > >