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  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]
Date:   Tue, 22 Jan 2019 17:08:34 -0600
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/platform/UV: Replace kmalloc and memset with kzalloc
 and kcalloc



On 1/16/19 6:06 AM, Borislav Petkov wrote:

>> -	vp = kmalloc_array(nuvhubs, sizeof(struct uvhub_desc), GFP_KERNEL);
>> -	uvhub_descs = (struct uvhub_desc *)vp;
>> -	memset(uvhub_descs, 0, nuvhubs * sizeof(struct uvhub_desc));
>> +	uvhub_descs = kcalloc(nuvhubs, sizeof(*uvhub_descs), GFP_KERNEL);
> 				       ^^^^^^^^^^^^^^^^^^^^
> 
> I'm changing that back to sizeof(struct uvhub_desc) as it is clearer
> this way.
> 

Okay.

Thanks, Boris.

--
Gustavo

Powered by blists - more mailing lists