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: <03d08299-40d3-41c6-99f2-15cc3d589311@redhat.com>
Date: Tue, 18 Jun 2024 11:52:58 +0200
From: David Hildenbrand <david@...hat.com>
To: Barry Song <21cnbao@...il.com>, akpm@...ux-foundation.org,
 linux-mm@...ck.org
Cc: baolin.wang@...ux.alibaba.com, chrisl@...nel.org,
 linux-kernel@...r.kernel.org, mhocko@...e.com, ryan.roberts@....com,
 shy828301@...il.com, surenb@...gle.com, v-songbaohua@...o.com,
 willy@...radead.org, ying.huang@...el.com, yosryahmed@...gle.com,
 yuzhao@...gle.com, Shuai Yuan <yuanshuai@...o.com>
Subject: Re: [PATCH v2 1/3] mm: extend rmap flags arguments for
 folio_add_new_anon_rmap

> diff --git a/mm/rmap.c b/mm/rmap.c
> index a3c99ac63155..2b19bb92eda5 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -1406,25 +1406,26 @@ void folio_add_anon_rmap_pmd(struct folio *folio, struct page *page,
>    * This means the inc-and-test can be bypassed.
>    * The folio does not have to be locked.
>    *
> - * If the folio is pmd-mappable, it is accounted as a THP.  As the folio
> - * is new, it's assumed to be mapped exclusively by a single process.
> + * If the folio is pmd-mappable, it is accounted as a THP.
>    */
>   void folio_add_new_anon_rmap(struct folio *folio, struct vm_area_struct *vma,
> -		unsigned long address)
> +		unsigned long address, rmap_t flags)
>   {
>   	int nr = folio_nr_pages(folio);
>   	int nr_pmdmapped = 0;
> +	bool exclusive = flags & RMAP_EXCLUSIVE;

One nit: Make it "const" and move it above "int nr ..." to maintain a 
nice reverse christmas tree we all love ;)

Thanks!

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ