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: <202410150702.UaZ7kvet-lkp@intel.com>
Date: Tue, 15 Oct 2024 07:52:50 +0800
From: kernel test robot <lkp@...el.com>
To: Tao Zhang <quic_taozha@...cinc.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Suzuki K Poulose <suzuki.poulose@....com>
Subject: drivers/hwtracing/coresight/coresight-tpdm.c:288 dsb_mode_store()
 warn: unsigned 'val' is never less than zero.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   eca631b8fe808748d7585059c4307005ca5c5820
commit: 018e43ad1eeefbb8797e4c933953c50c09e3f4f6 coresight-tpdm: Add node to set dsb programming mode
date:   11 months ago
config: arm-randconfig-r073-20241015 (https://download.01.org/0day-ci/archive/20241015/202410150702.UaZ7kvet-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.1.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/202410150702.UaZ7kvet-lkp@intel.com/

smatch warnings:
drivers/hwtracing/coresight/coresight-tpdm.c:288 dsb_mode_store() warn: unsigned 'val' is never less than zero.

vim +/val +288 drivers/hwtracing/coresight/coresight-tpdm.c

   279	
   280	static ssize_t dsb_mode_store(struct device *dev,
   281				      struct device_attribute *attr,
   282				      const char *buf,
   283				      size_t size)
   284	{
   285		struct tpdm_drvdata *drvdata = dev_get_drvdata(dev->parent);
   286		unsigned long val;
   287	
 > 288		if ((kstrtoul(buf, 0, &val)) || (val < 0) ||
   289				(val & ~TPDM_DSB_MODE_MASK))
   290			return -EINVAL;
   291	
   292		spin_lock(&drvdata->spinlock);
   293		drvdata->dsb->mode = val & TPDM_DSB_MODE_MASK;
   294		spin_unlock(&drvdata->spinlock);
   295		return size;
   296	}
   297	static DEVICE_ATTR_RW(dsb_mode);
   298	

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