Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp14230rwb; Thu, 6 Oct 2022 13:41:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5qfgzfsLxpUxsKdd2WXcz7CleHvuTTZmcJciXM83q+SQt3roc/b/Io+oTP5J1ntw742kiV X-Received: by 2002:a17:90b:2243:b0:20b:42a:4c0d with SMTP id hk3-20020a17090b224300b0020b042a4c0dmr6224038pjb.123.1665088865060; Thu, 06 Oct 2022 13:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665088865; cv=none; d=google.com; s=arc-20160816; b=LZCNL9qclfca9tZoR/U24Iw1zauKkFoA+I68U4Kd2EPXxJhYrjDqx9cTevtLc0Mm3V sOAeqBCsmj8QOtetvU5tbYAiPOT5gG8Vzq+BiwT2OBYWtYXsKGfHk6szSzBd6rJdNK98 6Vkjj1pFiBqvXZMbrAzQiRJsIsenYe4tNqJ6MdWjG5kuLEnY88wSAEh/cul366TKpe4d iYD9oJGVEAlxOLTB19otL8MKlolKJdDWBJFSo/Dz7W1jpRlcVbMSbMgneCLUUPhf9csS rwIjChVAegN7AaYKybjylVoSc7Sxglf0/f3OJxcIwWoqtChua6Hf6m74bQxGygjzGuYe tLrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=PQ+UubiXfmYwyLkqKval3QwvJiLLQEBsgJbYEhAkQX8=; b=rJH64ALJGdf1AXZMi6sOTyp9YtaLQ8w92F7vv/l/DHNKl0Tbyuw4fwMtYs27qh0jhW pTFIrL9KkcntTdsFuc3V2PSzpkQ6LMB72Kr/S4SLtyOyfnYo/vx3fduArMBZi+E9sXFD 9ucdmtp2Jn27Z9+ivaw7+1N9Jl+Ji2mMAXgmHcgiBZvUpugmlCgifuIiZ9b8LgNyMc37 aFVPbRzCWIajZ//+E2MmLVgPeAFgodsBS+0d48oc78eiT2MtTI+YgXJdSxzlYTdno33b Q6rIPDBvu35Zc6L2SQLQ0/o1Eg++M92uWX4XhDxP4EOkyTNW+8OyLaqZ5X5V+/iRvx7V dJ2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=yuNoVAdx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020a634a15000000b004344b581925si410042pga.879.2022.10.06.13.40.52; Thu, 06 Oct 2022 13:41:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=yuNoVAdx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232123AbiJFUdr (ORCPT + 99 others); Thu, 6 Oct 2022 16:33:47 -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 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.