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 12616C433FE for ; Thu, 6 Oct 2022 20:33:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 684FB6B0072; Thu, 6 Oct 2022 16:33:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 633F86B0073; Thu, 6 Oct 2022 16:33:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FD216B0074; Thu, 6 Oct 2022 16:33:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3B8376B0072 for ; Thu, 6 Oct 2022 16:33:36 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0B3E0120152 for ; Thu, 6 Oct 2022 20:33:36 +0000 (UTC) X-FDA: 79991675232.20.6306A67 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf08.hostedemail.com (Postfix) with ESMTP id 85BFF160026 for ; Thu, 6 Oct 2022 20:33:35 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A0175B81C4C; Thu, 6 Oct 2022 20:33:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19E44C433C1; Thu, 6 Oct 2022 20:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1665088412; bh=dZZ9imJ1cDp8lJ48SMN+iYyF9XUEQ3s5LkCT1Jrg6Kc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=yuNoVAdxTDyNOu7Ww1D1JTc/yiTXv0IPOEi7FNbJZYvpD61D/mH59aUQYwIuY6FE2 NXLa6q+kcyhkcH/GZh6ZxaS7KDkrHhcBzfEv4UgirfWyPBNU1bdjT1zlqvNw+c8eN2 /u1insyoLGQ+qyrq7O/iN3teAa72t1uTi0Ap5yYE= Date: Thu, 6 Oct 2022 13:33:31 -0700 From: Andrew Morton To: ira.weiny@intel.com Cc: "Fabio M. De Francesco" , Thomas Gleixner , Christoph Hellwig , kernel test robot , Al Viro , Linus Walleij , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] highmem: Fix kmap_to_page() for kmap_local_page() addresses Message-Id: <20221006133331.dabd345508f7d62a887dfb4d@linux-foundation.org> In-Reply-To: <20221006040555.1502679-1-ira.weiny@intel.com> References: <20221006040555.1502679-1-ira.weiny@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665088415; 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:dkim-signature; bh=PQ+UubiXfmYwyLkqKval3QwvJiLLQEBsgJbYEhAkQX8=; b=Z8Fa5uKWh8YgbNeOV6Avz+tb53gB+D7oBFpSNrUjGSFLAS8wuThhrOSp8VTlgWdoatlLRy BIhlgOpabnOJLi2DDWbAcbaSc35aiFpSiYsdnHo8qy8wPC0tbJSa/8HQaOMaiHRusNR4wK KlniOSVh3NHWPc7y/h+UDKgxu/GpaJA= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=yuNoVAdx; spf=pass (imf08.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665088415; a=rsa-sha256; cv=none; b=olU2ZN2I652toMCDcvmGvijg3PghWCNNvUQs+0gX0ks3dkwfnL/e8NUUPMjzXfhVD8JcNd ensR6aTSlP9P5nSzuLPwLOhA2VkbSBMAxt+O1sOJygLHuigCBJtvNfrlMX1AuxP/7vQvvB pl0i1+qYY2kMDmlXOvr3dNndiw9GXog= X-Stat-Signature: 9tc7q5tmoa6gbh65u48mzmn8cmdhar8g X-Rspamd-Queue-Id: 85BFF160026 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=yuNoVAdx; spf=pass (imf08.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam07 X-Rspam-User: X-HE-Tag: 1665088415-140757 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: On Wed, 5 Oct 2022 21:05:55 -0700 ira.weiny@intel.com wrote: > kmap_to_page() is used to get the page for a virtual address which may > be kmap'ed. Unfortunately, kmap_local_page() stores mappings in a > thread local array separate from kmap(). These mappings were not > checked by the call. > > Check the kmap_local_page() mappings and return the page if found. > > Because it is intended to remove kmap_to_page() add a warn on once to > the kmap checks to flag potential issues early. What were the user-visible runtime effects of this? Are we able to identify a Fixes:? Thanks.