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 091B0C5AC75 for ; Wed, 26 Jan 2022 02:52:21 +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=2eSTG1HdxDe3ivr5NhVlITyTMIQGxnHe7u9Fo9ihmzI=; b=Lb9WCQL1WPFgmg jNVLni8fUSFNca46+AMiOSOl8WdIja895Xfsi6bpsbN09MOlhMZ06qCoosEsXM8kw8uBxnyB4cxyN ULwEaS3KBIoqdioY2rgI+0zgUbCyOvfrsXKlBbOjP0ui7gvkfA+UBzfvb5kkaxo87u3R4MihCRBRi 44j1FbxsDeTwQqOl9ecndq0RhAc7v6cE25b+yNuf/NOQsKJSC2irEvo4NQVcRb5612dslrpZVqK1P UAbI0Ejl/k3yzvDdhVSDhXmy8a5tCoMe/yTpvHI2OZRM/b9vOKAVtKoNGchdMM/7soFYU6L0btwSU E9hJIvR4rRAD4lC4Xjbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCYOi-009vx1-Nf; Wed, 26 Jan 2022 02:51:00 +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 1nCYOg-009vwg-7h for linux-arm-kernel@bombadil.infradead.org; Wed, 26 Jan 2022 02:50:58 +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=86XwsEqiHWcpAKS+1w66D4BvB/zNvs89vkaCBpH8v1A=; b=WVIaPz8PNke5qT2GHlggxTERIt 1gByfyYpDfCQf3V4cJwM8jJX1yZjxR7A5zbsBQgSgJA5GOtlRgQpLiqkAG87yRkPSdMt/Hb7X+biu 1CNLDxWXRd/rkXeiZrkTquDHB6Z7vn7QwjiQ8TVckrWw8oSvmtZ+P7f2pT+9il3b010BOL9pXMyGN cfsxfsq2hvoFGT2KOkRv4FYjhfEUHyyg5YX2WbTtVHY197jxgs77IvBxmpZds6dst8x7n+OEa6sG4 Leb1KP/pny3DOZid1GUF9FEp+yFHOcXK9hyuGMVBjp7dDDtC2QvNL3403LwMcbxSdBqhtIpvrukkd ocKpgIkA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCYOZ-003di7-Ho; Wed, 26 Jan 2022 02:50:51 +0000 Date: Wed, 26 Jan 2022 02:50:51 +0000 From: Matthew Wilcox To: Robin Murphy Cc: 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> 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 Wed, Jan 19, 2022 at 01:28:14PM +0000, Robin Murphy wrote: > Is it page_to_pfn() guaranteed to work without blowing up if page is invalid > in the first place? Looking at the CONFIG_SPARSEMEM case I'm not sure that's > true... Something that all the ARM people weighing in on this don't understand is that basically nobody uses SPARSEMEM without SPARSEMEM_VMEMMAP. So all this complicated code to do page_to_pfn() is never tested. Real users all do a simple subtraction and so the simple pfn_valid() works fine. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel