lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 1 Jun 2024 21:27:31 +0800
From: kernel test robot <lkp@...el.com>
To: Jinjie Ruan <ruanjinjie@...wei.com>, paul.walmsley@...ive.com,
	palmer@...belt.com, aou@...s.berkeley.edu, peterz@...radead.org,
	mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
	mark.rutland@....com, alexander.shishkin@...ux.intel.com,
	jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
	kan.liang@...ux.intel.com, dev.mbstr@...il.com,
	samuel.holland@...ive.com, linux-riscv@...ts.infradead.org,
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, ruanjinjie@...wei.com
Subject: Re: [PATCH] riscv: stacktrace: Add USER_STACKTRACE support

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ