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] [day] [month] [year] [list]
Message-ID: <4frly7duh2qu4tseannxpne4bfeu3e4hixgxtfmw5pphvuj575@smqi43jke7cb>
Date: Thu, 11 Sep 2025 15:44:23 +0800
From: Kairui Song <ryncsn@...il.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Andrew Morton <akpm@...ux-foundation.org>, 
	Chris Li <chrisl@...nel.org>, Kairui Song <kasong@...cent.com>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the mm-unstable tree

On Thu, Sep 11, 2025 at 04:05:10PM +0800, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm-unstable tree, today's linux-next build (x86_64
> allnoconfig) failed like this:
> 
> In file included from mm/shmem.c:44:
> mm/swap.h: In function 'folio_index':
> mm/swap.h:462:24: error: implicit declaration of function 'swp_offset'; did you mean 'pud_offset'? [-Wimplicit-function-declaration]
>   462 |                 return swp_offset(folio->swap);
>       |                        ^~~~~~~~~~
>       |                        pud_offset
> In file included from mm/shmem.c:69:
> include/linux/swapops.h: At top level:
> include/linux/swapops.h:107:23: error: conflicting types for 'swp_offset'; have 'long unsigned int(swp_entry_t)'
>   107 | static inline pgoff_t swp_offset(swp_entry_t entry)
>       |                       ^~~~~~~~~~
> mm/swap.h:462:24: note: previous implicit declaration of 'swp_offset' with type 'int()'
>   462 |                 return swp_offset(folio->swap);
>       |                        ^~~~~~~~~~
> 
> Caused by commit
> 
>   c2079bb89a0c ("mm, swap: use the swap table for the swap cache and switch API")
> 
> but not fixed by commit
> 
>   9b84186b7053 ("mm-swap-use-the-swap-table-for-the-swap-cache-and-switch-api-fix")
> 
> I applied this hack:
> 
> From: Stephen Rothwell <sfr@...b.auug.org.au>
> Date: Thu, 11 Sep 2025 15:51:25 +1000
> Subject: [PATCH] hack for "mm, swap: use the swap table for the swap cache and
>  switch API"
> 
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
>  mm/swap.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/swap.h b/mm/swap.h
> index ad339547ee8c..8428026aa8d7 100644
> --- a/mm/swap.h
> +++ b/mm/swap.h
> @@ -458,8 +458,10 @@ static inline int non_swapcache_batch(swp_entry_t entry, int max_nr)
>  static inline pgoff_t folio_index(struct folio *folio)
>  {
>  #ifdef CONFIG_MMU
> +#ifdef CONFIG_SWAP
>  	if (unlikely(folio_test_swapcache(folio)))
>  		return swp_offset(folio->swap);
> +#endif
>  #endif
>  	return folio->index;
>  }
> -- 
> 2.51.0

Thanks for the report, I've fixed the issue in V3 of the patch already.

https://lore.kernel.org/linux-mm/20250910160833.3464-12-ryncsn@gmail.com/

There is another doc warning also fixed in V3.

> 
> -- 
> Cheers,
> Stephen Rothwell



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ