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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3512C433FE for ; Thu, 6 Oct 2022 20:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232139AbiJFUds (ORCPT ); Thu, 6 Oct 2022 16:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbiJFUde (ORCPT ); Thu, 6 Oct 2022 16:33:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E087BB06D for ; Thu, 6 Oct 2022 13:33:33 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 09EFA61AD1 for ; 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.