From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10F97C433EF for ; Sat, 16 Jul 2022 23:06:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C4106B0080; Sat, 16 Jul 2022 19:06:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 173D06B0081; Sat, 16 Jul 2022 19:06:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 063656B0082; Sat, 16 Jul 2022 19:06:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E76466B0080 for ; Sat, 16 Jul 2022 19:06:32 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id AE248455 for ; Sat, 16 Jul 2022 23:06:32 +0000 (UTC) X-FDA: 79694499024.14.DDB1611 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id 402E640035 for ; Sat, 16 Jul 2022 23:06:32 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6062561291; Sat, 16 Jul 2022 23:06:31 +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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658012792; a=rsa-sha256; cv=none; b=TuWmakY0WHlzTEpjZDDwRy0NSolX0/0FVDNyduxmxK81gCPwYJ4w9+eEw7ybBkWwfPnIyW aLBwtJ1vWAfTGMGtLmO/IDXJQ0MJcDFK4lSMywaX72uCg7rDoDhUE/WKmxNlzvhN/oOCsQ cBaffP3XmnCrNgr03hHvZ2YmFHX97P8= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=DE7sthqN; dmarc=none; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658012792; h=from:from:sender: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:dkim-signature; bh=1YHsexR+OL0j+8geTpC1yseBHVhZWt8bQWmljtM/kHk=; b=PDgv/BOPbKO4T6ej3mrX3UiZnnMvekw193rO++Z+FNJDLdd03qYfFqZYwiytMiqXkSG1Ac lYZNK5pKK0IbCbwQnDti1GWIGFfGfuSoeStfd0gvQAp2I790YOIYfgrfEKYodzvyMaWGuz sXB41CnMmaIvZzJi9Dr6vi9IhJWkIOk= X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=DE7sthqN; dmarc=none; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Queue-Id: 402E640035 X-Rspamd-Server: rspam12 X-Stat-Signature: z7zq19w54yamdx5ruxjmticm5bpuzjsi X-HE-Tag: 1658012792-684123 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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:?