Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp464588iob; Wed, 18 May 2022 06:09:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPj90nW/uri/ihnoHstUCXiOcLbxvkMyj4bzgLLab9OnhVEyd14Q02mKwRPwk3uBHOLYjY X-Received: by 2002:aa7:8d47:0:b0:4f6:a7f9:1ead with SMTP id s7-20020aa78d47000000b004f6a7f91eadmr27915425pfe.42.1652879397926; Wed, 18 May 2022 06:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652879397; cv=none; d=google.com; s=arc-20160816; b=hR48VhejeJ1c9FAJejfhWfMpX1byBTujzy1My3trRhmur90tiWVEGa4u+CN6AeHmFm E5AGryYvZwro1a7zLHtv0mP/idRXELG10Sv/GSzF3Q+a2Dt/UwcVFdx+McemYeDhgV1Z Tu0AEsDwrmFLWxwayfAi6qLn3fslmPhjqxgr/DqR2QuRZ2bQQ36y8l120qpG90XCb+6B vQWnq7fUXiivRzHk/C06Vz8SzW5To/+c4R4voT4hd+h+6I1PYDsVqy/w+LyHIwFo4yfk 436eOCEXdd2JEFxJtQqNrfARh5StkcA1l3CCpCg79mz7C298h+dlKnMCzjcxL/WcriIg XZIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ju+39W+MjqK0PaJ3zrGj+hf6cLDd05VvDhYO8wadxW4=; b=jQv2QZPnGvSjGuGRHw5z1FaAmb6XPzUkz2ZSiY0vLYU1AKRCl0LkBvr4O1JVMECom+ xdjvCuE+xZeauna8VTpj3HCpNPtZWU/8X53dGEKg9+ufbXoY67/BpB7RQ7ezDw1DJzvO T+wmxiBevrr+2sTbyhdYkERGb3defMHmK21upzq8mxS4Dd6UNKCx6VTTuNInOwYwyV92 v3yKZ4OUsf1SFu1iPGup37I0T9xKmlaHmR/wTci3t5r9mtI64w2LcNmNhIxj7zwk4GXq qVSeOdXj6dO9qVkZHlOuqsG2yyG1ofS09/j7hQK/BBI4fa7NU/QG6zyxYCs8PTmkBoFW XK8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lQyS21gG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v3-20020a17090a778300b001cd51f48295si2768381pjk.174.2022.05.18.06.09.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 06:09:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lQyS21gG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6BCA179C36; Wed, 18 May 2022 06:09:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237569AbiERNJp (ORCPT + 99 others); Wed, 18 May 2022 09:09:45 -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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, 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.