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>] [day] [month] [year] [list]
Message-ID: <202208280102.vCNrXRCa-lkp@intel.com>
Date:   Sun, 28 Aug 2022 01:14:40 +0800
From:   kernel test robot <lkp@...el.com>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        0day robot <lkp@...el.com>
Subject: net/9p/trans_fd.c:263:31: sparse: sparse: incorrect type in argument
 1 (different address spaces)

tree:   https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220827-141406/Tetsuo-Handa/9p-trans_fd-always-use-O_NONBLOCK-read-write/20220826-233109
head:   a1740a60720018fa78f0cfe45db5cfc85e2d3a6d
commit: a1740a60720018fa78f0cfe45db5cfc85e2d3a6d 9p/trans_fd: perform read/write with TIF_SIGPENDING set
date:   11 hours ago
config: i386-randconfig-s001 (https://download.01.org/0day-ci/archive/20220828/202208280102.vCNrXRCa-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/a1740a60720018fa78f0cfe45db5cfc85e2d3a6d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review UPDATE-20220827-141406/Tetsuo-Handa/9p-trans_fd-always-use-O_NONBLOCK-read-write/20220826-233109
        git checkout a1740a60720018fa78f0cfe45db5cfc85e2d3a6d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/9p/

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

sparse warnings: (new ones prefixed by >>)
>> net/9p/trans_fd.c:263:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:263:31: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:263:31: sparse:     got struct spinlock [noderef] __rcu *
   net/9p/trans_fd.c:265:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:265:33: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:265:33: sparse:     got struct spinlock [noderef] __rcu *
   net/9p/trans_fd.c:431:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:431:31: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:431:31: sparse:     got struct spinlock [noderef] __rcu *
   net/9p/trans_fd.c:433:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   net/9p/trans_fd.c:433:33: sparse:     expected struct spinlock [usertype] *lock
   net/9p/trans_fd.c:433:33: sparse:     got struct spinlock [noderef] __rcu *

vim +263 net/9p/trans_fd.c

   238	
   239	/**
   240	 * p9_fd_read- read from a fd
   241	 * @client: client instance
   242	 * @v: buffer to receive data into
   243	 * @len: size of receive buffer
   244	 *
   245	 */
   246	
   247	static int p9_fd_read(struct p9_client *client, void *v, int len)
   248	{
   249		int ret;
   250		struct p9_trans_fd *ts = NULL;
   251		loff_t pos;
   252	
   253		if (client && client->status != Disconnected)
   254			ts = client->trans;
   255	
   256		if (!ts)
   257			return -EREMOTEIO;
   258	
   259		pos = ts->rd->f_pos;
   260		/* Force non-blocking read() even without O_NONBLOCK. */
   261		set_thread_flag(TIF_SIGPENDING);
   262		ret = kernel_read(ts->rd, v, len, &pos);
 > 263		spin_lock_irq(&current->sighand->siglock);
   264		recalc_sigpending();
   265		spin_unlock_irq(&current->sighand->siglock);
   266		if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN)
   267			client->status = Disconnected;
   268		return ret;
   269	}
   270	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ