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: <202412302112.rtTcbfVd-lkp@intel.com>
Date: Mon, 30 Dec 2024 21:35:28 +0800
From: kernel test robot <lkp@...el.com>
To: Rahul Rameshbabu <rrameshbabu@...dia.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Saeed Mahameed <saeedm@...dia.com>,
	Tariq Toukan <tariqt@...dia.com>
Subject: drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c:397
 mlx5_ptp_freq_adj_real_time() warn: always true condition '(scaled_ppm <=
 (((~0) >> 1))) => (s32min-s32max <= s32max)'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   fc033cf25e612e840e545f8d5ad2edd6ba613ed5
commit: 78c1b26754d9df062c3c8e08f5d6427967e3ba4b net/mlx5: Convert scaled ppm values outside the s32 range for PHC frequency adjustments
date:   1 year, 2 months ago
config: xtensa-randconfig-r073-20241229 (https://download.01.org/0day-ci/archive/20241230/202412302112.rtTcbfVd-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 14.2.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/202412302112.rtTcbfVd-lkp@intel.com/

New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c:397 mlx5_ptp_freq_adj_real_time() warn: always true condition '(scaled_ppm <= (((~0) >> 1))) => (s32min-s32max <= s32max)'
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c:397 mlx5_ptp_freq_adj_real_time() warn: always true condition '(scaled_ppm >= ((-(((~0) >> 1)) - 1))) => (s32min-s32max >= s32min)'

Old smatch warnings:
arch/xtensa/include/asm/thread_info.h:97 current_thread_info() warn: inconsistent indenting

vim +397 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c

   389	
   390	static int mlx5_ptp_freq_adj_real_time(struct mlx5_core_dev *mdev, long scaled_ppm)
   391	{
   392		u32 in[MLX5_ST_SZ_DW(mtutc_reg)] = {};
   393	
   394		MLX5_SET(mtutc_reg, in, operation, MLX5_MTUTC_OPERATION_ADJUST_FREQ_UTC);
   395	
   396		if (MLX5_CAP_MCAM_FEATURE(mdev, mtutc_freq_adj_units) &&
 > 397		    scaled_ppm <= S32_MAX && scaled_ppm >= S32_MIN) {
   398			/* HW scaled_ppm support on mlx5 devices only supports a 32-bit value */
   399			MLX5_SET(mtutc_reg, in, freq_adj_units,
   400				 MLX5_MTUTC_FREQ_ADJ_UNITS_SCALED_PPM);
   401			MLX5_SET(mtutc_reg, in, freq_adjustment, (s32)scaled_ppm);
   402		} else {
   403			MLX5_SET(mtutc_reg, in, freq_adj_units, MLX5_MTUTC_FREQ_ADJ_UNITS_PPB);
   404			MLX5_SET(mtutc_reg, in, freq_adjustment, scaled_ppm_to_ppb(scaled_ppm));
   405		}
   406	
   407		return mlx5_set_mtutc(mdev, in, sizeof(in));
   408	}
   409	

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