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]
Date:   Thu, 04 Feb 2021 19:51:42 +0500
From:   Muhammad Usama Anjum <musamaanjum@...il.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
        Greg KH <gregkh@...uxfoundation.org>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8192e, rtl8192u: use correct notation to
 define pointer

> Sparse's warning is not about changing the definition of this member
> as if it was the argument of a function. It's about how can you use
> an array of structure when this structure has a flexible member.

We have the following structures in drivers/staging/rtl8192e. (I've
simplified them for showing here.)

struct rtllib_hdr_3addr {
	int a;	
	int payload[];
};

struct rtllib_info_element {
	int len;
	int data[];
};

struct rtllib_probe_request {
	struct rtllib_hdr_3addr header;
	struct rtllib_info_element info_element[];
};

static void func(struct rtllib_probe_request *ptr) {
	ptr->header.a = 1;
}

Running sparse gives: 
sparse -Wflexible-array-array flexible_array.c
flexible_array.c:13:48: warning: array of flexible structures

There are several such structures in rtl8192e and rtl8192u. I've been
trying to fix one of them. But it seems like more knowledge is
required to refactor the driver.

Thanks,
Usama



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ