Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3252176imu; Sat, 24 Nov 2018 01:06:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/VFdICHE4UCPRvLGDJP1DdOGhc/uWXYydO5X02hwALJj+/IeMRKwWaZuSPHoVoSMdOGAjUS X-Received: by 2002:a63:f547:: with SMTP id e7mr17606552pgk.182.1543050391964; Sat, 24 Nov 2018 01:06:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543050391; cv=none; d=google.com; s=arc-20160816; b=r37KOVjXgOOJRY9s3pod8jMN2wmPxtTwZqqypjMjKFSy2wbbWv+hMlBR4VHfO43xx7 SOgHia4FK4Ro/hLxr/iyLENY3DV+h6K2Udg/HlTmRKyqJlBA+CQ/8GvXk5bofHb0k38Y ehA2DMxxpzkEprLu9bwsxGgjhE27pq94bQiPN2xrMqwLXS/QIAycphH0SypAKXrdOTOK 5g3nnPXLBT0nCc+sVvB1f7G4oDGzj9vtW16caUE3FB6cJC8qisx9joiPSxuo/9UeMqRX 9MgcwWakyyITHz3n0PCQflZb/44I7MxW8w0UzkJi8Zu2jkcsbxm2Wgs1UU/D4NDkPpxV 1mPg== 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; bh=4lTWNqVS/0YXFtsbh12p3tJrqzSN/MR2ug+TBwr15lc=; b=D6mu3EJw0RO4jxguC/aQPKhNXR1lnUkmmflUv6hxWLmELRGPhKvckxFt92PmzWtfpA 2ls2V2/82Ke6DfRhEFUWaBunX3HlY83+PnotWvkk2RpDTaMML/y5B/47oFnwD8RCDVII RooS0hbDWGxLDBReftxpGFskH68ph3DcsHniDIqNpM4fpSiguNhs5EXb3vVeyrDukdku vFk52cgXp3H9n/5YBmKZtj+T/cAd87y0BAa2dKfuZpFM5ms04HsQ/3fc597tfsZFvCDy n/a7CwnpgBwsrjXpvVag3qmlHp+FV+jiysdUucwTz4FHwBQ9VdHSXLZP0nxEjC9x22D2 qMLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k7czckMZ; 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 o6-v6si65246861pfa.162.2018.11.24.01.06.17; Sat, 24 Nov 2018 01:06:31 -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=@gmail.com header.s=20161025 header.b=k7czckMZ; 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 S1728749AbeKXTMi (ORCPT + 99 others); Sat, 24 Nov 2018 14:12:38 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:46124 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728298AbeKXTMh (ORCPT ); Sat, 24 Nov 2018 14:12:37 -0500 Received: by mail-lf1-f66.google.com with SMTP id f23so10086153lfc.13 for ; Sat, 24 Nov 2018 00:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4lTWNqVS/0YXFtsbh12p3tJrqzSN/MR2ug+TBwr15lc=; b=k7czckMZO6jjFV3iul/y+zcG9HzWpu4LX82foiQTm1hPYPtqHiyHx33GSRIUh9AkoF GI54i6eOrOlDMTmCgLp7QCN0LHsQvLVa6k1JW1Vi4RavPr1FRS1pf45xjbrLzFS5P4LP f8zfyYo49JaVXxAlBEWLaAu8ltNZug/1pkfmIhqOlZcjq92ZQOWTzP1aIvZABntnGsJV 2/dsp2sHLp/11URn7RJozRCsGlBx/KPvoqSHjNeXSrz/rs+4tMGg3cYm7Ygxlgz0o5PB IZJFcGKiURIU0RqpFauGfbVTlD9sJGqXwSZ+W+Jvgpl8If613BLLK2/WafvuCtQwMYF3 lMwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4lTWNqVS/0YXFtsbh12p3tJrqzSN/MR2ug+TBwr15lc=; b=NpUu+x+R90CZ/ULqzKgJj+NMOAWFeQombMMppPjLDlSVCuCVMesBJEhjk8WBoMZnXf iGzwyEXX6bCLTytoJLE54aJd0wmCytyC9g5Gf9GqhdE03oHtNDN65LGHeVgf98efb6ia X1SMUkmnqyyMIwqUTcXG6bYWUdJ8i7cMJDYm2pAPOMrP3g3fTj4uEEUgxElibPICSfqT nC6TqS8tyL2J9w5IKWIhOkRt4+use4pvXE6C7nktBOIxwVs0pyikQaEo9JLnVYeZ14ya jEVjGzfAvTbv1DLFmtUFGh9/VARy0c5H96Ju8CYIIKYPtGZOUf4Gy8v/CytlcqeZ2sG2 d8eQ== X-Gm-Message-State: AGRZ1gLHxMoSQKEXGjfIoSR0yLzYyrdYDJyVrgiSG9MzHODdGm7DITRZ wz74Z3fTvMILSYyJzhbFxZJejxtD6mSPIqto8wk= X-Received: by 2002:a19:54d7:: with SMTP id b84mr10663967lfl.131.1543047891968; Sat, 24 Nov 2018 00:24:51 -0800 (PST) MIME-Version: 1.0 References: <1542856462-18836-1-git-send-email-yamada.masahiro@socionext.com> <20181122143201.d7vifhlny7gmrhzd@ltop.local> In-Reply-To: <20181122143201.d7vifhlny7gmrhzd@ltop.local> From: Miguel Ojeda Date: Sat, 24 Nov 2018 09:24:41 +0100 Message-ID: Subject: Re: [PATCH v4 1/3] kernel.h: disable type-checks in container_of() for Sparse To: Luc Van Oostenryck Cc: Masahiro Yamada , Andrew Morton , Nick Desaulniers , Kees Cook , josh@joshtriplett.org, ast@kernel.org, linux-kernel , neilb@suse.com, Greg KH , Ingo Molnar , cmo@melexis.com, Dan 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 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. Cheers, Miguel