Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2547567rwd; Fri, 2 Jun 2023 10:54:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72z945OxGinRR3osaK73fyfrx7L42P4L/tC/oqXqCSC+OpY0Reszny6HhNTMuwA8Bw8fXR X-Received: by 2002:a17:903:41ce:b0:1ae:4ee3:e3e6 with SMTP id u14-20020a17090341ce00b001ae4ee3e3e6mr763907ple.32.1685728445238; Fri, 02 Jun 2023 10:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685728445; cv=none; d=google.com; s=arc-20160816; b=SD/vaw91WkwubWuqrHQd6QurYOnaol8BHZtAOndNDIdS3YatotKafZYx46pll21bps TJIjgYeZPr047DZIbzMIYoLQaws1RuG4sHyg8LL0iYLijVwsle5fPUKh1zxSMYu/nDBj f/DZi5jaaA5RQKOM88sO022Efmd8vx1uubkZhm8ZkFyyCu6bu5HeASwU8U4llSWbUN3C 8cCyo1xbrOxjdvZuYnYaG53wz2VR4N/nxwVCfgYDadUdICrf06I0p+TvfChofFdLXl/8 0l0dx7gjanfMMstBDsjAyooDTiypwq0BOkEJ9pgvzJVU392tCUthI2Eof7AP9R7TINpu sHqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=W5Xb4OT5p3eioEXPlzYukPNRC7vM3061DuQs6Af0XAs=; b=GQm9FFsD/XoPKWwLRZovxfpFG04q5QBYlsESb/swtodv6PRV/goTlqwtH+cHLWVmox F/FbS5WebIsCxa5BIDISqARgwMrpS1dpiA7LnUktrPHCfwIcCEacqYvr2NVxc8gKBBVj /UWWO3Udx8oWxGFnrE2Ir1QJcbi9e9tW7jkdA8RhkW0uo9ttz9HYU5qWL17yxeBFV4cX Jv1U3Om87xMjwZFC6U3A3eRkENnlzrj8nWWw+CGIqXS5G/aqOABsQEZZ7ezboHp0IAkJ r/qUPO4NZxNqgzqATXan6dXwSuzqZ0lF5FPoyJxnn9BurJYJUNTqPbOG0JCdUNls/Evu 6Jlg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170903111100b001b053ea9bc0si1202746plh.469.2023.06.02.10.53.53; Fri, 02 Jun 2023 10:54:05 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236259AbjFBROc (ORCPT + 99 others); Fri, 2 Jun 2023 13:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235529AbjFBROa (ORCPT ); Fri, 2 Jun 2023 13:14:30 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EE7761A7 for ; Fri, 2 Jun 2023 10:14:28 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F2F771063; Fri, 2 Jun 2023 10:15:13 -0700 (PDT) Received: from [10.57.73.214] (unknown [10.57.73.214]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C98FA3F67D; Fri, 2 Jun 2023 10:14:26 -0700 (PDT) Message-ID: <640f81aa-035e-9f42-c848-096e4c9e014c@arm.com> Date: Fri, 2 Jun 2023 18:14:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v3 2/4] mm/damon/ops-common: atomically test and clear young on ptes and pmds To: Yu Zhao Cc: Andrew Morton , SeongJae Park , Christoph Hellwig , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Lorenzo Stoakes , Uladzislau Rezki , Zi Yan , Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, damon@lists.linux.dev References: <20230602092949.545577-1-ryan.roberts@arm.com> <20230602092949.545577-3-ryan.roberts@arm.com> From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,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 02/06/2023 17:35, Yu Zhao wrote: > On Fri, Jun 2, 2023 at 3:30 AM Ryan Roberts wrote: >> >> It is racy to non-atomically read a pte, then clear the young bit, then >> write it back as this could discard dirty information. Further, it is >> bad practice to directly set a pte entry within a table. Instead >> clearing young must go through the arch-provided helper, >> ptep_test_and_clear_young() to ensure it is modified atomically and to >> give the arch code visibility and allow it to check (and potentially >> modify) the operation. >> >> Fixes: 3f49584b262c ("mm/damon: implement primitives for the virtual memory address spaces"). > > Just to double check: was "Cc: stable@vger.kernel.org" overlooked or > deemed unnecessary? It was overlooked - incompetance strikes again! I was intending to cc the whole series. What's the best way to fix this? Can I just add stable in cc on reply to the cover letter or will I have to resend the lot? > >> Signed-off-by: Ryan Roberts >> Reviewed-by: Zi Yan >> Reviewed-by: SeongJae Park >> Reviewed-by: Mike Rapoport (IBM)