Re: Intel i40e code finds smatch bug

Dan Carpenter <[email protected]>
Newsgroups org.kernel.vger.smatch
Message-ID <20210119185547.GN2696@kadam>
On Tue, Jan 19, 2021 at 12:22:50PM -0500, Dan McDonald wrote:
> We in illumos are in the midst of updating our i40e code from Intel upstream. We found a bug in smatch while building it. It's documented here in:
> 
> 	https://www.illumos.org/issues/13457
> 
> A colleague recommended I include a toy program, try the smatch `master` branch on a Linux distro, and submit the toy to this list.  Its source is attached, ready to compile (without incident) and smatch (with one incident, but not two).  You'll see two cases of potential failure, but only one (the one Intel source uses to confirm proper compilation) breaks smatch.  Look for the KEBE comments.
> 
> Once this bug gets fixed, I suspect we'll also be updating our branch of smatch as well.  :)
> 
> Thanks,
> Dan
> 

Unfortunately Sparse doesn't support #pragma pack.  This was reported to
the Sparse list last February and the response was that pragma pack is
disgusting so don't use it.

http://tw.spinics.net/lists/linux-sparse/msg10816.html

I wish I could give you better news than that...

Luk recently was working on better support of packed structs (which have
been a known issue for a while) but I doubt that will help here.

regards,
dan carpenter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.