Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 3/4] mm: prevent KSM from completely breaking VMA merging
       [not found] <418d3edbec3a718a7023f1beed5478f5952fc3df.1747431920.git.lorenzo.stoakes@oracle.com>
@ 2025-05-19 13:19 ` kernel test robot
  2025-05-19 13:36   ` Lorenzo Stoakes
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-05-19 13:19 UTC (permalink / raw)
  To: Lorenzo Stoakes, Andrew Morton
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Alexander Viro,
	Christian Brauner, Jan Kara, Liam R . Howlett, Vlastimil Babka,
	Jann Horn, Pedro Falcato, David Hildenbrand, Xu Xin,
	Chengming Zhou, linux-kernel, linux-fsdevel

Hi Lorenzo,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Stoakes/mm-ksm-have-KSM-VMA-checks-not-require-a-VMA-pointer/20250519-165315
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/418d3edbec3a718a7023f1beed5478f5952fc3df.1747431920.git.lorenzo.stoakes%40oracle.com
patch subject: [PATCH 3/4] mm: prevent KSM from completely breaking VMA merging
config: x86_64-buildonly-randconfig-001-20250519 (https://download.01.org/0day-ci/archive/20250519/202505192132.NsAm4haK-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250519/202505192132.NsAm4haK-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505192132.NsAm4haK-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/vma.c:2589:15: error: call to undeclared function 'ksm_vma_flags'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2589 |         map->flags = ksm_vma_flags(map->mm, map->file, map->flags);
         |                      ^
   mm/vma.c:2761:10: error: call to undeclared function 'ksm_vma_flags'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2761 |         flags = ksm_vma_flags(mm, NULL, flags);
         |                 ^
   2 errors generated.


vim +/ksm_vma_flags +2589 mm/vma.c

  2586	
  2587	static void update_ksm_flags(struct mmap_state *map)
  2588	{
> 2589		map->flags = ksm_vma_flags(map->mm, map->file, map->flags);
  2590	}
  2591	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/4] mm: prevent KSM from completely breaking VMA merging
  2025-05-19 13:19 ` [PATCH 3/4] mm: prevent KSM from completely breaking VMA merging kernel test robot
@ 2025-05-19 13:36   ` Lorenzo Stoakes
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Stoakes @ 2025-05-19 13:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Alexander Viro, Christian Brauner,
	Jan Kara, Liam R . Howlett, Vlastimil Babka, Jann Horn,
	Pedro Falcato, David Hildenbrand, Xu Xin, Chengming Zhou,
	linux-kernel, linux-fsdevel

Andrew - fix-patch enclosed for this. Silly oversight.

Will also fixup on any respin.

Thanks, Lorenzo

On Mon, May 19, 2025 at 09:19:50PM +0800, kernel test robot wrote:
> Hi Lorenzo,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on akpm-mm/mm-everything]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Stoakes/mm-ksm-have-KSM-VMA-checks-not-require-a-VMA-pointer/20250519-165315
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> patch link:    https://lore.kernel.org/r/418d3edbec3a718a7023f1beed5478f5952fc3df.1747431920.git.lorenzo.stoakes%40oracle.com
> patch subject: [PATCH 3/4] mm: prevent KSM from completely breaking VMA merging
> config: x86_64-buildonly-randconfig-001-20250519 (https://download.01.org/0day-ci/archive/20250519/202505192132.NsAm4haK-lkp@intel.com/config)
> compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250519/202505192132.NsAm4haK-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202505192132.NsAm4haK-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> mm/vma.c:2589:15: error: call to undeclared function 'ksm_vma_flags'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>     2589 |         map->flags = ksm_vma_flags(map->mm, map->file, map->flags);
>          |                      ^
>    mm/vma.c:2761:10: error: call to undeclared function 'ksm_vma_flags'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>     2761 |         flags = ksm_vma_flags(mm, NULL, flags);
>          |                 ^
>    2 errors generated.

Ugh ok looks like I forgot to provide an #else for the #ifdef CONFIG_KSM here.

>
>
> vim +/ksm_vma_flags +2589 mm/vma.c
>
>   2586
>   2587	static void update_ksm_flags(struct mmap_state *map)
>   2588	{
> > 2589		map->flags = ksm_vma_flags(map->mm, map->file, map->flags);
>   2590	}
>   2591
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

----8<----
From 2dbb9c4471f6145a513b5a2a661c78d3269fc9fe Mon Sep 17 00:00:00 2001
From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Date: Mon, 19 May 2025 14:36:14 +0100
Subject: [PATCH] fix

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
---
 include/linux/ksm.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index ba5664daca6e..febc8acc565d 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -97,8 +97,11 @@ bool ksm_process_mergeable(struct mm_struct *mm);

 #else  /* !CONFIG_KSM */

-static inline void ksm_add_vma(struct vm_area_struct *vma)
+static inline vm_flags_t ksm_vma_flags(const struct mm_struct *mm,
+		const struct file *file,
+		vm_flags_t vm_flags)
 {
+	return vm_flags;
 }

 static inline int ksm_disable(struct mm_struct *mm)
--
2.49.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-19 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <418d3edbec3a718a7023f1beed5478f5952fc3df.1747431920.git.lorenzo.stoakes@oracle.com>
2025-05-19 13:19 ` [PATCH 3/4] mm: prevent KSM from completely breaking VMA merging kernel test robot
2025-05-19 13:36   ` Lorenzo Stoakes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox