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]
Date:   Tue, 8 Aug 2023 12:35:30 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Huibin Shi <henrys@...icom-usa.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Henry Shi <henryshi2018@...il.com>,
        "hbshi69@...mail.com" <hbshi69@...mail.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
        "hdegoede@...hat.com" <hdegoede@...hat.com>,
        "markgross@...nel.org" <markgross@...nel.org>,
        "jdelvare@...e.com" <jdelvare@...e.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "platform-driver-x86@...r.kernel.org" 
        <platform-driver-x86@...r.kernel.org>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>
Cc:     "hb_shi2003@...oo.com" <hb_shi2003@...oo.com>,
        Wen Wang <wenw@...icom-usa.com>
Subject: Re: [PATCH] Add Silicom Platform Driver

On 8/8/23 12:19, Huibin Shi wrote:
> Guenter,
> 
> Here is the implementation of  devm_kmemdup(), *src is the extra argument
> 
> void *devm_kmemdup(struct device *dev, const void *src, size_t len, gfp_t gfp)
> {
> 	void *p;
> 
> 	p = devm_kmalloc(dev, len, gfp);
> 	if (p)
> 		memcpy(p, src, len);
> 
> 	return p;
> }
> 

So you don't want to use devm_kmemdup() because of its 'src' argument, and instead
re-implement it locally by using devm_kzalloc() followed by memcpy() ? Really ?

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ