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 911BFC433EF for ; Wed, 18 May 2022 13:09:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237560AbiERNJl (ORCPT ); Wed, 18 May 2022 09:09:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237448AbiERNJk (ORCPT ); Wed, 18 May 2022 09:09:40 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D5F741FAF; Wed, 18 May 2022 06:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=ju+39W+MjqK0PaJ3zrGj+hf6cLDd05VvDhYO8wadxW4=; b=lQyS21gGKOGmli7n7NsiTm9LSV 4/6EjxnCsiP1GkaKgZ6zFQy4qB8VMuS2mMmR0/NsEZjxdUH/F3AOfCEyihO2oCGGl+B1sAXmcTMLL 3bvcfP++pICulIArauX1aVTRcFI4kFB8ZvqlkTF02rlZhzcIu1zEOHgfCHiiL64mPk/uARPfD3FXI FHrfn5uQZ8DgJh76MSlY0EPHejJQZg/5dkbkk4BTqB1Slvbq9Mdu6Okejpe/yfnRvcX+2KvWMs1Hi t25/J1lSDPxKk8Pzs8hOciB8g6psEZlzdMqOzWqsg8Ge9g6QOhGopvf3tPHZGT96DApZN4jyrjGNX PHHBUxCA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrJQi-002E94-A3; Wed, 18 May 2022 13:09:32 +0000 Date: Wed, 18 May 2022 06:09:32 -0700 From: Christoph Hellwig To: Vivek Kumar Cc: corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, maz@kernel.org, axboe@kernel.dk, rafael@kernel.org, akpm@linux-foundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-pm@vger.kernel.org, linux-mm@kvack.org, len.brown@intel.com, pavel@ucw.cz, paulmck@kernel.org, bp@suse.de, keescook@chromium.org, songmuchun@bytedance.com, rdunlap@infradead.org, damien.lemoal@opensource.wdc.com, pasha.tatashin@soleen.com, tabba@google.com, ardb@kernel.org, tsoni@quicinc.com, quic_psodagud@quicinc.com, quic_svaddagi@quicinc.com, Prasanna Kumar Subject: Re: [RFC 5/6] Hibernate: Add check for pte_valid in saveable page Message-ID: References: <1652860121-24092-1-git-send-email-quic_vivekuma@quicinc.com> <1652860121-24092-6-git-send-email-quic_vivekuma@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1652860121-24092-6-git-send-email-quic_vivekuma@quicinc.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Wed, May 18, 2022 at 01:18:40PM +0530, Vivek Kumar wrote: > Add check for pte_valid in saveable page after being checked for > the rest. This is required as PTE is removed for pages allocated > with dma_alloc_coherent with DMA_ATTR_NO_KERNEL_MAPPING flag set. > This patch makes sure that these pages are not considered for > snapshot. I don't think we ever remove kernel PTEs for DMA_ATTR_NO_KERNEL_MAPPING. If the allocation did come from highmem they never had one to start with. The logic here looks a bit fishy to me. 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 170DCC433EF for ; Wed, 18 May 2022 13:10:47 +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=WNsaJJnkjdNuBZMGXlLmQ/HNIVP0k5RSpLH6MkX+2c8=; b=xv6VF0x/k4CM59 0a1ggQfoIJwt7nVIHF1AEAXA/PmheLBeCmBCRtPJNBdMSzKyyORG8G+6gIVvPsRZwyTW7DzhbUqxb d+LJwEKEpz2qonKkZOcZdilJqIIU/A0BTEgbJk8Es47zILwC8alwJxH+SZHf46cDme1+zYcWDMnAm yQGGxpC+61XpGuhJ61hUr7mEE7EPXwGJI7ywk0iZavRSWtGnJeDA9EfyszkWcQtUXWIY29mII/FYy patf3n6NgqCREsA3cbe8Ij4Wkyj0VjqBFkbMtqs5NzVB/nZAzXOSmhBAySB6OTUu2uL2qfBt94AmN vDtjpoii6QdD750WVrFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrJQl-002E9q-5z; Wed, 18 May 2022 13:09:35 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrJQi-002E94-A3; Wed, 18 May 2022 13:09:32 +0000 Date: Wed, 18 May 2022 06:09:32 -0700 From: Christoph Hellwig To: Vivek Kumar Cc: corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, maz@kernel.org, axboe@kernel.dk, rafael@kernel.org, akpm@linux-foundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-pm@vger.kernel.org, linux-mm@kvack.org, len.brown@intel.com, pavel@ucw.cz, paulmck@kernel.org, bp@suse.de, keescook@chromium.org, songmuchun@bytedance.com, rdunlap@infradead.org, damien.lemoal@opensource.wdc.com, pasha.tatashin@soleen.com, tabba@google.com, ardb@kernel.org, tsoni@quicinc.com, quic_psodagud@quicinc.com, quic_svaddagi@quicinc.com, Prasanna Kumar Subject: Re: [RFC 5/6] Hibernate: Add check for pte_valid in saveable page Message-ID: References: <1652860121-24092-1-git-send-email-quic_vivekuma@quicinc.com> <1652860121-24092-6-git-send-email-quic_vivekuma@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1652860121-24092-6-git-send-email-quic_vivekuma@quicinc.com> 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, May 18, 2022 at 01:18:40PM +0530, Vivek Kumar wrote: > Add check for pte_valid in saveable page after being checked for > the rest. This is required as PTE is removed for pages allocated > with dma_alloc_coherent with DMA_ATTR_NO_KERNEL_MAPPING flag set. > This patch makes sure that these pages are not considered for > snapshot. I don't think we ever remove kernel PTEs for DMA_ATTR_NO_KERNEL_MAPPING. If the allocation did come from highmem they never had one to start with. The logic here looks a bit fishy to me. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel