Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1104888imm; Wed, 26 Sep 2018 11:43:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Xkcn4Du3BsfxZqITb4oGq0VJOUPBw9y8KP0JFGIdmOABwlGne7B0ioefH8DzL5U7hDf79 X-Received: by 2002:a17:902:6907:: with SMTP id j7-v6mr4364782plk.232.1537987414211; Wed, 26 Sep 2018 11:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537987414; cv=none; d=google.com; s=arc-20160816; b=u0lL93PyxZnDosFJyocZ5IPsoDqbd1c9RPlDdh19TbdObH8+RuGmRPwRzQYjIcTgrB lFo1Gh5UcloJifskI+dsl5jSMTJTZolEuLkkso25xvi4xBB9KTUuT4of1DxFAXvhxWMX neG6/5AKh1FfqPBVDc1G/XQC37XEzPvc7oik4ECTbhUnFaVMrMxqwykoxFGhuYVh+86m bgUc+1fC6eI7NUQ7IYvdrC2vK4azz5N/EyKhGFTmRGTH5d6Hb/C9CKyp3HR19szCPqbm nvRe/g2FiGUTLSL5kTwbuURPNfT6iJz1iPU1JX4BWwBspH4D3p1iQJMul1qOhxechkpo piRA== 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; bh=msVrzu3sIdX+3+XF9neViJA0paVstVhqMunslAspyeA=; b=TaHehzKwzR8rZAtjlBA243V+wmJHG68PocTD64gca3WIPGm3+BemRN3dKmfhGO96rz ZgRCYDyDGraQBEvszaKE9b+CyjA8nrrQ+yqQCmG4IlzHbuoVaaKgvGQzdrradawdnsDE /VnVpSmzDad/ssy690KmzJCyBg/51TmuZrTFrJUznTcVOZ4LSBD49Sy5WWBs6BOFN7Xg DNCSK+faHkHV0TUI7+GZayD99tcbMB9u+EGdpjM329fndXQF2LZEyxJSfMf40WJKoQWA q3uhbK7N9dqI4mh8xxuuciZ0ttxZpgF0+wCOgOLq4Wg8Qi3yJ6ySpfrJQtkdNvShPVh0 JJTQ== ARC-Authentication-Results: i=1; mx.google.com; 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 m64-v6si6302362pfc.17.2018.09.26.11.43.18; Wed, 26 Sep 2018 11:43:34 -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; 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 S1728236AbeI0A5U (ORCPT + 99 others); Wed, 26 Sep 2018 20:57:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48526 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbeI0A5U (ORCPT ); Wed, 26 Sep 2018 20:57:20 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B721110BD; Wed, 26 Sep 2018 18:43:01 +0000 (UTC) Date: Wed, 26 Sep 2018 20:42:59 +0200 From: Greg KH To: Kees Cook Cc: Nick Desaulniers , Matthias Kaehlcke , Linus Torvalds , Masahiro Yamada , Christopher Li , Sparse Mailing-list , LKML , Daniel Santos , Chris Wilson , Jani Nikula Subject: Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback() Message-ID: <20180926184259.GB14797@kroah.com> References: <1535220989-27645-1-git-send-email-yamada.masahiro@socionext.com> <84cf6ae0-97c8-6b73-ca86-b3d3b3daba5b@pobox.com> <8d5cf8c6-556a-96a1-610d-c92355783a9f@pobox.com> <20180926180019.GD22824@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 26, 2018 at 11:26:46AM -0700, Kees Cook wrote: > On Wed, Sep 26, 2018 at 11:03 AM, Nick Desaulniers > wrote: > > On Wed, Sep 26, 2018 at 11:00 AM Matthias Kaehlcke wrote: > >> > >> On Fri, Aug 31, 2018 at 09:46:02AM -0700, Nick Desaulniers wrote: > >> > On Tue, Aug 28, 2018 at 4:00 PM Nick Desaulniers > >> > wrote: > >> > > > >> > > On Mon, Aug 27, 2018 at 1:42 PM Daniel Santos wrote: > >> > > > > >> > > > Hello Nick, > >> > > > > >> > > > On 08/27/2018 03:09 PM, Nick Desaulniers wrote: > >> > > > >>> Let's give up __compiletime_assert_fallback(). This commit does not > >> > > > >>> change the current behavior since it just rips off the useless code. > >> > > > >> Clang is not the only target audience of > >> > > > >> __compiletime_assert_fallback(). Instead of ripping out something that > >> > > > >> may benefit builds with gcc 4.2 and earlier, why not override its > >> > > > > Note that with commit cafa0010cd51 ("Raise the minimum required gcc > >> > > > > version to 4.6") that gcc < 4.6 is irrelevant. > >> > > > > >> > > > Ah, I guess I'm not keeping up, that's wonderful news! Considering that > >> > > > I guess I would be OK with its removal, but I still think it would be > >> > > > better if a similar mechanism to break the Clang build could be found. > >> > > > >> > > I'm consulting with our best language lawyers to see what combinations > >> > > of _Static_assert and __builtin_constant_p would do the trick. > >> > > >> > Linus, > >> > Can this patch be merged in the meantime? > >> > >> friendly ping :) > >> > >> With c5c2b11894f4 ("drm/i915: Warn against variable length arrays") > >> clang raises plenty of vla warnings about > >> __compiletime_error_fallback() in the i915 driver. Would be great to > >> get rid of those without having to revert that commit. > > > > I've been meaning to follow up on this, thanks Matthias. I too would > > really like this patch. > > Adding Greg to the thread. Between Masahiro's detailed commit log and > the Clang-familiar reviewers, I think this should land for 4.19 (as > part of the other Clang-sanity patches that are already in 4.19). This > has no impact on gcc now that we're requiring 4.6+. > > https://lore.kernel.org/patchwork/patch/977668/ I'm not digging up a compiler.h patch from a web site and adding it to the tree this late in the release cycle. Especially given that it hasn't had any testing anywhere... nice try though :) greg k-h