linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "qiwu.chen" <qiwuchen55@gmail.com>,
	corbet@lwn.net, oleg@redhat.com, catalin.marinas@arm.com,
	will@kernel.org, paulmck@kernel.org, akpm@linux-foundation.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
	"qiwu.chen" <qiwu.chen@transsion.com>
Subject: Re: [PATCH v4 1/2] panic: add option to dump task maps info in panic_print
Date: Tue, 24 Sep 2024 23:06:50 +0800	[thread overview]
Message-ID: <202409242208.SqjERCDw-lkp@intel.com> (raw)
In-Reply-To: <20240924074341.37272-1-qiwu.chen@transsion.com>

Hi qiwu.chen,

kernel test robot noticed the following build errors:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on brauner-vfs/vfs.all akpm-mm/mm-everything linus/master v6.11 next-20240924]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/qiwu-chen/arm64-show-signal-info-for-global-init/20240924-154508
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link:    https://lore.kernel.org/r/20240924074341.37272-1-qiwu.chen%40transsion.com
patch subject: [PATCH v4 1/2] panic: add option to dump task maps info in panic_print
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20240924/202409242208.SqjERCDw-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 8663a75fa2f31299ab8d1d90288d9df92aadee88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240924/202409242208.SqjERCDw-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/202409242208.SqjERCDw-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/panic.c:15:
   In file included from include/linux/kgdb.h:19:
   In file included from include/linux/kprobes.h:28:
   In file included from include/linux/ftrace.h:13:
   In file included from include/linux/kallsyms.h:13:
   In file included from include/linux/mm.h:2232:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> kernel/panic.c:235:3: error: call to undeclared function 'get_vma_name'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     235 |                 get_vma_name(vma, &path, &name, &name_fmt);
         |                 ^
   1 warning and 1 error generated.


vim +/get_vma_name +235 kernel/panic.c

   210	
   211	/*
   212	 * This function is called in panic proccess if the PANIC_PRINT_TASK_MAPS_INFO
   213	 * flag is specified in panic_print, which is helpful to debug panic issues due
   214	 * to an unhandled falut in user mode such as kill init.
   215	 */
   216	static void dump_task_maps_info(struct task_struct *tsk)
   217	{
   218		struct pt_regs *user_ret = task_pt_regs(tsk);
   219		struct mm_struct *mm = tsk->mm;
   220		struct vm_area_struct *vma;
   221	
   222		if (!mm || !user_mode(user_ret))
   223			return;
   224	
   225		pr_info("Dump task %s:%d maps start\n", tsk->comm, task_pid_nr(tsk));
   226		mmap_read_lock(mm);
   227		VMA_ITERATOR(vmi, mm, 0);
   228		for_each_vma(vmi, vma) {
   229			int flags = vma->vm_flags;
   230			unsigned long long pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
   231			const struct path *path;
   232			const char *name_fmt, *name;
   233			char name_buf[SZ_256];
   234	
 > 235			get_vma_name(vma, &path, &name, &name_fmt);
   236			if (path) {
   237				name = d_path(path, name_buf, sizeof(name_buf));
   238				name = IS_ERR(name) ? "?" : name;
   239			} else if (name || name_fmt) {
   240				snprintf(name_buf, sizeof(name_buf), name_fmt ?: "%s", name);
   241				name = name_buf;
   242			}
   243	
   244			if (name)
   245				pr_info("%08lx-%08lx %c%c%c%c %08llx %s\n",
   246					vma->vm_start, vma->vm_end,
   247					flags & VM_READ ? 'r' : '-',
   248					flags & VM_WRITE ? 'w' : '-',
   249					flags & VM_EXEC ? 'x' : '-',
   250					flags & VM_MAYSHARE ? 's' : 'p',
   251					pgoff, name);
   252	
   253		}
   254		mmap_read_unlock(mm);
   255		pr_info("Dump task %s:%d maps end\n", tsk->comm, task_pid_nr(tsk));
   256	}
   257	

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


  parent reply	other threads:[~2024-09-24 15:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24  7:43 qiwu.chen
2024-09-24  7:43 ` [PATCH v4 2/2] arm64: show signal info for global init qiwu.chen
2024-09-24 18:36   ` Oleg Nesterov
2024-09-25  3:54     ` chenqiwu
2024-09-25 12:05       ` Oleg Nesterov
2024-09-26 10:12         ` chenqiwu
2024-09-24 11:33 ` [PATCH v4 1/2] panic: add option to dump task maps info in panic_print Oleg Nesterov
2024-09-25  8:27   ` chenqiwu
2024-09-25 12:19     ` Oleg Nesterov
2024-09-26  3:30       ` chenqiwu
2024-09-24 15:06 ` kernel test robot
2024-09-24 15:06 ` kernel test robot [this message]
2024-10-01 11:23 ` Lorenzo Stoakes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202409242208.SqjERCDw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oleg@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=qiwu.chen@transsion.com \
    --cc=qiwuchen55@gmail.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox