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: <22213ddd-90b3-4d33-aa80-4b3500a21a2e@web.de>
Date: Thu, 29 Aug 2024 09:55:49 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Dev Jain <dev.jain@....com>, Zhu Jun <zhujun2@...s.chinamobile.com>,
 linux-mm@...ck.org, kernel-janitors@...r.kernel.org,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: tools/mm: Use calloc and check the potential memory allocation
 failure

>>> Replace malloc with calloc and add memory allocating check
>>                        memset(…, 0, …) call by calloc()?
>
> Calloc returns zeroed-out memory.

I propose to improve the change description considerably.


>>> of comm_str before used.
>> * Add also a null pointer check for the detection of a memory allocation failure.
>
> Which is exactly what Zhu has done?

Can the commit message become nicer anyhow?


…
>> * How do you think about to omit the statement “fprintf(stderr, "Out of memory\n");”?
>
> Why?

I imagine that a returned null pointer can eventually be sufficient already.
Would you get helpful background information from the variable “errno”?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ