Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32664956rwd; Fri, 7 Jul 2023 19:00:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlEW6Tq5YwY/bccenhTvKscaNqpJM/muqZf7JbKAuXV1tCVxungaBio87EugELQxxUINA0Li X-Received: by 2002:a05:6870:d60c:b0:1b0:f38:90f6 with SMTP id a12-20020a056870d60c00b001b00f3890f6mr9047995oaq.7.1688781613262; Fri, 07 Jul 2023 19:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688781613; cv=none; d=google.com; s=arc-20160816; b=lAJZj9f6mIENN4R0QlckVRLoh5E05k3Eorvh0hJFtHJbA7JjhnVcSPcoM0RpLr6Mtf 4403dCysCcu33A1cuA9TMKTUHnOjy2YDo5E0OVHc2PQHgoB/5kCCvZDFmQpc5UJmHhjr h17HCgL7SfDacxbJxO7V2+HxwDDExDlvsFXAjmI6WtnMHPsR8Bd6wPLSTee7LtlDFhWm TfM/L2JUIo8aN5xGz5k6xyWZb8XRcQKUf4Rl76gtv8mhGkoP5muHuxHh7LBvDZSCRq+o ob+e4v6orMq1Dqh6cl0eXp9+bPWSzhV6iTQa3oUe63kYK9i72BiUu+VtUHuwDjxThFDk sgQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=9dyaU2obnqlYOinMQdt1uRiNJmX1iW5TxGQjnfBScPQ=; fh=0/3WVgphpZMZ2ezpU0tkGsmS9glYfkCHhZ22uT+nwiU=; b=mzF97/d/Ut6Y2ktmrImdzZch1oqu78JXlsbpDm/X/JypvOvbIw9GVbLNSUBkPbz7tY qGXy/be+lGDAX4tNZ1kA+8gmv+HvfOZ5MJ8E5Ak3Le5Qeo8EX+1KdZoMx3fT0Jx60qr1 GIE5dN78qp0GMebJRVipvpryh218AfpQHhNjDdPhhCShdzfCclDmjf6MWMIBoQC9s0n5 3VfeEC3fs2y/ikm35KTo8QYLG4H5Nqm+hVFY7bjYpHGkeUSmz/5UdY5ulxPD3TcKE2te 1fBdPzX6B7JzCuntkicsz4BgGD4UX2cKv84f/OjvE+4MriiEOer/ewT0cv4KhH4gpjpz BqVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KJ0QAeym; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq13-20020a17090b380d00b00253160141c7si3693150pjb.83.2023.07.07.19.00.00; Fri, 07 Jul 2023 19:00:13 -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.dev header.s=key1 header.b=KJ0QAeym; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231316AbjGHBnh (ORCPT + 99 others); Fri, 7 Jul 2023 21:43:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjGHBng (ORCPT ); Fri, 7 Jul 2023 21:43:36 -0400 X-Greylist: delayed 86108 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 07 Jul 2023 18:43:34 PDT Received: from out-17.mta0.migadu.com (out-17.mta0.migadu.com [IPv6:2001:41d0:1004:224b::11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D777812D for ; Fri, 7 Jul 2023 18:43:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1688780613; 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=9dyaU2obnqlYOinMQdt1uRiNJmX1iW5TxGQjnfBScPQ=; b=KJ0QAeymXgL1YZEXWipaHrr63jNSlk49L7zSYZ+5wkPXIceawxxFyFs4IzdjVwFcyMk3ho rNd3xCRefYQooqi0j06dkTDu3JhuSkQJXsTkHKV2KRSGVYuDWCjkAt2RR36vzIK0Fd/YMh eTrKLf/FXLv8/K1rHHUc2csJWcUaGlE= MIME-Version: 1.0 Subject: Re: [PATCH] mm: hugetlb_vmemmap: fix a race between vmemmap pmd split X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230707123844.adf56ba3e0d000f6da431494@linux-foundation.org> Date: Sat, 8 Jul 2023 09:42:57 +0800 Cc: Muchun Song , Mike Kravetz , Linux Memory Management List , linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <63EDE3B6-B0AD-4D67-8EC6-FC8AE627E352@linux.dev> References: <20230707033859.16148-1-songmuchun@bytedance.com> <20230707123844.adf56ba3e0d000f6da431494@linux-foundation.org> To: Andrew Morton X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Jul 8, 2023, at 03:38, Andrew Morton = wrote: >=20 > On Fri, 7 Jul 2023 11:38:59 +0800 Muchun Song = wrote: >=20 >> 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. >=20 > Is this likely enough to justify a backport? >=20 > I'm thinking "add cc:stable and merge into 6.6-rc1", so it hits = -stable > after a couple of months of testing. >=20 Hi Andrew, It is better to backport it to stable. Could you help me add it? Thanks.