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] [day] [month] [year] [list]
Message-ID: <202503190602.IElWB74j-lkp@intel.com>
Date: Wed, 19 Mar 2025 06:56:22 +0800
From: kernel test robot <lkp@...el.com>
To: Peter Hilber <quic_philber@...cinc.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Jason Wang <jasowang@...hat.com>,
	Richard Cochran <richardcochran@...il.com>
Cc: oe-kbuild-all@...ts.linux.dev, Trilok Soni <quic_tsoni@...cinc.com>,
	Peter Hilber <quic_philber@...cinc.com>,
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
	Eugenio PĂ©rez <eperezma@...hat.com>,
	linux-kernel@...r.kernel.org, virtualization@...ts.linux.dev,
	netdev@...r.kernel.org, David Woodhouse <dwmw2@...radead.org>,
	"Ridoux, Julien" <ridouxj@...zon.com>,
	Marc Zyngier <maz@...nel.org>, Mark Rutland <mark.rutland@....com>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Alexandre Belloni <alexandre.belloni@...tlin.com>,
	Parav Pandit <parav@...dia.com>,
	Matias Ezequiel Vara Larsen <mvaralar@...hat.com>,
	Cornelia Huck <cohuck@...hat.com>, Simon Horman <horms@...nel.org>,
	virtio-dev@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v6 2/4] virtio_rtc: Add PTP clocks

Hi Peter,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 9d8960672d63db4b3b04542f5622748b345c637a]

url:    https://github.com/intel-lab-lkp/linux/commits/Peter-Hilber/virtio_rtc-Add-module-and-driver-core/20250314-014130
base:   9d8960672d63db4b3b04542f5622748b345c637a
patch link:    https://lore.kernel.org/r/20250313173707.1492-3-quic_philber%40quicinc.com
patch subject: [PATCH v6 2/4] virtio_rtc: Add PTP clocks
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20250319/202503190602.IElWB74j-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250319/202503190602.IElWB74j-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/202503190602.IElWB74j-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/virtio/virtio_rtc_driver.c: In function 'viortc_probe':
>> drivers/virtio/virtio_rtc_driver.c:665:23: warning: '/variant ' directive output may be truncated writing 9 bytes into a region of size between 6 and 15 [-Wformat-truncation=]
       "Virtio PTP type %d/variant %d", clock_type,
                          ^~~~~~~~~
   drivers/virtio/virtio_rtc_driver.c:665:4: note: directive argument in the range [0, 2147483647]
       "Virtio PTP type %d/variant %d", clock_type,
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/virtio/virtio_rtc_driver.c:664:2: note: 'snprintf' output between 28 and 46 bytes into a destination of size 32
     snprintf(ptp_clock_name, PTP_CLOCK_NAME_LEN,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       "Virtio PTP type %d/variant %d", clock_type,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       leap_second_smearing);
       ~~~~~~~~~~~~~~~~~~~~~


vim +665 drivers/virtio/virtio_rtc_driver.c

   641	
   642	/*
   643	 * init, deinit
   644	 */
   645	
   646	/**
   647	 * viortc_init_ptp_clock() - init and register PTP clock
   648	 * @viortc: device data
   649	 * @vio_clk_id: virtio_rtc clock id
   650	 * @clock_type: virtio_rtc clock type
   651	 * @leap_second_smearing: virtio_rtc leap second smearing
   652	 *
   653	 * Context: Process context.
   654	 * Return: Positive if registered, zero if not supported by configuration,
   655	 *         negative error code otherwise.
   656	 */
   657	static int viortc_init_ptp_clock(struct viortc_dev *viortc, u16 vio_clk_id,
   658					 u8 clock_type, u8 leap_second_smearing)
   659	{
   660		struct device *dev = &viortc->vdev->dev;
   661		char ptp_clock_name[PTP_CLOCK_NAME_LEN];
   662		struct viortc_ptp_clock *vio_ptp;
   663	
   664		snprintf(ptp_clock_name, PTP_CLOCK_NAME_LEN,
 > 665			 "Virtio PTP type %d/variant %d", clock_type,
   666			 leap_second_smearing);
   667	
   668		vio_ptp = viortc_ptp_register(viortc, dev, vio_clk_id, ptp_clock_name);
   669		if (IS_ERR(vio_ptp)) {
   670			dev_err(dev, "failed to register PTP clock '%s'\n",
   671				ptp_clock_name);
   672			return PTR_ERR(vio_ptp);
   673		}
   674	
   675		viortc->clocks_to_unregister[vio_clk_id] = vio_ptp;
   676	
   677		return !!vio_ptp;
   678	}
   679	

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