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] [day] [month] [year] [list]
Message-ID: <946d2ce4-d9cc-d35f-714b-7bea5436a7c3@cornelisnetworks.com>
Date:   Fri, 1 Apr 2022 09:32:00 -0400
From:   Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>
To:     Jason Gunthorpe <jgg@...pe.ca>, cgel.zte@...il.com
Cc:     mike.marciniszyn@...nelisnetworks.com, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org, Lv Ruyi <lv.ruyi@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] RDMA: Replace zero-length array with flexible-array
 member

On 4/1/22 7:50 AM, Jason Gunthorpe wrote:
> On Fri, Apr 01, 2022 at 07:54:06AM +0000, cgel.zte@...il.com wrote:
>> From: Lv Ruyi <lv.ruyi@....com.cn>
>>
>> There is a regular need in the kernel to provide a way to declare
>> having a dynamically sized set of trailing elements in a structure.
>> Kernel code should always use “flexible array members”[1] for these
>> cases. The older style of one-element or zero-length arrays should
>> no longer be used[2].
> 
> If I recall properly this doesn't work if the flex array is nested
> inside another member.. Not sure what this thinks it is doing anyhow

I was under the impression that the main goal of using the flex array was so
that people didn't calculate sizes incorrectly. Perhaps I'm wrong though.
I don't really see this being needed. If it even works when nested as Jason
mentioned.

Now that being said there is some clean up that needs to be done to this code,
but it's not this.

-Denny

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ