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 78A1CC636CD for ; Sat, 4 Feb 2023 04:06:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B36B46B0072; Fri, 3 Feb 2023 23:06:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B0D696B0073; Fri, 3 Feb 2023 23:06:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FB786B0074; Fri, 3 Feb 2023 23:06:50 -0500 (EST) 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 8F0346B0072 for ; Fri, 3 Feb 2023 23:06:50 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5E91912018D for ; Sat, 4 Feb 2023 04:06:50 +0000 (UTC) X-FDA: 80428273380.08.F12C149 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf21.hostedemail.com (Postfix) with ESMTP id 477A81C0013 for ; Sat, 4 Feb 2023 04:06:47 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=iGSZj0Va; spf=pass (imf21.hostedemail.com: domain of ira.weiny@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ira.weiny@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675483608; 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: references:dkim-signature; bh=7ToI4Qn1Lk8ixpiWVHRiP4w47G8QhNpo6mZzjPyMtPU=; b=KPYh75iAOp2IyjACZjsRyomwdfJteukk4Y2XR9Gecs9r+Jxpw9G0X5sYNLQUYWd3Hz74QS ZUF8aYL3/5yU376kP+3/V3MqBeiXWoPPlnDBJsQnG1q0OFbfH605RbtdKmdFCECup5AhAF eGhI0sPcbx/dJz9w48DHkGbPNiHYWQ8= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=iGSZj0Va; spf=pass (imf21.hostedemail.com: domain of ira.weiny@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ira.weiny@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675483608; a=rsa-sha256; cv=none; b=ddLQFoYesGqXJR4WN8fWjd2rUyIGyccWzaAFfuQ9PyJWlj7MOpwzEmnRbg/2MRowj00QhG mwzwD3iiXcM2unrDSfxfH/+64rPKeomCbxJuT3X5++Ti3UuyN/Q+CgPaeMKEOj3tTJJdMT UJupOh1XOcPKP0G+brCnjf2yAA1jyXU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675483607; x=1707019607; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=+XXStKh3j+XHfCAm1vQfzdlmrIlu0fkTxoAosQ00C2s=; b=iGSZj0VaNu9nnYGdaGGAi8U0wFrDv/3dc7ekBqMOU9u0zgVZ7+55xP/5 KNUQ44V5j2MCG8gwBp2Arxkcd32z9I5kO0OS+2YqTMSJRGFmDEoUgFALs tF3tnh1CH3ReupXtxTkU2+jKdPQjWgA0L1/HjztlI7xsdOjGghtCMorLx pOusa41uuf5puXP/ZYNx7F9b8Pb85m741qljgf1vuWsSmh1ZBG3tMV6kl aNaACL32ksqlrILrpnSlxyveTqs50fYEykMJXYsThSivgCBweUs9Zbs5f 474TWUcyd3/BG7yudD4OPgkNgXkQwzg/IQtCGPnRuhGnjTx7BHoD3wWnE Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10610"; a="391309336" X-IronPort-AV: E=Sophos;i="5.97,272,1669104000"; d="scan'208";a="391309336" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2023 20:06:45 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10610"; a="734573702" X-IronPort-AV: E=Sophos;i="5.97,272,1669104000"; d="scan'208";a="734573702" Received: from iweiny-mobl.amr.corp.intel.com (HELO localhost) ([10.209.125.166]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2023 20:06:44 -0800 From: Ira Weiny Subject: [PATCH v2 0/4] Remove get_kernel_pages() Date: Fri, 03 Feb 2023 20:06:32 -0800 Message-Id: <20230203-get_kernel_pages-v2-0-f1dc4af273f1@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAMjZ3WMC/x3NQQqDMBCF4atI1o0ko1jSVe9RRGI66tA0SmJtR bx7R5f/g8e3iYSRMIlbtomICyUaAwdcMuEGG3qU9OQWoKBQoArZ49y8MAb0zWR7TFIbU5TgutZe jeBbaxPKNtrgBj6Gj/c8ThE7+p3Oo+YeKM1jXE920cd6CKAVGyxBlZuyqkBJLSna/IsU1juFGX3 uxreo933/A2bOhwi7AAAA To: Sumit Garg , Andrew Morton Cc: Al Viro , Christoph Hellwig , linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, linux-mm@kvack.org, Jens Wiklander , "Fabio M. De Francesco" , Ira Weiny , John Hubbard , Matthew Wilcox , Thomas Gleixner , Linus Torvalds , Mel Gorman X-Mailer: b4 0.12-dev-cc11a X-Developer-Signature: v=1; a=ed25519-sha256; t=1675483603; l=2450; i=ira.weiny@intel.com; s=20221211; h=from:subject:message-id; bh=+XXStKh3j+XHfCAm1vQfzdlmrIlu0fkTxoAosQ00C2s=; b=uiELKqKl1rb6sOhVOwgs8nj+yDmsZW7IRkTZMpss2wfMavp/n/GthM90M7+cawX38rpd3SUdvp0L wLgrsliCCT3ru9EaQmYslPppourPJuwwOdkdT5W6ixQ1/ZhM1zLM X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=noldbkG+Wp1qXRrrkfY1QJpDf7QsOEthbOT7vm0PqsE= X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 477A81C0013 X-Stat-Signature: botksocio9tmkucykb5fwhipju7sozju X-HE-Tag: 1675483607-805302 X-HE-Meta: U2FsdGVkX1+usFuapSvAxSDCqI0aEMGbvElug0bi80lWz6gjZ/P715ErzCk+8JY6DHrtlOd9DVYGAS6dJMg43YgrKiKd0LxHZDYXb3W7C4sH8gVwPZ6Bk6ueZwiFuD/Hpr25dNe9/e6Gfl5qrARcbRN/vKAk9twMhZYdEFrPQPwsq6BimhdZ12Vl6HY3q/j3yKA6jJAYWmyYgJXeRpqolw40xPui+y9ct2zD+dbBD4ENqn533DLVGUf8U4YbQcJSUGWUlekXt5Mvej5/ZzWSBZAC4nivFkfVd5TLeIkH2e3o+gTpfSM55bF6wo5DE5yz2sWE3pFs3y1r51dmNKtzICXfHY7kCTiJtB5qCahkjtLeI13nzWY+LPCHJJXeE8b/zDUFlMBnfkwUm+mdxAawCvGS7Km6W5xUoaOMLlyTNdMLtq5TPgPdGqtWWLinj8yK98daO++7zzTT32sSAeXxCJEb1nxoEKzpkCadfnXVoHOe2A+75BQtEoAp+lRZmpLJfIRkr3xgziiwWc8zylW8icE1ILhCOLEu6y9OWy0qmNccbkPZ6WYERGxO5xU6VmRM7L6O0sn5EAKEq8n7leBthNKBN9O35I0THzBwUpAvbsS0o1KaJzI/oq8K1qYWRUmKImGPKYgYPVN9L+YtVoCby5Ot16ng68a2ODaLmvPzdkSSYWHU/zRDqhhU+OI1oGB4OOhF9oVju5ZGuXoHrNw34QcUzaAg5Qg7pquVhFR9Q2dhw+NbaTFaPkQN70l7QXPkx8eZlj/OBnDCL3JEm/v3U6aA8jS/GH/fAuyg9V+PooavOoiBB32J7kWca6Mf9M39qEK90RVFc2GrC/8WAswWaNJrHFRuNi9eyB9dV7jVC3sUJPx1Y63MGSQDzsrd+IIZl0dZoRs3/XHbFhNRzvYg/COAC/msfGNdVFsJdFao4X+xtalTpa7UWT0zAoiaQHKmfCRR6/s2saQCiSEjw01 52ruBuHM 4pdDBBBJpkHiaqUHKY9HjBl7H2WE0Nq4it7IAJ1fENx9p1x3krsvOISh35clUvuEQ3EG6p6FirRR03/HMIBfSmM32krrOLZB4E75D0c1LxpfN1JQb7KrKFwLdlBJZVp+uV4a1ezQ5lX8gn89vZjLg2yBGyw6wK64CB/V3Oj3Eq3aAeFmyMaSo0pSeAQ2nUV2pKkDfJd90slJypZhe0D8CTHnUD8BEdkiH/0LJ17u0OHvccIsuY3GoGwmG83ahq49TfhrGi8d5J7JOsysgqeQwSqe/EYucnaXfOOGU2TEWUCsFvb4SzKcHsrpTNzXmZnhrxqDjVkpjOfcWD7UOrz8yKcAKdZSAvmF5vIpBCrQdH6ppPycR1TRmdNaEp8dIgNO2B2N3RKD06pxKFzMOMjzjVjUp06JUuhTLA/48B3Cv+2ue5hzQRWehO0LF6tkp/py3Nm5Xzdvna7UDrJRwrXf8UdryCn0RYXKr+zYmkCi3283rBrOL0WJxPS+r3gGVXjeRTlQPo5/iW11+Etok+bYskXJFS4/PvFk32g0i9+HWq3dg87My9kxRyPmTmJGWl7cMtz9K5OTgEMMHOJe6K/mKD1HhAARD3f2hLcDofP/yxy93z2A= 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: Sumit, I did not see a follow up on this series per your last email.[1] I'd like to move forward with getting rid of kmap_to_page(). So Hopefully this can land and you can build on this rather than the other way around? All, Al Viro found[2] that kmap_to_page() is broken. But not only is it broken, it presents confusion over how highmem should be used because kmap() and friends should not be used for 'long term' mappings. get_kernel_pages() is a caller of kmap_to_page(). It only has one caller [shm_get_kernel_pages()] which does not need the functionality. Alter shm_get_kernel_pages() to no longer call get_kernel_pages() and remove get_kernel_pages(). Along the way it was noted that shm_get_kernel_pages() does not have any need to support vmalloc'ed addresses either. Remove that functionality to clean up the logic. This series also fixes is_kmap_addr() and uses it to ensure no kmap addresses slip in later. [1] https://lore.kernel.org/all/CAFA6WYMqEVDVW-ifoh-V9ni1zntYdes8adQKf2XXAUpqdaW53w@mail.gmail.com/ [2] https://lore.kernel.org/lkml/YzSSl1ItVlARDvG3@ZenIV To: Sumit Garg To: Andrew Morton Cc: "Al Viro" Cc: "Christoph Hellwig" Cc: linux-kernel@vger.kernel.org Cc: op-tee@lists.trustedfirmware.org Cc: linux-mm@kvack.org Cc: Jens Wiklander Cc: "Fabio M. De Francesco" Signed-off-by: Ira Weiny --- Changes in v2: - Al Viro: Avoid allocating the kiov. - Sumit: Update cover letter to clarify the motivation behind removing get_kernel_pages() - Link to v1: https://lore.kernel.org/r/20221002002326.946620-1-ira.weiny@intel.com --- Ira Weiny (4): highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings tee: Remove vmalloc page support tee: Remove call to get_kernel_pages() mm: Remove get_kernel_pages() drivers/tee/tee_shm.c | 37 ++++++++++--------------------------- include/linux/highmem-internal.h | 5 ++++- include/linux/mm.h | 2 -- mm/swap.c | 30 ------------------------------ 4 files changed, 14 insertions(+), 60 deletions(-) --- base-commit: 0136d86b78522bbd5755f8194c97a987f0586ba5 change-id: 20230203-get_kernel_pages-199342cfba79 Best regards, -- Ira Weiny