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:
 <SN6PR02MB41578F335B9C07322D70C723D416A@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Thu, 18 Sep 2025 03:49:43 +0000
From: Michael Kelley <mhklinux@...look.com>
To: Alok Tiwari <alok.a.tiwari@...cle.com>, "kys@...rosoft.com"
	<kys@...rosoft.com>, "haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
	"wei.liu@...nel.org" <wei.liu@...nel.org>, "decui@...rosoft.com"
	<decui@...rosoft.com>, "linux-hyperv@...r.kernel.org"
	<linux-hyperv@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/3] drivers: hv: vmbus: Fix sysfs output format for ring
 buffer index

From: Alok Tiwari <alok.a.tiwari@...cle.com> Sent: Saturday, September 13, 2025 12:25 PM
> 
> The sysfs attributes out_read_index and out_write_index in
> vmbus_drv.c currently use %d to print outbound.current_read_index
> and outbound.current_write_index.
> 
> These fields are u32 values, so printing them with %d (signed) is
> not logically correct. Update the format specifier to %u to
> correctly match their type.
> 
> No functional change, only fixes the sysfs output format.
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
> ---
>  drivers/hv/vmbus_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 2ed5a1e89d69..8b58306cb140 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -322,7 +322,7 @@ static ssize_t out_read_index_show(struct device *dev,
>  					  &outbound);
>  	if (ret < 0)
>  		return ret;
> -	return sysfs_emit(buf, "%d\n", outbound.current_read_index);
> +	return sysfs_emit(buf, "%u\n", outbound.current_read_index);
>  }
>  static DEVICE_ATTR_RO(out_read_index);
> 
> @@ -341,7 +341,7 @@ static ssize_t out_write_index_show(struct device *dev,
>  					  &outbound);
>  	if (ret < 0)
>  		return ret;
> -	return sysfs_emit(buf, "%d\n", outbound.current_write_index);
> +	return sysfs_emit(buf, "%u\n", outbound.current_write_index);
>  }
>  static DEVICE_ATTR_RO(out_write_index);
> 
> --
> 2.50.1
> 

Reviewed-by: Michael Kelley <mhklinux@...look.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ