Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp33686837rwd; Sat, 8 Jul 2023 18:45:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8BUtF5zUJP5452q/95U3nqArtMaiIu1hSJJhhqZ0PRzsNtvXmOUVJd+gJEQmf/jLozy7n X-Received: by 2002:a17:90b:11c5:b0:264:a78:65cc with SMTP id gv5-20020a17090b11c500b002640a7865ccmr9228822pjb.45.1688867123846; Sat, 08 Jul 2023 18:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688867123; cv=none; d=google.com; s=arc-20160816; b=YlYkKaw+7/GJmfyvux/UlDsESVqqBILhTKJtQCqU6aaeERNCQ0Y+Mt82NQq4KruWVQ 2tuax+Cs/S5fAtul5J6F27K4fSVgCNlV7zmK8/GypGn1i6AoPLuQoMBIvRwrCiUhVEi2 Hqt86Y8YVnXEN49KEGdJhjQBXHsRMVWpKPKGkfvwdaxRATx6L3Av6uJu3giv2/RQtspa oCWodzVLl6fgNEu7xBa3+z0IOc+4VwxhZO1eEtBcH+DRq/H2euYeKjFFawb4+ve7f906 JgbKKr78641jBISiArKtDZVe17PvcWaEbSVAnFmVpEZqepK/DIKOEo4sA0cVWgHa8n31 ZK6w== 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=TG/Km74bY+7gRBn5MwnjSgybg/VfMd7tIMdP+j5CIEo=; fh=q3idie53w1H4aVf7vDfdRnTr7lRvx0bCrNthVTzFXIw=; b=pJVZr3GPCX8btp75WKzMCEggK+SqHtxtgQI3fMeqgqsP1Akyi+4jIrMZCbGHzaprhA sf7nEazH2OoOsNay0/OpKzLpb3snxKepAuxfaz5f7tpUHF38R0uTDNkI3Is/T52mOpQN ZIjl6XZCHTWuNcBPlFAQwxtj2fdVI8kXRMKAeu2/rm1Fu4uWtRStMzEzSeNLgAMXUv09 5T/WmjFsGRd3lq3Bnj7I3Z+NPXpp1JO+UiVOOtBmx2wIpGnz7YNo7HnzxXNtTi9zS0Sf SjjPtfw7rly1d+zqxu3Iy/LK72BrllsoXePecBuDt8p3lGgqfReaP2nS/iFlNCaqBeJJ kTWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="RmiaA/Vz"; 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 c9-20020a17090a674900b0025be9c5858dsi4821519pjm.88.2023.07.08.18.45.03; Sat, 08 Jul 2023 18:45:23 -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="RmiaA/Vz"; 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 S229728AbjGIAqY (ORCPT + 99 others); Sat, 8 Jul 2023 20:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjGIAqX (ORCPT ); Sat, 8 Jul 2023 20:46:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23EB71B1 for ; Sat, 8 Jul 2023 17:46:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ACEED60B5E for ; Sun, 9 Jul 2023 00:46:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0865C433C8; Sun, 9 Jul 2023 00:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1688863581; bh=fY53z6Onsmv3GKKfwc+3hC5M+1dggPKtLgeptAzv1fI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RmiaA/VzS9j6yirmr9X0dZ8m2E6vZJLjygrcSPtL6md5k6YOEhR3LNj0bB/mLCx4W vkswlziN5+2UT6w0rShS84zGu0pXfzKXW1DEB8AxCJ8bQ3Oj9KbEfHjmYjSMIyzYru JhbRKhNYLqdL7Xq9yXFCnvz83LBjcMbn/wplaNwQ= Date: Sat, 8 Jul 2023 17:46:20 -0700 From: Andrew Morton To: Muchun Song Cc: Muchun Song , Mike Kravetz , Linux Memory Management List , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: hugetlb_vmemmap: fix a race between vmemmap pmd split Message-Id: <20230708174620.8ef2109908f9606f3e4c090e@linux-foundation.org> In-Reply-To: <63EDE3B6-B0AD-4D67-8EC6-FC8AE627E352@linux.dev> References: <20230707033859.16148-1-songmuchun@bytedance.com> <20230707123844.adf56ba3e0d000f6da431494@linux-foundation.org> <63EDE3B6-B0AD-4D67-8EC6-FC8AE627E352@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Sat, 8 Jul 2023 09:42:57 +0800 Muchun Song wrote: > > > > On Jul 8, 2023, at 03:38, Andrew Morton wrote: > > > > On Fri, 7 Jul 2023 11:38:59 +0800 Muchun Song wrote: > > > >> The local variable @page in __split_vmemmap_huge_pmd() to obtain a pmd > >> page without holding page_table_lock may possiblely get the page table > >> page instead of a huge pmd page. The effect may be in set_pte_at() > >> since we may pass an invalid page struct, if set_pte_at() wants to > >> access the page struct (e.g. CONFIG_PAGE_TABLE_CHECK is enabled), it > >> may crash the kernel. So fix it. And inline __split_vmemmap_huge_pmd() > >> since it only has one user. > > > > Is this likely enough to justify a backport? > > > > I'm thinking "add cc:stable and merge into 6.6-rc1", so it hits -stable > > after a couple of months of testing. > > > > Hi Andrew, > > It is better to backport it to stable. Could you help me add it? > I have added cc:stable to this and I have staged it for 6.6-rc1.