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: <PH0PR11MB567394BD9C528AADC231DC6FCB1BA@PH0PR11MB5673.namprd11.prod.outlook.com>
Date:   Fri, 18 Aug 2023 01:56:03 +0000
From:   "Lee, Kah Jing" <kah.jing.lee@...el.com>
To:     Dinh Nguyen <dinguyen@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Ang, Tien Sung" <tien.sung.ang@...el.com>
Subject: RE: [PATCH] drivers: firmware: stratix10-rsu: Fix max_retry counter
 value

> On 8/3/23 20:35, kah.jing.lee@...el.com wrote:
> > From: Kah Jing Lee <kah.jing.lee@...el.com>
> >
> > Fix the max_retry value because the value is truncated at scnprintf
> > format specifier, with added hex symbol and newline.
> >
> > Signed-off-by: Kah Jing Lee <kah.jing.lee@...el.com>
> > ---
> >   drivers/firmware/stratix10-rsu.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/firmware/stratix10-rsu.c
> > b/drivers/firmware/stratix10-rsu.c
> > index e51c95f8d445..98ec39f6dae8 100644
> > --- a/drivers/firmware/stratix10-rsu.c
> > +++ b/drivers/firmware/stratix10-rsu.c
> > @@ -405,8 +405,7 @@ static ssize_t max_retry_show(struct device *dev,
> >   	if (!priv)
> >   		return -ENODEV;
> >
> > -	return scnprintf(buf, sizeof(priv->max_retry),
> > -			 "0x%08x\n", priv->max_retry);
> > +	return scnprintf(buf, PAGE_SIZE, "0x%08x\n", priv->max_retry);
> >   }
> >
> 
> This would be a good time to switch over to use sysfs_emit()
Let me update and send in v2.
Thanks.
> 
> Dinh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ