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: <552711fa-5b85-d418-2ed7-05fc027d6c10@linux.com>
Date:   Fri, 28 Aug 2020 01:07:37 +0300
From:   Denis Efremov <efremov@...ux.com>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Jan Kara <jack@...e.com>
Cc:     linux-kernel@...r.kernel.org, Joe Perches <joe@...ches.com>
Subject: Re: [PATCH v2] udf: Use kvzalloc() in udf_sb_alloc_bitmap()



On 8/28/20 1:09 AM, Gustavo A. R. Silva wrote:
> 
> 
> On 8/27/20 16:25, Denis Efremov wrote:
>> Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it.
>> Size computation wrapped in struct_size() macro to prevent potential
>> integer overflows.
>>
>> Signed-off-by: Denis Efremov <efremov@...ux.com>
>> ---
> 
> Please, comment here what changed in v2, vn... e.g.:
> 
> Changes in v2:
>  - Use struct_size() helper.
>

Ah, thanks. I added this initially and accidentally regenerated the patch
file with format-patch.
 
> 
> Why not this:
> 
> bitmap = kvzalloc(struct_size(bitmap, s_block_bitmap, nr_groups),
> 		  GFP_KERNEL);
> 
> and you can also get rid of _size_ entirely.
> 

My bad, I missed that only nr_groups is used down the code.

Thanks, I will resend it as v3.

Denis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ