linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/scsi/mpt3sas/mpt3sas_ctl.c:1900 _ctl_diag_register() warn: potential spectre issue 'ioc->diag_buffer_status'
@ 2020-08-11 14:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-11 14:21 UTC (permalink / raw)
  To: Sreekanth Reddy; +Cc: kbuild-all, linux-kernel, Martin K. Petersen

[-- Attachment #1: Type: text/plain, Size: 2698 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   00e4db51259a5f936fec1424b884f029479d3981
commit: a8a6cbcd038de4ee3722c17edd7a4d84ce423f7d scsi: mpt3sas: Add app owned flag support for diag buffer
date:   11 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0

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

New smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_ctl.c:1900 _ctl_diag_register() warn: potential spectre issue 'ioc->diag_buffer_status' [w]

Old smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_ctl.c:701 _ctl_do_mpt_command() error: copy_from_user() 'mpi_request' too small (65535 vs 4294967292)
drivers/scsi/mpt3sas/mpt3sas_ctl.c:1812 mpt3sas_enable_diag_buffer() warn: inconsistent indenting
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2042 _ctl_diag_query() warn: potential spectre issue 'ioc->diag_buffer' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2043 _ctl_diag_query() warn: possible spectre second half.  'request_data'
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2067 _ctl_diag_query() warn: potential spectre issue 'ioc->product_specific' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2069 _ctl_diag_query() warn: potential spectre issue 'ioc->diag_buffer_sz' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2071 _ctl_diag_query() warn: potential spectre issue 'ioc->unique_id' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2072 _ctl_diag_query() warn: potential spectre issue 'ioc->diagnostic_flags' [r]

vim +1900 drivers/scsi/mpt3sas/mpt3sas_ctl.c

  1875	
  1876	/**
  1877	 * _ctl_diag_register - application register with driver
  1878	 * @ioc: per adapter object
  1879	 * @arg: user space buffer containing ioctl content
  1880	 *
  1881	 * This will allow the driver to setup any required buffers that will be
  1882	 * needed by firmware to communicate with the driver.
  1883	 */
  1884	static long
  1885	_ctl_diag_register(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
  1886	{
  1887		struct mpt3_diag_register karg;
  1888		long rc;
  1889	
  1890		if (copy_from_user(&karg, arg, sizeof(karg))) {
  1891			pr_err("failure at %s:%d/%s()!\n",
  1892			    __FILE__, __LINE__, __func__);
  1893			return -EFAULT;
  1894		}
  1895	
  1896		rc = _ctl_diag_register_2(ioc, &karg);
  1897	
  1898		if (!rc && (ioc->diag_buffer_status[karg.buffer_type] &
  1899		    MPT3_DIAG_BUFFER_IS_REGISTERED))
> 1900			ioc->diag_buffer_status[karg.buffer_type] |=
  1901			    MPT3_DIAG_BUFFER_IS_APP_OWNED;
  1902	
  1903		return rc;
  1904	}
  1905	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29765 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-11 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 14:21 drivers/scsi/mpt3sas/mpt3sas_ctl.c:1900 _ctl_diag_register() warn: potential spectre issue 'ioc->diag_buffer_status' kernel test robot

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).