Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4511449imu; Fri, 30 Nov 2018 19:36:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/VV4yG32Ah4ETKoGc6qTrK/+pgvF3eRTsHPNBOjWzxHDb5kR5YTsg1aSCUzVdrny1VSW57D X-Received: by 2002:a62:4587:: with SMTP id n7mr7968247pfi.118.1543635387860; Fri, 30 Nov 2018 19:36:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543635387; cv=none; d=google.com; s=arc-20160816; b=zuwxXTB56OjjafAn3fFjOAoiiOM+m+CzQJtqmPLV25XHuZnyLQcrBOKLpWRrRLpCGl 7UWzPU9/u6IkwFF/NDzIdOJo47wyX0yT9Yu74Ebzeqvih/IIA+TPDwA/Uz2rLvXBlnLp gkFK+Nn/dcWtyMIVXTrOuh87mhAqdzOIMTfWeOlzrSPge7WvzRwuR8RxR5stuTOWo8xx kiz3a5umeHkxA26RZogtkgLR4aqv6i8YdJuSW2j48E2vx0DC1uafC9H1vBaQ8vg1IwIc 5LqzmS1coqg6IHNHdWawczk2XJEwGR4QewhG7TQVax4mAlqKVqTHbrvohniFbIR0u7dD ed5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=FY8fXA8CF4jB6GdPRb1yLOKDnQGiI8/Hhk9WS2m2CmQ=; b=NHX8XGiksWLh51Xpq/dnBgT9L7kTuU+gT72S3LPDA4LG/3bpx3W0yhZtQoCTExXijd sCEc6DOv1tT8AoUYkJ1ncq8a9Bt3IwKnvGT6J/3aP4bacHpL/z7mMRWwKfNdArooK9yo J3V8j3EbeXCgMmNkFOirbxM72dFlV7v4xFl6qLr/RK1lOAi0Oer1HhmME9+R9n4uDnDd CWcMZT2RRpFPzyHBfaU00EATCwWS+hEElvmFhSAp+GwACnjkKUbi5Xh0GIsrFdVh6+FD VkGkwMdkCQsYewcE+bpAFqd5Fg785sNqzix8G3qIGWCCZfK2+tPsxWgmP2brDLDZpfbv hitA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=lroTmmu3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22si8414174pfj.222.2018.11.30.19.35.56; Fri, 30 Nov 2018 19:36:27 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=lroTmmu3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbeLAOqZ (ORCPT + 99 others); Sat, 1 Dec 2018 09:46:25 -0500 Received: from conssluserg-02.nifty.com ([210.131.2.81]:47425 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeLAOqY (ORCPT ); Sat, 1 Dec 2018 09:46:24 -0500 Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) (authenticated) by conssluserg-02.nifty.com with ESMTP id wB13YcAF007080 for ; Sat, 1 Dec 2018 12:34:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com wB13YcAF007080 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543635279; bh=FY8fXA8CF4jB6GdPRb1yLOKDnQGiI8/Hhk9WS2m2CmQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lroTmmu31deRNWfnjypfhZx4++afORQHkj9ARcixA45PP3zCfZNKgK2/fr9trZJlF ckMNV18yiL339dNPk1Hde3/ABXwhg6RoRvRCM5LkjDxztY0Apt2a7A2qidYHuMZY1L JQaoJBPdONqBpPqHoKvyGqdWMYX7zN4+FGEaKk+zh8XI7ZBFeHxc8Cvz617jDnWyUR hdXUpDB3FwFOMI+c/sVyZknAUxuOx/V89m3sGhDRuYR9QXRn5DYHXsiIFP/Y6mCl/E 6dRg6GfyNPWc5xGN6CmvpIOLOQeIAott9LTa2Eas1HDH8Or6dp4TX9eP1onI7xn/LN rp8C1R0251E7g== X-Nifty-SrcIP: [209.85.221.171] Received: by mail-vk1-f171.google.com with SMTP id o130so1753215vke.10 for ; Fri, 30 Nov 2018 19:34:38 -0800 (PST) X-Gm-Message-State: AA+aEWbRy/TMhnA0qM0mLGBVQeeoMj4Sim9DC6jiVKRkIS+wLdzVydr0 16fbDG27aG5yDxUnzDcpiTa71zR4Q2qPqWIwsjs= X-Received: by 2002:a1f:6bc8:: with SMTP id k69mr3500130vki.84.1543635277420; Fri, 30 Nov 2018 19:34:37 -0800 (PST) MIME-Version: 1.0 References: <1542856462-18836-1-git-send-email-yamada.masahiro@socionext.com> <20181122143201.d7vifhlny7gmrhzd@ltop.local> In-Reply-To: From: Masahiro Yamada Date: Sat, 1 Dec 2018 12:34:01 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/3] kernel.h: disable type-checks in container_of() for Sparse To: Andrew Morton , Luc Van Oostenryck , Miguel Ojeda Cc: Nick Desaulniers , Kees Cook , Josh Triplett , Alexei Starovoitov , Linux Kernel Mailing List , NeilBrown , Greg Kroah-Hartman , Ingo Molnar , Crt Mori , Dan Carpenter Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On Sat, Nov 24, 2018 at 6:06 PM Miguel Ojeda wrote: > > On Fri, Nov 23, 2018 at 10:14 PM Luc Van Oostenryck > wrote: > > > > On Thu, Nov 22, 2018 at 12:14:20PM +0900, Masahiro Yamada wrote: > > > When I tried to enable BUILD_BUG_ON for Sparse, the kbuild test robot > > > reported lots of "unknown expression" warnings from container_of(), > > > which seemed false positive. > > > > > > I addressed this in [1], but fixing Sparse is the right thing to do. > > > > > > The issue was fixed by Sparse commit 0eb8175d3e9c ("fix expansion of > > > function designator"), but it will take time until the fixed version > > > of Sparse is widely available. > > > > > > Disable the container_of() type checks for Sparse for now. > > > > I would prefer that developers upgrade their version of sparse but ... > > > > Reviewed-by: Luc Van Oostenryck > > Indeed. If someone is writing code for the latest kernels, I think it > is reasonable to assume they are able to use the latest sparse too, > since it is not required for compilation anyway. I was reconsidering about this. I saw other Sparse warnings anyway unless I use the state-of-the-art version of Sparse. So, now I think Luc and Miguel were right. Requiring the latest Sparse is the right solution. We do not need to take care of old Sparse. Andrew, Could you drop this patch please? -- Best Regards Masahiro Yamada