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: <IA1PR11MB6097D7EE44240E62DEA9AC769B82A@IA1PR11MB6097.namprd11.prod.outlook.com>
Date:   Thu, 30 Nov 2023 00:31:09 +0000
From:   "Yu, Fenghua" <fenghua.yu@...el.com>
To:     Tom Zanussi <tom.zanussi@...ux.intel.com>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "vkoul@...nel.org" <vkoul@...nel.org>
CC:     "Jiang, Dave" <dave.jiang@...el.com>,
        "Luck, Tony" <tony.luck@...el.com>,
        "Feghali, Wajdi K" <wajdi.k.feghali@...el.com>,
        "Guilford, James" <james.guilford@...el.com>,
        "Sridhar, Kanchana P" <kanchana.p.sridhar@...el.com>,
        "Gopal, Vinodh" <vinodh.gopal@...el.com>,
        "Cabiddu, Giovanni" <giovanni.cabiddu@...el.com>,
        "pavel@....cz" <pavel@....cz>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>
Subject: RE: [PATCH v10 14/14] dmaengine: idxd: Add support for device/wq
 defaults

Hi, Tom,

> From: Tom Zanussi <tom.zanussi@...ux.intel.com>
> > > +       /* set name to "iaa_crypto" */
> > > +       memset(wq->name, 0, WQ_NAME_SIZE + 1);
> > > +       strscpy(wq->name, "iaa_crypto", WQ_NAME_SIZE + 1);
> >
> > Is strcpy(wq->name, "iaa_crypto") simpler than memset() and strscpy()?
> 
> That's what I originally had, but checkpatch complained about it, suggesting
> strscpy, so I changed it to make checkpatch happy.

Why is size WQ_NAME_SIZE+1 instead of WQ_NAME_SIZE? Will WQ_NAME_SIZE+1 cause mem corruption because wq->name is defined as a string with WQ_NAME_SIZE?
> 
> >
> > > +
> > > +       /* set driver_name to "crypto" */
> > > +       memset(wq->driver_name, 0, DRIVER_NAME_SIZE + 1);
> > > +       strscpy(wq->driver_name, "crypto", DRIVER_NAME_SIZE + 1);
> >
> > Is strcpy(wq->driver_name, "crypto") simpler?
> 
> Same here.

Ditto.

Thanks.

-Fenghua

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ