Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1787176rwi; Thu, 27 Oct 2022 22:02:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7yF8RaR20sDh/PskEf93lHaABVxVzj7M2wx1/nKw6A+oUCAWVP7NF3c7YbrmxRXs04rf9N X-Received: by 2002:a63:6a85:0:b0:43b:dac2:ff0b with SMTP id f127-20020a636a85000000b0043bdac2ff0bmr46561769pgc.234.1666933356833; Thu, 27 Oct 2022 22:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666933356; cv=none; d=google.com; s=arc-20160816; b=ywgxxl+Ku/qoSFzbtchKUfn+aFtzloMf70DAbM+Qq2dUGEIDb4EKUotYi7U8bwz8mJ kcnRCTACdpXWBY/gHSgylggen00uDq0IMgJgqFoPmOeiznoCFzPFoC26L1J2KgxfdSW8 lTcHoH7Nponlce/mXAMG7bHh2paP+HBknSUtZmAf3wJ2DtQUkWDzB9gUW8hXNFE/oKbb 7JDyPdk5cLcJX9gIEJuMUT0ugtIYz1AEOujACn848rraEsr/GvsadVMbNi0PXhkXr2mR mdX1Blz+IW8TA8aF0y94PRxr7JHz9DmPganxnMa77g2hXANUZ9gLD7WHPLBY3p2qBKPX UR3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=1cEAc7Hi237RKPiSEF0PtMgwXplwCqgvBPVDp1f9TTo=; b=TiCn8LSFjrY6+znUM2vukOdXySUfKdDUkkie5fA/RaWeK1GiTNbpijcv++u7ytLYfa 7/Yajth3+SaR9x4Z+yc5sJl0t0JktaK0IhBCgux1q3Zug/1LW383bv+U7QoadAX7iALp MmNanYFNO7sb0eonCka6xYtzrFjukk4qPm2P9oQhio15i+kyvI2x9vcyQwNw/hXis6hR XuKBWoKALdOPp43h47KpSTdKc//Mco8RT3RbT50d24gt4XazvBHg2nu9PDQkR4DjOKfl KoBfW3GEvwzJB0UL8h8QR2e/zkfG8fvhXmujnlmYsm5AxNCpBD3AbUIgFgDtbuxeEi6V jSvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bh6n1Vyj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2-20020aa79722000000b00562bd090afcsi3817346pfg.305.2022.10.27.22.02.24; Thu, 27 Oct 2022 22:02:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bh6n1Vyj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbiJ1E1O (ORCPT + 99 others); Fri, 28 Oct 2022 00:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbiJ1E1M (ORCPT ); Fri, 28 Oct 2022 00:27:12 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB80813FDCB for ; Thu, 27 Oct 2022 21:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666931178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1cEAc7Hi237RKPiSEF0PtMgwXplwCqgvBPVDp1f9TTo=; b=Bh6n1VyjJDCMzEq14Yvmo8LpQMaAUEfQCR5sxboXPlw+Yo49/jX+t0sYOoH/6u8qevciSG Rb3jVCgDhKIUlQ99QijWx4AXF9F4c2cXYXWaoR1FQMYpTyGdZbC4PRSu2QwKm8WUS23v64 MiuQOTNSjeSEpS3Nf0kNv6e4TwZivYU= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-634-5sIdRXWdN0mEXXdD80qa5w-1; Fri, 28 Oct 2022 00:26:17 -0400 X-MC-Unique: 5sIdRXWdN0mEXXdD80qa5w-1 Received: by mail-wr1-f70.google.com with SMTP id n16-20020adfc610000000b0023650935090so905211wrg.5 for ; Thu, 27 Oct 2022 21:26:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1cEAc7Hi237RKPiSEF0PtMgwXplwCqgvBPVDp1f9TTo=; b=SJiW/K56ktwIl2IVUE7JtvXn+k1RWLPs04pGJgzb40BL1ICUEhwqj6BmOF99GeOSMu ts9lzAYALs8SYxmPGVnE56y8XDa/29PlOlkyxp3q3au+OmH8+cmMgSHzkRw2dEkfxwou 0xg+L/eXR0iXcdYWH6epppPxPdzQnXDEHVY2JktCiKBpHEVmbhlDZ2Ug1h0SppNAHQ/E WLTf0LP8Be4mztYU32dcMJ0yYWgBL7pxjXw0v1kPKLAkzcLnLSELc5K7enMXq1O0qKLZ fzqDnFTXl3ZkRH83uQ5hCAFeGsjbK5/1VQ/H2Pp7eBDQ0UPE7LYSWDQ82qA4zmlMhOi2 i7AA== X-Gm-Message-State: ACrzQf0aCAILsUjLm/DlVKM6G9PEW3axsa5K9fShLpDyb0NJJ1F9vnxA qt+FJlmnjSobkjj65aXuGFU2nfxna4tGHaRHU25iK9nqWk0kt5fMzqSDZCDuWjFeCSvc+loJnU5 /eyi5hPG21me2M1yd+X+WKmMO X-Received: by 2002:a05:600c:474a:b0:3c8:3299:5ba9 with SMTP id w10-20020a05600c474a00b003c832995ba9mr8166640wmo.3.1666931176212; Thu, 27 Oct 2022 21:26:16 -0700 (PDT) X-Received: by 2002:a05:600c:474a:b0:3c8:3299:5ba9 with SMTP id w10-20020a05600c474a00b003c832995ba9mr8166625wmo.3.1666931175905; Thu, 27 Oct 2022 21:26:15 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:c100:8448:bf98:23a4:ac94? (p200300cbc704c1008448bf9823a4ac94.dip0.t-ipconnect.de. [2003:cb:c704:c100:8448:bf98:23a4:ac94]) by smtp.gmail.com with ESMTPSA id o12-20020a5d58cc000000b00236705daefesm2577551wrf.39.2022.10.27.21.26.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Oct 2022 21:26:15 -0700 (PDT) Message-ID: <623247f8-6b1d-b517-2053-6d5fb2cb418c@redhat.com> Date: Fri, 28 Oct 2022 06:26:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH STABLE 5.10] mm/memory: add non-anonymous page check in the copy_present_page() To: Hugh Dickins , Peter Xu Cc: Yuanzheng Song , akpm@linux-foundation.org, gregkh@linuxfoundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20221024094911.3054769-1-songyuanzheng@huawei.com> <3823471f-6dda-256e-e082-718879c05449@google.com> <8aad435-bdc6-816f-2fe4-efe53abd6e5@google.com> <432c4428-b6d4-f93-266-b920a854c3c@google.com> Content-Language: en-US From: David Hildenbrand Organization: Red Hat In-Reply-To: <432c4428-b6d4-f93-266-b920a854c3c@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 28.10.22 03:32, Hugh Dickins wrote: > Reinstating Cc stable, which I removed just before the discussion settled. Sorry for not reading the full thread before and considering Peters mail; I had to take short cuts :) > > On Thu, 27 Oct 2022, Peter Xu wrote: >> ... >> >> After a re-read and 2nd thought, I think David has a valid point in that we >> shouldn't have special handling of !anon pages on CoW during fork(), >> because that seems to be against the fundamental concept of fork(). >> >> So now I think I agree the !Anon original check does look a bit cleaner, >> and also make fork() behavior matching with the old/new kernels, irrelevant >> of the pin mess. > > Thanks Peter. So Yuanzheng's patch for 5.10 is exactly right. > > Sorry for leading everyone astray: my mistake was to suppose that > its !PageAnon check was simply to avoid the later BUG_ON(!anon_vma): > whereas David and Peter now agree that it actually corrects the > semantics for fork() on file pages. > > I lift my hold on Yuanzheng's patch: nobody actually said "Acked-by", > but I think the discussion and resolution have given better than that. > (No 3rd thoughts please!) Unless someone tells me why I am obviously wrong Acked-by: David Hildenbrand -- Thanks, David / dhildenb