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]
Message-ID: <202409131548.X0MGdN1r-lkp@intel.com>
Date: Fri, 13 Sep 2024 15:58:29 +0800
From: kernel test robot <lkp@...el.com>
To: Oleksandr Ocheretnyi <oocheret@...co.com>, linux@...ck-us.net
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, jdelvare@...e.de,
	linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
	mika.westerberg@...ux.intel.com, oocheret@...co.com,
	wim@...ux-watchdog.org, wsa@...nel.org, xe-linux-external@...co.com
Subject: Re: [PATCH v2] iTCO_wdt: mask NMI_NOW bit for update_no_reboot_bit()
 call

Hi Oleksandr,

kernel test robot noticed the following build warnings:

[auto build test WARNING on westeri-thunderbolt/next]
[also build test WARNING on linus/master v6.11-rc7 next-20240912]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Oleksandr-Ocheretnyi/iTCO_wdt-mask-NMI_NOW-bit-for-update_no_reboot_bit-call/20240912-222231
base:   https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git next
patch link:    https://lore.kernel.org/r/20240912141931.2447826-1-oocheret%40cisco.com
patch subject: [PATCH v2] iTCO_wdt: mask NMI_NOW bit for update_no_reboot_bit() call
config: i386-buildonly-randconfig-001-20240913 (https://download.01.org/0day-ci/archive/20240913/202409131548.X0MGdN1r-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409131548.X0MGdN1r-lkp@intel.com/reproduce)

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/202409131548.X0MGdN1r-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/watchdog/iTCO_wdt.c:226:27: warning: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 4294967039 to 65279 [-Wconstant-conversion]
     226 |         u16 val, newval, mask = (~NMI_NOW);
         |                          ~~~~    ^~~~~~~~
   1 warning generated.


vim +226 drivers/watchdog/iTCO_wdt.c

   222	
   223	static int update_no_reboot_bit_cnt(void *priv, bool set)
   224	{
   225		struct iTCO_wdt_private *p = priv;
 > 226		u16 val, newval, mask = (~NMI_NOW);
   227	
   228		/* writing back 1b1 to NMI_NOW of TCO1_CNT register
   229		 * causes NMI_NOW bit inversion what consequently does
   230		 * not allow to perform the register's value comparison
   231		 * properly.
   232		 *
   233		 * NMI_NOW bit masking for TCO1_CNT register values
   234		 * helps to avoid possible NMI_NOW bit inversions on
   235		 * following write operation.
   236		 */
   237		val = inw(TCO1_CNT(p)) & mask;
   238		if (set)
   239			val |= BIT(0);
   240		else
   241			val &= ~BIT(0);
   242		outw(val, TCO1_CNT(p));
   243		newval = inw(TCO1_CNT(p)) & mask;
   244	
   245		/* make sure the update is successful */
   246		return val != newval ? -EIO : 0;
   247	}
   248	

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