All of lore.kernel.org
 help / color / mirror / Atom feed
* [kees:for-next/execve 1/2] fs/coredump.c:1273:undefined reference to `get_dump_page'
@ 2025-02-23 11:20 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-23 11:20 UTC (permalink / raw)
  To: Brian Mak; +Cc: oe-kbuild-all, Kees Cook

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
head:   9a3e62e7aff182403c9cf21e7dc523a42ed66ea1
commit: ff41385709f01519a97379ce7671ee4e91e301e1 [1/2] coredump: Only sort VMAs when truncating or core_sort_vma sysctl is set
config: loongarch-randconfig-001-20250223 (https://download.01.org/0day-ci/archive/20250223/202502231914.ROOVWMZN-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250223/202502231914.ROOVWMZN-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/202502231914.ROOVWMZN-lkp@intel.com/

All errors (new ones prefixed by >>):

   loongarch64-linux-ld: fs/coredump.o: in function `dump_vma_snapshot':
>> fs/coredump.c:1273:(.text+0x8e0): undefined reference to `get_dump_page'


vim +1273 fs/coredump.c

  1206	
  1207	/*
  1208	 * Under the mmap_lock, take a snapshot of relevant information about the task's
  1209	 * VMAs.
  1210	 */
  1211	static bool dump_vma_snapshot(struct coredump_params *cprm)
  1212	{
  1213		struct vm_area_struct *gate_vma, *vma = NULL;
  1214		struct mm_struct *mm = current->mm;
  1215		VMA_ITERATOR(vmi, mm, 0);
  1216		int i = 0;
  1217		size_t sparse_vma_dump_size = 0;
  1218	
  1219		/*
  1220		 * Once the stack expansion code is fixed to not change VMA bounds
  1221		 * under mmap_lock in read mode, this can be changed to take the
  1222		 * mmap_lock in read mode.
  1223		 */
  1224		if (mmap_write_lock_killable(mm))
  1225			return false;
  1226	
  1227		cprm->vma_data_size = 0;
  1228		gate_vma = get_gate_vma(mm);
  1229		cprm->vma_count = mm->map_count + (gate_vma ? 1 : 0);
  1230	
  1231		cprm->vma_meta = kvmalloc_array(cprm->vma_count, sizeof(*cprm->vma_meta), GFP_KERNEL);
  1232		if (!cprm->vma_meta) {
  1233			mmap_write_unlock(mm);
  1234			return false;
  1235		}
  1236	
  1237		while ((vma = coredump_next_vma(&vmi, vma, gate_vma)) != NULL) {
  1238			struct core_vma_metadata *m = cprm->vma_meta + i;
  1239	
  1240			m->start = vma->vm_start;
  1241			m->end = vma->vm_end;
  1242			m->flags = vma->vm_flags;
  1243			m->dump_size = vma_dump_size(vma, cprm->mm_flags);
  1244			m->pgoff = vma->vm_pgoff;
  1245			m->file = vma->vm_file;
  1246			if (m->file)
  1247				get_file(m->file);
  1248			i++;
  1249		}
  1250	
  1251		mmap_write_unlock(mm);
  1252	
  1253		for (i = 0; i < cprm->vma_count; i++) {
  1254			struct core_vma_metadata *m = cprm->vma_meta + i;
  1255			unsigned long addr;
  1256	
  1257			if (m->dump_size == DUMP_SIZE_MAYBE_ELFHDR_PLACEHOLDER) {
  1258				char elfmag[SELFMAG];
  1259	
  1260				if (copy_from_user(elfmag, (void __user *)m->start, SELFMAG) ||
  1261						memcmp(elfmag, ELFMAG, SELFMAG) != 0) {
  1262					m->dump_size = 0;
  1263				} else {
  1264					m->dump_size = PAGE_SIZE;
  1265				}
  1266			}
  1267	
  1268			cprm->vma_data_size += m->dump_size;
  1269			sparse_vma_dump_size += m->dump_size;
  1270	
  1271			/* Subtract zero pages from the sparse_vma_dump_size. */
  1272			for (addr = m->start; addr < m->start + m->dump_size; addr += PAGE_SIZE) {
> 1273				struct page *page = get_dump_page(addr);

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-23 11:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-23 11:20 [kees:for-next/execve 1/2] fs/coredump.c:1273:undefined reference to `get_dump_page' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.