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]
Date: Thu, 20 Jun 2024 21:49:12 -0400
From: Zi Yan <ziy@...dia.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 Yosry Ahmed <yosryahmed@...gle.com>
Subject: Re: [PATCH v1] mm/rmap: cleanup partially-mapped handling in
 __folio_remove_rmap()

On 18 Jun 2024, at 11:10, David Hildenbrand wrote:

> Let's simplify and reduce code indentation. In the RMAP_LEVEL_PTE case, we
> already check for nr when computing partially_mapped.
>
> For RMAP_LEVEL_PMD, it's a bit more confusing. Likely, we don't need the
> "nr" check, but we could have "nr < nr_pmdmapped" also if we stumbled
> into the "/* Raced ahead of another remove and an add? */" case. So
> let's simply move the nr check in there.
>
> Note that partially_mapped is always false for small folios.
>
> No functional change intended.
>
> Cc: Yosry Ahmed <yosryahmed@...gle.com>
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
>  mm/rmap.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)

LGTM. Reviewed-by: Zi Yan <ziy@...dia.com>

--
Best Regards,
Yan, Zi

Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ