From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp2130.oracle.com ([141.146.126.79]:56964 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731665AbhASS6t (ORCPT ); Tue, 19 Jan 2021 13:58:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=/ZZP9dxhM/cHA8y9g/894ZRpka9ZcGcEegtdWL2PVKI=; b=ijyy5MDRXL2EdarORdvt+lyMKs+KZxkWaXAJrOnSfYx0JuDx/KBUfkoJQ3zP514FRldp aYs8UscFZtQRky13hru9qcJnUPNiHb765pQTJlCjQr2GISVcXNOdczRqlalRaFlA1OBu xxJDAwUEYEnNsSLCA7Di2t5WnnQuF6NMjfCNytWOIwiL8i8f5pSM7bC3aF2tbt092n/o 85HmSvIYz+x3/l339/L4rWFaTL1vIMrojuRPmJrrmnAv02MVN4UxSp8jfx+OcSd/Q/jg BG70+G47MVF3m6bdRqfMVFyCanM0rZnYrj4/Eoheu1sl19rqhHrCU/BizE31FI/BeVYl pQ== Date: Tue, 19 Jan 2021 21:55:47 +0300 From: Dan Carpenter Subject: Re: Intel i40e code finds smatch bug Message-ID: <20210119185547.GN2696@kadam> References: <38E556EE-C173-4935-80DF-51DC4FE8C90E@joyent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <38E556EE-C173-4935-80DF-51DC4FE8C90E@joyent.com> List-ID: To: Dan McDonald Cc: smatch@vger.kernel.org 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