linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: SeongJae Park <sj@kernel.org>
Cc: ryan.roberts@arm.com, akpm@linux-foundation.org, hch@lst.de,
	kirill.shutemov@linux.intel.com, lstoakes@gmail.com,
	rppt@kernel.org, stable@vger.kernel.org, urezki@gmail.com,
	willy@infradead.org, yuzhao@google.com, ziy@nvidia.com,
	damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5.15.y] mm/damon/ops-common: atomically test and clear young on ptes and pmds
Date: Fri, 21 Jul 2023 07:18:52 +0200	[thread overview]
Message-ID: <2023072144-item-cosmic-5c73@gregkh> (raw)
In-Reply-To: <20230717193008.122040-1-sj@kernel.org>

On Mon, Jul 17, 2023 at 07:30:08PM +0000, SeongJae Park wrote:
> From: Ryan Roberts <ryan.roberts@arm.com>
> 
> commit c11d34fa139e4b0fb4249a30f37b178353533fa1 upstream.
> 
> 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.
> 
> Link: https://lkml.kernel.org/r/20230602092949.545577-3-ryan.roberts@arm.com
> Fixes: 3f49584b262c ("mm/damon: implement primitives for the virtual memory address spaces").
> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
> Reviewed-by: Zi Yan <ziy@nvidia.com>
> Reviewed-by: SeongJae Park <sj@kernel.org>
> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Lorenzo Stoakes <lstoakes@gmail.com>
> Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
> Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
> Cc: Yu Zhao <yuzhao@google.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
> This is a manual backport of the commit, which cannot cleanly
> cherry-picked on 5.15.y[1], on 5.15.y, specifically 5.15.120.
> 
> [1] https://lore.kernel.org/stable/2023071613-reminder-relapse-b922@gregkh/

Now queued up, thanks.

greg k-h


      reply	other threads:[~2023-07-21  5:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2023071613-reminder-relapse-b922@gregkh>
2023-07-17 19:30 ` [PATCH 5.15.y] mm/damon/ops-common: atomically test and clear young on ptes and pmds SeongJae Park
2023-07-21  5:18   ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023072144-item-cosmic-5c73@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=hch@lst.de \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=sj@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=urezki@gmail.com \
    --cc=willy@infradead.org \
    --cc=yuzhao@google.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).