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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FC22C433F5 for ; Thu, 20 Jan 2022 19:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=05N8hU/s4O4srMgvXg0jNH940qMWW37Uh/19qL5VFVQ=; b=P0tz/rh8ojs5kf f/k5bWDFPT0DbvidDDdOVMxc/RaUV0vB6urG1iSys2UDnCeJ9Q8oi51S96T7lzQaQUQA8YI2tK8B/ sojVp1mq7ZxSjxVVKhByvLp4cTfcaQs2ajKsqkSQ9C53fiWDzRlQFpdyK8++u2r0sjKahcgMtCf6q 13FGbh7NsyxHD0HVPXaGKe58bZZjbk2GlYmSJEHFIEyF5u25p+Qj4CEnl2WPqehh9Tz09mmx27Bxg upX6oLaMGFOxNJLpXa2+sCYTqd9Bs2P0wzAGqLe6/JlSIjIGV89Er4+6DA4ENJzGVUtBRcmt0nxy5 b7tX1O7R8UO4HMMI4r7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAcjc-00Cuje-EL; Thu, 20 Jan 2022 19:04:36 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAcjZ-00Cuj7-L9 for linux-arm-kernel@bombadil.infradead.org; Thu, 20 Jan 2022 19:04:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jA3CkCc0pg/2NQ16pdnmk4INkOngIqZyjRj6CQv0y+c=; b=mWrA67bmZ0wgwVuAnDToH7NT5L tpqZLXGiB06qrUdIo/Eh+0EBZy1NY/6RkcOWEE2CSGzDZeta6FEVqX3aFaR/K/cgEzkCURbyCD9j1 4kB5POQ3MscqS9I+15ByHaaZJrQQdTFwqoQArQr4C9zMoQ91/ydTCGyTuKibrGb7F1w2c+uKMxm8A cYMDAg13wAtDIWELgkBXA8gRB6lnvzC16bBEnhLcr1VCeMQ1d+zEsIuHLbk+K6pxftU2oXYyouM0o LjGakAXEFB6UBVZREtLN9c5XnlCUcA/KAbZGEadfng+aImnIlZUPZncJn2zA9jsFEBpk9s5mgUJXu Ar4ls3yw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAcjS-00EcJJ-4B; Thu, 20 Jan 2022 19:04:26 +0000 Date: Thu, 20 Jan 2022 19:04:26 +0000 From: Matthew Wilcox To: "Russell King (Oracle)" Cc: Robin Murphy , Yury Norov , Catalin Marinas , Will Deacon , Andrew Morton , Nicholas Piggin , Ding Tianhong , Anshuman Khandual , Alexey Klimov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] vmap(): don't allow invalid pages Message-ID: References: <20220118235244.540103-1-yury.norov@gmail.com> <319b09bc-56a2-207f-6180-3cc7d8cd43d1@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 20, 2022 at 04:54:03PM +0000, Russell King (Oracle) wrote: > Well, I think I've adequately explained why I believe: > > pfn_is_valid(page_to_pfn(page)) > > being used as the primary check is substandard, and will likely lead to > a future CVE. When generating an array of struct page's, I believe that > it is the responsibility for the generator to ensure that the array > only contains valid pages. So you're saying that virt_to_page() should be made more expensive? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel