Received: by 2002:a05:622a:1442:b0:3a5:28ea:c4b9 with SMTP id v2csp761665qtx; Thu, 17 Nov 2022 07:51:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf5zEZqIJKhYnIWT+FkNsmlp7fXVqLGBNpl3hTLVYnaLJ3Hx4SisKHCxPt2NiM6LzO15cvum X-Received: by 2002:a17:906:7f92:b0:783:7020:53a7 with SMTP id f18-20020a1709067f9200b00783702053a7mr2548094ejr.736.1668700265645; Thu, 17 Nov 2022 07:51:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668700265; cv=none; d=google.com; s=arc-20160816; b=evpDaaGtGUxJoPDKj6i2YwqKYHXnIPStMspxC2CvHt4Ho7IpEezgIT80duLLr4R7Mj ymPRs+aybsyvgfvDpK10zxZOSaaug/uIrpx3mcEfVCH/khqCnbpuoEAY3fouEfRvNBRk 3liRlj0h4OnWYrMZJZmLf8F9pYSYQ4iSpuUfyMDjlItBj9xcqh7yrUS2WdgiaIAp5IUn ZWtC4bnVpgu2OTzcYLx/NMtJyGm86+U71YKyPFacS7pQAOhJwy6bhV9Ac5RRa2FCPLvH BlemYNYR7t5Omx2J4FWzP0WtRu7yblpoulk3+vYAYnqyh2vslnD6VnqLqpNjykUQe9XL suWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=aJ3Su7Id8fFh36dDnfD7Im9eQ/HKaolYvEEtMS4T6wA=; b=AcS/EHCt9pgBamNkU3sBNqKTUCb5gzATPLKHqUo3rGwZjijRjKWHbLW8kYy6+chcKm hxiFVmqQxA1FX1R1UqX0pQr+D2LesZ9SdmEFtblzoh0/OHy1nX5sB0Jm54R2CxcBudNB EyNScfbpNJfNyHwzaI5SZWl4+NC3XiWOlfddFANNePX7FpX+1W8Xo0muW6nRzjJKF6FL mKKe36QLhzwbaV0o2pBU5NxE4772qVNMEW9+glra5vK81kH+GSIBB8MAvjIC906uninY A/p9uTipDpljqeBY6ajdjDN7MwMc7YNVi6Uz4pci2n3DXHSoSximPIgZkkt37t64JC/o NgLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=gcnqWlsJ; 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=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a056402084c00b004593895fb89si1214807edz.390.2022.11.17.07.50.41; Thu, 17 Nov 2022 07:51:05 -0800 (PST) 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=@xry111.site header.s=default header.b=gcnqWlsJ; 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=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232427AbiKQPma (ORCPT + 93 others); Thu, 17 Nov 2022 10:42:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230383AbiKQPm2 (ORCPT ); Thu, 17 Nov 2022 10:42:28 -0500 X-Greylist: delayed 6147 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 17 Nov 2022 07:42:26 PST Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DAECB5D; Thu, 17 Nov 2022 07:42:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1668699742; bh=aJ3Su7Id8fFh36dDnfD7Im9eQ/HKaolYvEEtMS4T6wA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=gcnqWlsJVFIti3S36UCLPp6LZWk61Yum6VxXfUEEo4xF3bzMGzkJwph+NBHUoWZFQ +1XyIzoo2E9NcQI+br42vmJf0KXrTfNAGUhS2wgJl36idviXeRB4RUxnxHUh5GWZI1 E5Jxa6DoZmf1A2F3e6ZkZKKVJLO93ciY9CMFCDSc= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 61F7565DD0; Thu, 17 Nov 2022 10:42:19 -0500 (EST) Message-ID: Subject: Re: [PATCH 04/47] LoongArch: Set _PAGE_DIRTY only if _PAGE_WRITE is set in {pmd,pte}_mkdirty() From: Xi Ruoyao To: Huacai Chen , Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , "David S . Miller" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Xu Date: Thu, 17 Nov 2022 23:42:17 +0800 In-Reply-To: References: <20221117042532.4064448-1-chenhuacai@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS autolearn=no 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, 2022-11-17 at 21:59 +0800, Xi Ruoyao wrote: > Hi Huacai, >=20 > On Thu, 2022-11-17 at 12:25 +0800, Huacai Chen wrote: > > Now {pmd,pte}_mkdirty() set _PAGE_DIRTY bit unconditionally, this cause= s > > random segmentation fault after commit 0ccf7f168e17bb7e ("mm/thp: carry > > over dirty bit when thp splits on pmd"). >=20 > Hmm, the pte_mkdirty call is already removed in commit 624a2c94f5b7a081 > ("Partly revert \"mm/thp: carry over dirty bit when thp splits on > pmd\""). >=20 > Not sure if this issue is related to some random segfaults I've observed > recently though.=C2=A0 My last kernel build contains 0ccf7f168e17bb7e but > does not contain 624a2c94f5b7a081. I can confirm this patch alone (without 624a2c94f5b7a081) fixes the random segfaults I've recently encountered running GCC testsuite. Link: https://gcc.gnu.org/pipermail/gcc/2022-November/239857.html Tested-by: Xi Ruoyao --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University