Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp201943imm; Thu, 7 Jun 2018 16:46:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIkN1XnuQj403BpBd1MyLkGkm7i3C/fzqApUReZ9DlknfBdv7GMv94Z1a72dzvgoC38Fwz6 X-Received: by 2002:a63:6e44:: with SMTP id j65-v6mr3281903pgc.14.1528415175599; Thu, 07 Jun 2018 16:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528415175; cv=none; d=google.com; s=arc-20160816; b=Ukk/NSgkqCQO0ecfalckyVkh5g9rVBXsusAoYQe9vuVsHaMQW7IeDk8gK5ejQw3Mw5 FqJLwYOEsEm04Mcp9AgHdmHwz5H8BboXXI4mT0T/Q0zhk3+JaHetyRruQqoqjs0CX9cg +FDjOGJqWjkmIzHm1Y7HOSFUl8OBgtb1cF/wxlVtI8vqutfdAGkL8p+Va/698f283sRD 5mzyAfKZiUQQMPjTHUmqvnGxCYH7rTwX5kwKeRML9JInxyVOP7Db9b4STf/pKwMU+l1e L0j4dEgkf/zl2epW3wLhwsynn13dTpuN3M8Nz5bst6WCg0W8q6JLZXYaogoLkFI1rXLg W2oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=GNGp007zxEZhp+oAKiY/7RKjPqYwce/vV7W94kAW8mk=; b=qPKriSStkWB2tGzGY5vs47q7H932GTkHj0WKXjcz+Z4djWT5MTdb54c4AdqEFFWA/A m9at/39Mwe8/p+uw2jiDqunQBKsIF+ESIFT2mNaJvXEYDGmV1MJhQkHmVnFHQbm17WZ5 fUdmzyS0LAjEDHq5OjvfPk9L9Lctb69He8LmGqTdA/J9PR+ZPltO1RukKhv8OD+yjnwy qqbNaUrC9xsYNYwK0FDf4uUDPRdfdpqD6m+vkfi3+ZCyW3ulfDeAKSJONallbGKPT2Uo LeIDAHVRp/dkYFE4LqdMyd9DN5tTZNVA/W2D1zZg4yLC+H0v5MqIIIbFoqGGIKfPUtn1 BQng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gj663Cye; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si55296890pla.26.2018.06.07.16.46.00; Thu, 07 Jun 2018 16:46:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gj663Cye; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbeFGXpi (ORCPT + 99 others); Thu, 7 Jun 2018 19:45:38 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:33627 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbeFGXpg (ORCPT ); Thu, 7 Jun 2018 19:45:36 -0400 Received: by mail-wm0-f52.google.com with SMTP id z6-v6so5028975wma.0 for ; Thu, 07 Jun 2018 16:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GNGp007zxEZhp+oAKiY/7RKjPqYwce/vV7W94kAW8mk=; b=gj663Cyefw3SYI2u+GdMWeZ4PS/A/LQfrng2ArPvR6TefD1g4SVMTz/M4DM2fOdkcR sYHmYKUthwaxjJ21v7k/AccvWCfUnCXCJfSRlgreN95WDLW8/mz9meT+HskTyQMfPfPK i7KTaPngTA9Z9JzUPOErGE7mOcwRJE/0O+TiopTOTV/rCcXMzXxrQnGUG2TK7Lkm5LbR nrlxuyeOvRyuCFDd0HkEGpGPchNgStPmZsi/2GI48loJedyyajKVWGSoOoL5ZeJnoDGc 0+WH4y8Y/QFR6iw4jAMKNFKf1xzVEuz+bOovK3tlGJhf7xoaztNRN7DeKctCtO9fZ2Zm mhcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GNGp007zxEZhp+oAKiY/7RKjPqYwce/vV7W94kAW8mk=; b=p5E8ePMYWSGqJo0vCVeZAXGq39XqZn5fAYUtyPq9kSFbW+UQP06IrfRZ1bmy3nQbsO vvY/rgmqbNNvg9ne/sMEIiwZsqNdtm8NTrgg7MJFHJ4dwCpgSm6cMYEqyq1akyb6UXul l3y1DtiMRckrp3vtuStbcNLeB3kED+f9HH4vleZOibD4q6dTgvSuf8iPh+B0UoRgoMB2 MB4AKDpdUBjrl9XG8YO1vbYhN1i+kkH+kczOS5lw2KM3WgWH2DsvOk3aGiqMvyjIApJc V/evI0XQtgpGbm9U9j38xsdskjfQ+574MkFZ4tPQgWjmByH7rB1YrC3o9L5C+InlFHSi mZGg== X-Gm-Message-State: APt69E0xzfSnkTf0WY5evOWlI/dAKC3llPbzYC4K42iwJZKFvnA41lkP VtOHC+a/JWvjKP5pSBdebzMlDQUx X-Received: by 2002:a50:f190:: with SMTP id x16-v6mr4497493edl.59.1528415135827; Thu, 07 Jun 2018 16:45:35 -0700 (PDT) Received: from ltop.local ([2a02:a03f:4108:7200:48ec:50ae:df82:46f4]) by smtp.gmail.com with ESMTPSA id x2-v6sm9507160edr.24.2018.06.07.16.45.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 16:45:35 -0700 (PDT) Date: Fri, 8 Jun 2018 01:45:34 +0200 From: Luc Van Oostenryck To: Rasmus Villemoes Cc: Kees Cook , Miroslav Benes , LKML Subject: Re: sparse warnings in overflow.h Message-ID: <20180607234533.nfdxd4cqiygahfms@ltop.local> References: <4d2aaa98-1655-3ab8-8ce8-bf4b9c7d2dbc@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4d2aaa98-1655-3ab8-8ce8-bf4b9c7d2dbc@rasmusvillemoes.dk> User-Agent: NeoMutt/20180512 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 07, 2018 at 09:25:09PM +0200, Rasmus Villemoes wrote: > > IIRC, the problem is that sparse pretends to be the gcc sparse itself > was built with, which is obviously entirely unrelated to the C dialect > that that particular sparse version groks. Sigh. Ack to the fix above. Yes, indeed, and it is sometimes a problem. Ideal would be that sparse would pretend to be same GCC as the one used to compile the code being checked *and* to have exactly the same features. Pretending to be an older version of GCC would maybe solve the present problem it's not really a general solution. One good thing would be to not depend on GCC versions to enable some features (but GCC offers few facilities helping here). Best regards, -- Luc Van Oostenryck