linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jinjie Ruan <ruanjinjie@huawei.com>,
	paul.walmsley@sifive.com, palmer@dabbelt.com,
	aou@eecs.berkeley.edu, peterz@infradead.org, mingo@redhat.com,
	acme@kernel.org, namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, dev.mbstr@gmail.com,
	samuel.holland@sifive.com, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, ruanjinjie@huawei.com
Subject: Re: [PATCH] riscv: stacktrace: Add USER_STACKTRACE support
Date: Sat, 1 Jun 2024 21:27:31 +0800	[thread overview]
Message-ID: <202406012109.PDAjXm2i-lkp@intel.com> (raw)
In-Reply-To: <20240531083258.386709-1-ruanjinjie@huawei.com>

Hi Jinjie,

kernel test robot noticed the following build warnings:

[auto build test WARNING on perf-tools-next/perf-tools-next]
[also build test WARNING on tip/perf/core perf-tools/perf-tools linus/master acme/perf/core v6.10-rc1 next-20240531]
[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/Jinjie-Ruan/riscv-stacktrace-Add-USER_STACKTRACE-support/20240531-163624
base:   https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next
patch link:    https://lore.kernel.org/r/20240531083258.386709-1-ruanjinjie%40huawei.com
patch subject: [PATCH] riscv: stacktrace: Add USER_STACKTRACE support
config: riscv-randconfig-r061-20240601 (https://download.01.org/0day-ci/archive/20240601/202406012109.PDAjXm2i-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0

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/202406012109.PDAjXm2i-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> arch/riscv/kernel/stacktrace.c:188:16-18: WARNING !A || A && B is equivalent to !A || B

vim +188 arch/riscv/kernel/stacktrace.c

   164	
   165	/*
   166	 * Get the return address for a single stackframe and return a pointer to the
   167	 * next frame tail.
   168	 */
   169	static unsigned long unwind_user_frame(stack_trace_consume_fn consume_entry,
   170					       void *cookie, unsigned long fp,
   171					       unsigned long reg_ra)
   172	{
   173		struct stackframe buftail;
   174		unsigned long ra = 0;
   175		unsigned long __user *user_frame_tail =
   176			(unsigned long __user *)(fp - sizeof(struct stackframe));
   177	
   178		/* Check accessibility of one struct frame_tail beyond */
   179		if (!access_ok(user_frame_tail, sizeof(buftail)))
   180			return 0;
   181		if (__copy_from_user_inatomic(&buftail, user_frame_tail,
   182					      sizeof(buftail)))
   183			return 0;
   184	
   185		ra = reg_ra ? : buftail.ra;
   186	
   187		fp = buftail.fp;
 > 188		if (!ra || (ra && !consume_entry(cookie, ra)))
   189			return 0;
   190	
   191		return fp;
   192	}
   193	

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

      reply	other threads:[~2024-06-01 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  8:32 [PATCH] riscv: stacktrace: Add USER_STACKTRACE support Jinjie Ruan
2024-06-01 13:27 ` kernel test robot [this message]

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=202406012109.PDAjXm2i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=dev.mbstr@gmail.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=peterz@infradead.org \
    --cc=ruanjinjie@huawei.com \
    --cc=samuel.holland@sifive.com \
    /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;
as well as URLs for NNTP newsgroup(s).