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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 8 Aug 2020 09:41:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gurbir Arora <gurbaror@...eaurora.org>,
        linux-remoteproc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, bjorn.andersson@...aro.org,
        mathieu.poirier@...aro.org, tsoni@...eaurora.org,
        psodagud@...eaurora.org, sidgup@...eaurora.org,
        rishabhb@...eaurora.org, Gurbir Arora <gurbaror@...eaurora.org>
Subject: Re: [PATCH 2/3] remoteproc: qcom: Add capability to collect minidumps

Hi Gurbir,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20200807]
[cannot apply to linux/master linus/master v5.8 v5.8-rc7 v5.8-rc6 v5.8]
[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]

url:    https://github.com/0day-ci/linux/commits/Gurbir-Arora/Introduce-mini-dump-support-for-remoteproc/20200808-073315
base:    471e638c4c5df4c0035a76a561ada4d28228e5fd
config: nios2-randconfig-s032-20200807 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-118-ge1578773-dirty
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/remoteproc/remoteproc_coredump.c:489:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *s @@     got struct md_ss_region [noderef] __iomem *[assigned] region_info @@
>> drivers/remoteproc/remoteproc_coredump.c:489:38: sparse:     expected void const *s
   drivers/remoteproc/remoteproc_coredump.c:489:38: sparse:     got struct md_ss_region [noderef] __iomem *[assigned] region_info
>> drivers/remoteproc/remoteproc_coredump.c:491:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *s @@     got void [noderef] __iomem *[assigned] offset @@
   drivers/remoteproc/remoteproc_coredump.c:491:37: sparse:     expected void const *s
   drivers/remoteproc/remoteproc_coredump.c:491:37: sparse:     got void [noderef] __iomem *[assigned] offset
   drivers/remoteproc/remoteproc_coredump.c:493:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *s @@     got void [noderef] __iomem *[assigned] offset @@
   drivers/remoteproc/remoteproc_coredump.c:493:39: sparse:     expected void const *s
   drivers/remoteproc/remoteproc_coredump.c:493:39: sparse:     got void [noderef] __iomem *[assigned] offset

vim +489 drivers/remoteproc/remoteproc_coredump.c

   460	
   461	static void add_minidump_segments(struct rproc *rproc, struct md_ss_toc *minidump_ss)
   462	{
   463		struct md_ss_region __iomem *region_info, *ptr;
   464		int i, seg_cnt = minidump_ss->ss_region_count;
   465		void __iomem *offset;
   466		dma_addr_t da;
   467		size_t size;
   468		char *name;
   469	
   470		if (!list_empty(&rproc->dump_segments))
   471			goto minidump;
   472	
   473		region_info = ioremap((unsigned long)minidump_ss->md_ss_smem_regions_baseptr,
   474				      seg_cnt * sizeof(struct md_ss_region));
   475	
   476		if (!region_info) {
   477			dev_err(&rproc->dev, "invalid minidump subsystem table\n");
   478			return;
   479		}
   480	
   481		/* Iterate over the subsystem's segments and create rproc custom dump segments */
   482		ptr = region_info;
   483		offset = ptr;
   484		for (i = 0; i < seg_cnt; i++) {
   485			offset = region_info;
   486			offset += sizeof(region_info->name) + sizeof(region_info->seq_num);
   487			if (__raw_readl(offset) == MD_REGION_VALID) {
   488				name = kmalloc(MAX_REGION_NAME_LENGTH, GFP_KERNEL);
 > 489				memcpy(name, region_info, sizeof(region_info->name));
   490				offset += sizeof(region_info->md_valid);
 > 491				memcpy(&da, offset, sizeof(region_info->region_base_address));
   492				offset += sizeof(region_info->region_base_address);
   493				memcpy(&size, offset, sizeof(region_info->region_size));
   494				rproc_coredump_add_custom_segment(rproc, da, size, NULL, name);
   495			}
   496			region_info++;
   497		}
   498	
   499	minidump:
   500		return do_rproc_minidump(rproc);
   501	}
   502	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (24803 bytes)

Powered by blists - more mailing lists