Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp206249pxf; Wed, 17 Mar 2021 20:20:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+4eeYlr0kEJ92AEakRO9g5Qo5TwABqPIGgq+FuARkiBz61lkAJh6SYgpeH4uRHSbVD9CJ X-Received: by 2002:a17:906:b297:: with SMTP id q23mr39150361ejz.315.1616037633219; Wed, 17 Mar 2021 20:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616037633; cv=none; d=google.com; s=arc-20160816; b=JkH2QUg4BhlMydAvFKVrBBoOBE1A4bglPeYr0O3sjcdlBBwbgzVs47cHLEolgK/rcm XDoxzGUYTqeU0jZ/lpuEhcLBSV6V4xAg+/W/tqycHxY4HLF+zIH9jLTzAmXoz5hIKMMa jJ6ic1+PoIZk85CmAnH/1WVqcerGEcJMqNwg7+onNj6PWaUIXGxyWDLoaPqkfb2mkTAZ iHCsYAEmt9K4cOOQKq2+zFl019APs2RrwbPskmts/wKlbFUUeSpfRfXkrmUxIPm73o4h XFdvaW4u6ju9waETZ3hYXvNbSzsi9w+rtTWfXgqBt5vqf78JnU6PbZu5Tp4FE/X1VqIc Yyjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=g4gJ7a0upL+zakF8lYBgNt8O2L5lL3r4gs86QTE5BRs=; b=PiaPh5nb8EyO8/rJ8N5gPnLdSFhd/XNeOw0uApz5jZ7RL8YEc4/5p+XkxApeXGp9P/ oIbyQAJiUBaPkctLAyi+p12eutVQfNRwkVRp7QbQ5QiE5YRiWFzVxQoJfNJ52el9F4Rr 8hSoksaUXnCbKCHqMb/QSxkXhPlTdkcdW+xAnh1cgZHv9O8jT0aYg3N9uN1gMTVsb1mn 1JAtxV+YDvMIHAIjgCC4jm0m9WlKpKbAD+yZoXPtgbmr5RTjrbGgl9IhwVp4yc6L9qnt 9zsQx5RePg+KztVVqClgDLo34SccTVRDKHnoFBX1ZzT8d3l+QeKiF9UThjXlCCeOZaIQ a25g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si584061ejt.551.2021.03.17.20.20.11; Wed, 17 Mar 2021 20:20:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbhCRDP6 (ORCPT + 99 others); Wed, 17 Mar 2021 23:15:58 -0400 Received: from mail.kingsoft.com ([114.255.44.145]:15635 "EHLO mail.kingsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhCRDPy (ORCPT ); Wed, 17 Mar 2021 23:15:54 -0400 X-AuditID: 0a580157-463ff70000021a79-a6-6052bf0b35bc Received: from mail.kingsoft.com (localhost [10.88.1.32]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.kingsoft.com (SMG-1-NODE-87) with SMTP id 9B.2F.06777.B0FB2506; Thu, 18 Mar 2021 10:46:35 +0800 (HKT) Received: from alex-virtual-machine (172.16.253.254) by KSBJMAIL2.kingsoft.cn (10.88.1.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 18 Mar 2021 11:15:51 +0800 Date: Thu, 18 Mar 2021 11:15:46 +0800 From: Aili Yao To: David Hildenbrand CC: , , , , , , Oscar Salvador , Mike Kravetz , Subject: Re: [PATCH] mm/gup: check page posion status for coredump. Message-ID: <20210318111546.4bda8c7a@alex-virtual-machine> In-Reply-To: <20a0d078-f49d-54d6-9f04-f6b41dd51e5f@redhat.com> References: <20210317163714.328a038d@alex-virtual-machine> <20a0d078-f49d-54d6-9f04-f6b41dd51e5f@redhat.com> Organization: kingsoft X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.253.254] X-ClientProxiedBy: KSBJMAIL1.kingsoft.cn (10.88.1.31) To KSBJMAIL2.kingsoft.cn (10.88.1.32) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJLMWRmVeSWpSXmKPExsXCFcGooMu9PyjB4OAHJYs569ewWXxd/4vZ 4vKuOWwW99b8Z7X4uD/Y4mLjAUaLM9OKHNg9Nn2axO5xYsZvFo8XVzeyeHx8eovF4/2+q2we m09Xe3zeJBfAHsVlk5Kak1mWWqRvl8CV0fX0BmvBUvaKzjvrmRoY97J2MXJySAiYSOy495mx i5GLQ0hgOpPE7v2LmSGcV4wSczu3snQxcnCwCKhKHDivC9LABmTuujcLrFlEQENiU9sGsHpm gT4miY6VR1hAEsICzhKbj89kBrF5Bawkvj97zQ5icwrYSfz5dJARxBYSyJNY/GwpG4jNLyAm 0XvlPxPERfYSbVsWMUL0CkqcnPkEbCazgI7EiVXHmCFseYntb+cwQ8xRlDi85Bc7RK+SxJHu GWwQdqzEsnmvWCcwCs9CMmoWklGzkIxawMi8ipGlODfdcBMjJDbCdzDOa/qod4iRiYPxEKME B7OSCK9pXkCCEG9KYmVValF+fFFpTmrxIUZpDhYlcV6RKKCUQHpiSWp2ampBahFMlomDU6qB yc14wdWtbUWLVumlPGTOvHZJmlH6tmfmoxmL33tbdhWLTX6xxHLeU4u/2yZ+mHaW6bJVWpSm W1mWcI/t9skSKz3d0p3cNh+50hiYLhf6Rbeqbu7eQ+UdE8SXWcTmS1zMCvolk3s2TuWXRlvr p3jGd8E8V8KNJxTYGd76se+Oxs9H6QIMx+cpl24pmDf38M0vwfPemm+/pxzcbNt98kL/+aPX jGaFvFpzMdi80fLAseMn4j0ZuTo/yVz6/HX+s8PykalfpGax3Vfbe3pW07olBdxn1q6xm/r3 neOzrYmV37/vY7tuuzSqjeGfs+Uq5U7f9OkcYT3Fc0T1tq1+sEXDpVRra/Bxbd8wXvVHk6q/ 1iuxFGckGmoxFxUnAgBTk1IU/AIAAA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Mar 2021 10:12:02 +0100 David Hildenbrand wrote: > > I wonder if a simple > > if (PageHWPoison(compound_head(page))) > ret = 0; > > won't suffice. But I guess the "issue" is compound pages that are not > huge pages or transparent huge pages. Yes, the simple case won't suffice, as we mark the hugetlb page poison in head, and other cases in the specific single page struct. > If not, we certainly want a wrapper for that magic, otherwise we have to > replicate the same logic all over the place. > > > + > > return (ret == 1) ? page : NULL; > > } > > #endif /* CONFIG_ELF_CORE */ > > > > Yes, May other places meet the requirements as the coredump meets, it's better to make a wrapper for this. But i am not familiar with the specific scenario, so this patch only cover the coredump case. I will post a v2 patch for this. -- Thanks! Aili Yao