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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Jan 2022 12:48:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        robh+dt@...nel.org, gregkh@...uxfoundation.org
Cc:     kbuild-all@...ts.01.org, devicetree@...r.kernel.org,
        ekangupt@....qualcomm.com, bkumar@....qualcomm.com,
        linux-kernel@...r.kernel.org, srini@...nel.org,
        bjorn.andersson@...aro.org, linux-arm-msm@...r.kernel.org,
        Jeya R <jeyr@...eaurora.org>
Subject: Re: [PATCH v3 02/12] misc: fastrpc: add support for
 FASTRPC_IOCTL_MEM_MAP/UNMAP

Hi Srinivas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on robh/for-next linux/master linus/master v5.17-rc1 next-20220125]
[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/Srinivas-Kandagatla/misc-fastrpc-Add-missing-DSP-FastRPC-features/20220126-215705
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 515a2f507491e7c3818e74ef4f4e088c1fecb190
config: csky-randconfig-s031-20220124 (https://download.01.org/0day-ci/archive/20220127/202201271240.IB5pvRUs-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 11.2.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.4-dirty
        # https://github.com/0day-ci/linux/commit/b1c0b7969aa491881596e862a90a07afae4bdfd7
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Srinivas-Kandagatla/misc-fastrpc-Add-missing-DSP-FastRPC-features/20220126-215705
        git checkout b1c0b7969aa491881596e862a90a07afae4bdfd7
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash

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/misc/fastrpc.c:1544:30: sparse: sparse: non size-preserving pointer to integer cast
   drivers/misc/fastrpc.c:1599:30: sparse: sparse: non size-preserving pointer to integer cast
   drivers/misc/fastrpc.c:1605:30: sparse: sparse: non size-preserving pointer to integer cast
   drivers/misc/fastrpc.c:1608:30: sparse: sparse: non size-preserving pointer to integer cast
   drivers/misc/fastrpc.c:1611:30: sparse: sparse: non size-preserving pointer to integer cast

vim +1544 drivers/misc/fastrpc.c

  1515	
  1516	static int fastrpc_req_mem_unmap_impl(struct fastrpc_user *fl, struct fastrpc_mem_unmap *req)
  1517	{
  1518		struct fastrpc_invoke_args args[1] = { [0] = { 0 } };
  1519		struct fastrpc_map *map = NULL, *m;
  1520		struct fastrpc_mem_unmap_req_msg req_msg = { 0 };
  1521		int err = 0;
  1522		u32 sc;
  1523		struct device *dev = fl->sctx->dev;
  1524	
  1525		spin_lock(&fl->lock);
  1526		list_for_each_entry_safe(map, m, &fl->maps, node) {
  1527			if ((req->fd < 0 || map->fd == req->fd) && (map->raddr == req->vaddr))
  1528				break;
  1529			map = NULL;
  1530		}
  1531	
  1532		spin_unlock(&fl->lock);
  1533	
  1534		if (!map) {
  1535			dev_err(dev, "map not in list\n");
  1536			return -EINVAL;
  1537		}
  1538	
  1539		req_msg.pgid = fl->tgid;
  1540		req_msg.len = map->len;
  1541		req_msg.vaddrin = map->raddr;
  1542		req_msg.fd = map->fd;
  1543	
> 1544		args[0].ptr = (u64) &req_msg;
  1545		args[0].length = sizeof(req_msg);
  1546	
  1547		sc = FASTRPC_SCALARS(FASTRPC_RMID_INIT_MEM_UNMAP, 1, 0);
  1548		err = fastrpc_internal_invoke(fl, true, FASTRPC_INIT_HANDLE, sc,
  1549					      &args[0]);
  1550		fastrpc_map_put(map);
  1551		if (err)
  1552			dev_err(dev, "unmmap\tpt fd = %d, 0x%09llx error\n",  map->fd, map->raddr);
  1553	
  1554		return err;
  1555	}
  1556	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ