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: <2ba8d35d-44e8-0509-469b-5564efe64e76@lwfinger.net>
Date:   Sat, 26 Aug 2017 09:48:01 -0500
From:   Larry Finger <Larry.Finger@...inger.net>
To:     Yurii Pavlenko <pyldev@...il.com>
Cc:     gregkh@...uxfoundation.org, pkshih@...ltek.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging rtlwifi efuse fix up a warning kzalloc

On 08/26/2017 08:01 AM, Yurii Pavlenko wrote:
> Hello,
> 
> I have attached a small patch to fix a warning "Prefer kcalloc over kzalloc with multiply"
> for efuse.c as part of challenge 10 of Eudyptula.
> 
> Best regards,
> Yurii Pavlenko
> 
> 
> Signed-off-by: Yurii Pavlenko <pyldev@...il.com>

Before you waste any more of our time, please read the material about patch 
submission at Documentation/process/submitting-patches.rst in your source tree. 
In its present form, this patch is not usable!

I also disagree with the checkpatch warning. To me, there is no difference 
between specifying the size of the allocation as "EFUSE_MAX_WORD_UNIT, 
sizeof(u16 *)" or "EFUSE_MAX_WORD_UNIT * sizeof(u16 *)". In  fact, the only real 
difference is that the source is ONE character larger with the kzalloc version! 
Is that important? Certainly not to me! One thing that is readily apparent is 
that kzalloc() zeros the allocated space. Of course, so does kcalloc(), but it 
is not apparent from the name.

Most of the checkpatch warnings improve readability of the source, and do find 
real or potential errors. This particular one does not, and I will NACK every 
patch that tries to force code that I maintain to use kcalloc over kzalloc.

Larry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ