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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D29MAAR3YBI6.3G6PVIR1SJACO@nvidia.com>
Date: Tue, 25 Jun 2024 23:09:37 -0400
From: "Zi Yan" <ziy@...dia.com>
To: "ran xiaokai" <ranxiaokai627@....com>, <akpm@...ux-foundation.org>,
 <willy@...radead.org>
Cc: <vbabka@...e.cz>, <svetly.todorov@...verge.com>,
 <ran.xiaokai@....com.cn>, <baohua@...nel.org>, <ryan.roberts@....com>,
 <peterx@...hat.com>, <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
 <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 1/2] mm: Constify
 folio_order()/folio_test_pmd_mappable()

On Tue Jun 25, 2024 at 10:49 PM EDT, ran xiaokai wrote:
> From: Ran Xiaokai <ran.xiaokai@....com.cn>
>
> Constify folio_order()/folio_test_pmd_mappable().
> No functional changes, just a preparation for the next patch.

What warning/error are you seeing when you just apply patch 2? I wonder why it
did not show up in other places. Thanks.

>
> Signed-off-by: Ran Xiaokai <ran.xiaokai@....com.cn>
> ---
>  include/linux/huge_mm.h | 2 +-
>  include/linux/mm.h      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 2aa986a5cd1b..8d66e4eaa1bc 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -377,7 +377,7 @@ static inline spinlock_t *pud_trans_huge_lock(pud_t *pud,
>   * folio_test_pmd_mappable - Can we map this folio with a PMD?
>   * @folio: The folio to test
>   */
> -static inline bool folio_test_pmd_mappable(struct folio *folio)
> +static inline bool folio_test_pmd_mappable(const struct folio *folio)
>  {
>  	return folio_order(folio) >= HPAGE_PMD_ORDER;
>  }
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 9a5652c5fadd..b1c11371a2a3 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1105,7 +1105,7 @@ static inline unsigned int compound_order(struct page *page)
>   *
>   * Return: The order of the folio.
>   */
> -static inline unsigned int folio_order(struct folio *folio)
> +static inline unsigned int folio_order(const struct folio *folio)
>  {
>  	if (!folio_test_large(folio))
>  		return 0;




-- 
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