Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1826809imw; Sat, 16 Jul 2022 16:10:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vSnMscJd9WeZUoSriZvvyMnsZ9GGcRChAGUP6iSZiX0rra/orEm5/3gbJR7Z0SDTDjy5su X-Received: by 2002:a17:902:f708:b0:153:839f:bf2c with SMTP id h8-20020a170902f70800b00153839fbf2cmr20137129plo.113.1658013040073; Sat, 16 Jul 2022 16:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658013040; cv=none; d=google.com; s=arc-20160816; b=z5ZS1pxlkDfJpyXTdmDDuDX27iIyoFDwquSzTTrEvt4j06ZTBYGY7E86e7gCmwlt76 JcE7KVNAkBl+4grmZ88PcK9r0mDKIA3CzzKZKXaSfXfKwHDz5FMCNeG07KM+jBnd/H01 dw8/cd69DIGWaatkpLcLLlQh1h8QkopSOnR/SJPc3RU6vVJxw7qa1ErxlwKSePsPN5EI /SmdNDo2bBVDNy5DkwyOWGLYBTL0YexiVM0rYPJWcdgZdfKiEs7gvWWdYpVHx55omgQg 1eHwFRrRJnNPmPtIdgBSDilfU8eWEv7ROKLhwpWm9lrLez+YN32DGLv9UG2X0WvMiw50 k9/g== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1YHsexR+OL0j+8geTpC1yseBHVhZWt8bQWmljtM/kHk=; b=Y0CuDZ+SRgV140woEt3XyeGkbBWWS6IjxCOeO/44FICm7yvW3ee1RdYi8iZNhZgSBq scaotsTv5+GTsuQ4RlWbFi68yA8ni0vHUW6WQjYXXIT8X0KEFfaY02vq0iTVSOVGnAiL TnyD5xnL9Yb9kViiRt/Th7tTDg9IJ/b+bq2tVkWlM+pQzytO1W63ylUjD+y7n8S/QxQy muv/ehK2ud8MoU5gQRO+gwR5+5Ce9YUeRJRQ1LIBtMKEjZL9DqB7K7TZHhFgGu2JjKot IIJmMdPXyUgESc6Sh1amVrwHTf7EfH75Mrfc8IUyjlstCe6oqnzIkg8hLJZioVkT1isa EeiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DE7sthqN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm18-20020a056a00339200b0052b4aceb77csi4926425pfb.343.2022.07.16.16.10.26; Sat, 16 Jul 2022 16:10:40 -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=@linux-foundation.org header.s=korg header.b=DE7sthqN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232832AbiGPXGf (ORCPT + 99 others); Sat, 16 Jul 2022 19:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230374AbiGPXGe (ORCPT ); Sat, 16 Jul 2022 19:06:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85F0913D3C for ; Sat, 16 Jul 2022 16:06:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 35537B80CBE for ; Sat, 16 Jul 2022 23:06:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81458C34114; Sat, 16 Jul 2022 23:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1658012790; bh=Qlry9Ybw/VR9Sy2AXbyuFkQjZf1l5R33jNnOzKlzbsA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DE7sthqNzk53rdM+yZTLPvWRxvo+8Z4b1MecZy0fPpQZF0/4onzIQ2w3VsnuH0vYZ EubjvaTZCeOidvbnk79KBI9b/ABSTELQnyAQYE34rT3ZU/zE/fXne1x03GnJ6C+twL ivNNmSD6lhHnQfAzR9u2sLBXPF4KKe3mqhihJ7nA= Date: Sat, 16 Jul 2022 16:06:29 -0700 From: Andrew Morton To: Miaohe Lin Cc: , , , , Axel Rasmussen , Peter Xu Subject: Re: [PATCH] mm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte Message-Id: <20220716160629.d065828c84ad2423c10f7733@linux-foundation.org> In-Reply-To: References: <20220712130542.18836-1-linmiaohe@huawei.com> <20220713102357.8328614813db01b569650ffd@linux-foundation.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Thu, 14 Jul 2022 17:59:53 +0800 Miaohe Lin wrote: > On 2022/7/14 1:23, Andrew Morton wrote: > > On Tue, 12 Jul 2022 21:05:42 +0800 Miaohe Lin wrote: > > > >> In MCOPY_ATOMIC_CONTINUE case with a non-shared VMA, pages in the page > >> cache are installed in the ptes. But hugepage_add_new_anon_rmap is called > >> for them mistakenly because they're not vm_shared. This will corrupt the > >> page->mapping used by page cache code. > > > > Well that sounds bad. And theories on why this has gone unnoticed for > > over a year? I assume this doesn't have coverage in our selftests? > > As discussed in another thread, when minor fault handling is proposed, only > VM_SHARED vma is expected to be supported So... do we feel that this fix should be backported? And if so, is there a suitable commit for the Fixes:?