public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: qiwuchen55@gmail.com, catalin.marinas@arm.com, will@kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, chenqiwu <qiwu.chen@transsion.com>
Subject: Re: [PATCH] arm64: Add user stacktrace support
Date: Sun, 19 Nov 2023 04:40:53 +0800	[thread overview]
Message-ID: <202311190405.QUvoF0b3-lkp@intel.com> (raw)
In-Reply-To: <20231118134504.154842-1-qiwu.chen@transsion.com>

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on linus/master v6.7-rc1 next-20231117]
[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/qiwuchen55-gmail-com/arm64-Add-user-stacktrace-support/20231118-214756
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link:    https://lore.kernel.org/r/20231118134504.154842-1-qiwu.chen%40transsion.com
patch subject: [PATCH] arm64: Add user stacktrace support
config: arm64-randconfig-r071-20231119 (https://download.01.org/0day-ci/archive/20231119/202311190405.QUvoF0b3-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231119/202311190405.QUvoF0b3-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/202311190405.QUvoF0b3-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/arm64/kernel/stacktrace.c:393: warning: expecting prototype for stack_trace_save_user(). Prototype was for arch_stack_walk_user() instead


vim +393 arch/arm64/kernel/stacktrace.c

   384	
   385	/**
   386	 * stack_trace_save_user - Save user space stack traces into a storage array
   387	 * @consume_entry: Callback for save a user space stack trace
   388	 * @cookie:	Caller supplied pointer handed back by arch_stack_walk()
   389	 * @regs: The pt_regs pointer of current task
   390	 */
   391	void arch_stack_walk_user(stack_trace_consume_fn consume_entry, void *cookie,
   392				  const struct pt_regs *regs)
 > 393	{
   394		struct stack_frame_user frame;
   395		struct vm_area_struct *vma;
   396		unsigned long userstack_start, userstack_end;
   397		struct task_struct *tsk = current;
   398	
   399		/* TODO: support stack unwind for compat user mode */
   400		if (!regs || !user_mode(regs) || compat_user_mode(regs))
   401			return;
   402	
   403		userstack_start = regs->user_regs.sp;
   404		vma = find_user_stack_vma(tsk, userstack_start);
   405		if (!vma)
   406			return;
   407	
   408		userstack_end = vma->vm_end;
   409		frame.fp = regs->user_regs.regs[29];
   410		frame.sp = userstack_start;
   411		frame.pc = regs->user_regs.pc;
   412	
   413		while (1) {
   414			unsigned long where = frame.pc;
   415	
   416			/* Sanity check: ABI requires pc to be aligned 4 bytes. */
   417			if (!where || where & 0x3)
   418				break;
   419			if (!consume_entry(cookie, where))
   420				break;
   421			if (arch_unwind_user_frame(tsk, userstack_end, &frame) < 0)
   422				break;
   423		}
   424	}
   425	

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-11-18 20:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-18 13:45 [PATCH] arm64: Add user stacktrace support qiwuchen55
2023-11-18 20:40 ` kernel test robot [this message]
2023-11-20 14:29 ` Mark Rutland
2023-11-20 17:46   ` Mark Rutland
2023-11-21  9:03   ` chenqiwu
2023-11-21 14:05     ` Mark Rutland
2023-11-24  9:55       ` chenqiwu
2023-11-24 10:12         ` Mark Rutland

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=202311190405.QUvoF0b3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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