Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp496803pxy; Wed, 5 May 2021 07:15:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTCsBBud0Mq6QedKIpe3dhNC7+GAbnLp0sDznhR3LlzEvoqmV19mhN5PRmjxu73p1eOV66 X-Received: by 2002:a17:906:d28e:: with SMTP id ay14mr27430128ejb.33.1620224126972; Wed, 05 May 2021 07:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620224126; cv=none; d=google.com; s=arc-20160816; b=AgscyDYCNjL4hmEF0ZbFDMsMIh9bvTHfI+rKuoWWespC3725cZKHxbuz8u/tTt62RB CK3Zu7ml8yImtn8mb3tCfNY+yd0mHZYDPEDzlg/MH08+cuT2Kljx/b/FlRs1pk2InW4i +qpURpoz9l6Gg1fTZ1XTmgkWRjJ0byT/kboRtM6qKNz5QXO/Tl0Q+PajSPtRnAFcmqsI i7ISaHUnGbSB4VeoN+0dG31N6BO1BBVz5h0sJMo/TpsDMuHoeh/wBtwZyn+hI2JRHPAp /g71ZxRii2A4YgP7jNbgxULb/8oHFzznzYywVMmwXzw7aumbawf1h0heDGvN3OB5xh4E i2xg== 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=p4Gx3o25ACBJGILIG3HE+BwEcXMm6WbBPfaqpoYYUJ0=; b=NkWd9UtogdEdljKnh8TrDyStJyueSTgHg7QneqfVmpcAiKwFa2PZvP4H9J+xJH+rhj o8lt4AqvapMdqXTzkBGUCbrUPqZbtN3KrHScJqwOAcblC3bZOCUsvcfK8/JYsovciNcW p2/n40RJeho2NDEvab2RmFzdYPhyms2IF5LdBcoqSOjNcBcer0gpR8adbtI9plOlvn1J YrdpxD00ja8pyjdfD+OFWuoo0Zsiodd270S39GwDwP1V2VAzyjKHQS9fAkRVKYY2geJj OktyNAt6mexhmF/FeRfBBfOgROQJ0xo+JOTlNyXL+T7LsCJLHPKtdXqciJKjA8w3t7pn vfVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OBaJHXK5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb15si5611226ejb.579.2021.05.05.07.15.03; Wed, 05 May 2021 07:15:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OBaJHXK5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233392AbhEENOM (ORCPT + 99 others); Wed, 5 May 2021 09:14:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:40452 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233426AbhEENOL (ORCPT ); Wed, 5 May 2021 09:14:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1620220393; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p4Gx3o25ACBJGILIG3HE+BwEcXMm6WbBPfaqpoYYUJ0=; b=OBaJHXK5sCug91eAyObDotV8cPGAFyEbp7Q+f9qfJC+/K3yf7zsq79OSdiiU/KtluIicgj QQkvL9pxKq8JGHLEAPJ59xvmARwRGEItvWqWlU5lQIz4GTleHBvoieJdhGkAieMekppVE4 kMDy5/vXg6IHmTB3u+mbnEerBLa0F8E= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5B149B199; Wed, 5 May 2021 13:13:13 +0000 (UTC) Date: Wed, 5 May 2021 15:13:11 +0200 From: Michal Hocko To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, Andrew Morton , "Michael S. Tsirkin" , Jason Wang , Alexey Dobriyan , Mike Rapoport , "Matthew Wilcox (Oracle)" , Oscar Salvador , Roman Gushchin , Alex Shi , Steven Price , Mike Kravetz , Aili Yao , Jiri Bohac , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Naoya Horiguchi , linux-hyperv@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v1 3/7] mm: rename and move page_is_poisoned() Message-ID: References: <20210429122519.15183-1-david@redhat.com> <20210429122519.15183-4-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210429122519.15183-4-david@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 29-04-21 14:25:15, David Hildenbrand wrote: > Commit d3378e86d182 ("mm/gup: check page posion status for coredump.") > introduced page_is_poisoned(), however, v5 [1] of the patch used > "page_is_hwpoison()" and something went wrong while upstreaming. Rename the > function and move it to page-flags.h, from where it can be used in other > -- kcore -- context. > > Move the comment to the place where it belongs and simplify. > > [1] https://lkml.kernel.org/r/20210322193318.377c9ce9@alex-virtual-machine > > Signed-off-by: David Hildenbrand I do agree that being explicit about hwpoison is much better. Poisoned page can be also an unitialized one and I believe this is the reason why you are bringing that up. But you've made me look at d3378e86d182 and I am wondering whether this is really a valid patch. First of all it can leak a reference count AFAICS. Moreover it doesn't really fix anything because the page can be marked hwpoison right after the check is done. I do not think the race is feasible to be closed. So shouldn't we rather revert it? -- Michal Hocko SUSE Labs