lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zfj_-LbiIsAVWcPX@casper.infradead.org>
Date: Tue, 19 Mar 2024 03:01:12 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Zhaoyang Huang <huangzhaoyang@...il.com>
Cc: 黄朝阳 (Zhaoyang Huang) <zhaoyang.huang@...soc.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	康纪滨 (Steve Kang) <Steve.Kang@...soc.com>
Subject: Re: summarize all information again at bottom//reply: reply: [PATCH]
 mm: fix a race scenario in folio_isolate_lru

On Tue, Mar 19, 2024 at 08:48:42AM +0800, Zhaoyang Huang wrote:
> BTW, damon_pa_pageout is a potential risk over this race

No it isn't.

               struct folio *folio = damon_get_folio(PHYS_PFN(addr));

                if (!folio)
                        continue;

                if (damos_pa_filter_out(s, folio))
                        goto put_folio;

                folio_clear_referenced(folio);
                folio_test_clear_young(folio);
                if (!folio_isolate_lru(folio))
                        goto put_folio;
                if (folio_test_unevictable(folio))
                        folio_putback_lru(folio);
                else
                        list_add(&folio->lru, &folio_list);
put_folio:
                folio_put(folio);

It clearly has a folio reference when it calls folio_isolate_lru().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ