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]
Date:   Wed, 28 Apr 2021 12:54:18 +0530
From:   Jitendra <jkhasdev@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8192e: fix array of flexible structures

On Wed, Apr 28, 2021 at 08:01:21AM +0200, Greg KH wrote:
>On Wed, Apr 28, 2021 at 12:28:44AM +0530, Jitendra wrote:
>> On Tue, Apr 27, 2021 at 08:10:20PM +0200, Greg KH wrote:
>> > On Tue, Apr 27, 2021 at 11:19:45PM +0530, Jitendra Khasdev wrote:
>> > > This patch fixes sparse warning "array of flexible structures"
>> > > for rtllib.h.
>> > >
>> > > eg. drivers/staging/rtl8192e/rtllib.h:832:48: warning: array of
>> > > flexible structures
>> > >
>> > > Signed-off-by: Jitendra Khasdev <jkhasdev@...il.com>
>> > > ---
>> > >  drivers/staging/rtl8192e/rtllib.h | 10 +++++-----
>> > >  1 file changed, 5 insertions(+), 5 deletions(-)
>> > >
>> > > diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
>> > > index 4cabaf2..c7cb318 100644
>> > > --- a/drivers/staging/rtl8192e/rtllib.h
>> > > +++ b/drivers/staging/rtl8192e/rtllib.h
>> > > @@ -802,7 +802,7 @@ struct rtllib_authentication {
>> > >  	__le16 transaction;
>> > >  	__le16 status;
>> > >  	/*challenge*/
>> > > -	struct rtllib_info_element info_element[];
>> > > +	struct rtllib_info_element *info_element;
>> >
>> > You just changed the definition of this structure, and the other
>> > structures here.  Are you sure this is working properly?
>> >
>>
>> I have compiled the driver and install it on my vm, but I don't this specific
>> hardware, so couldn't test it.
>>
>> I fixed in context of sparse.
>
>Please verify that this change is correct by looking at how the
>structures are being created (i.e. is this being treated as a flexible
>array or a pointer?)
>
>I think we have been through this before and that sparse is not right,
>but I can't remember...
>
Yes, it is getting used as flexible array in code. hence, simply we can drop
this patch.

Also, looks to me, there is no more sparse warnings to fix in staging.

---
Jitendra

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ