Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2015434ima; Mon, 22 Oct 2018 02:43:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ediOQ5QyAs6sBT0XNA+YIOMPB08BF6eF1uFi4+f2WhybAzHLI11tv4oWfAjpF20LGT5Yg X-Received: by 2002:a17:902:ba8d:: with SMTP id k13-v6mr44300305pls.12.1540201422184; Mon, 22 Oct 2018 02:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540201422; cv=none; d=google.com; s=arc-20160816; b=EtxUkowSuk1TyfAbNT1udCvBE6FwSKcuKTf7m9WvupeJ6YP5edyE4xBX2PrrMK8F3C fktv8knEyGWeSaF6+seUQkBnAEOXxf439mxrlrUj8O/XU9qJTCSmEine5iCuw57Wh4pq cZb5juMAqzmjJ83tj+ZQgYC0tQoqrrlZKOz9knDygSHaIXRYlQDj2Z9y1K3v7Ul8JMIG 5Q4tRyQoi41qpcwuY92+cvovApO1Yp7fVVj0c2BRh+FTMupJnImDOlhJgEgbzHWHABL1 3SuqRp7FNcISzTVWAM5/+ER+G9nTnj4WCkkzYgz4fmNa/FIf+xGjWshbjgjW4UHJsWtO i0Sg== 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=rTWgU2Je0X4G9uOsT7HSt8L6t+Au4BJ4roV+lIlRI64=; b=uDcs4HIE8p5vuwVyMkiY4QT8MJdbG6DkhftztRcpmZZiKUEa8Jjs2bf0PlBIYqh1fH jmT62FsPz2f4lgUhSPpM59HBu09CFB/Jn7MkYUCkrv59ibGrz3HSrl0C2Qqw/4sx4LZL vWqGPwH/61MIKPHu9gsYvonXvVr0WRJpjmoxsX178FZMh0AXjU7j5IJwWMXz/g9Jj0ZS 7QB7MiqreN8mgAFoYLmaI0P4Y3svyrblePGGVFk2pW5VSLbSwzzKh/Dq2NRg4wb8kAGZ ry3+AQunOuKCLOCWwmPCiLo7Riv6H8l83kSlnSL8Ylg4D24j6Vw9i24iUbazGc2Pc7+M Puxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="V8/U1OjX"; 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 i9-v6si34136403pgk.20.2018.10.22.02.43.26; Mon, 22 Oct 2018 02:43:42 -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="V8/U1OjX"; 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 S1728446AbeJVR7X (ORCPT + 99 others); Mon, 22 Oct 2018 13:59:23 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42060 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728448AbeJVR7X (ORCPT ); Mon, 22 Oct 2018 13:59:23 -0400 Received: by mail-lj1-f193.google.com with SMTP id y71-v6so36316843lje.9; Mon, 22 Oct 2018 02:41:35 -0700 (PDT) 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=rTWgU2Je0X4G9uOsT7HSt8L6t+Au4BJ4roV+lIlRI64=; b=V8/U1OjXHH3Mo2KsFcu/E447RFfjJ372hKTOTpbnsS1sPY0VUCXFJz7O0jlZ/pXr8F e1GDgmI+4BV1R1SISXWSQDAIj5SFS7qjKa0ItnPPpw1NC5/yOW/prFTN/cI2ii5D/Qjg Vh55gX4rgK38eg5aVW58MdacoLEDdFq2gkZX1MSzgsZ6+DY0ZMO+4PVqMP5HXKMc2iOs oFj3qo8kV8PDAYLPu3KYSfz0qp5vs5wBXQGpQj4nllhU2o8G0h62ArW93VERXCF7isSZ xZG04pZa0h3db1ot+0Ud+mwjkCdwXP94vsqCk2sPaLRMXnXGKlzRl3J591RkGAgAL8IU 50Hg== 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=rTWgU2Je0X4G9uOsT7HSt8L6t+Au4BJ4roV+lIlRI64=; b=g4RjUmH3CVa+KMMnCf6oqScvFGdw7ITUyEYYVJ92g4Ldsi1lr8F9hacN4JH8+j7kms icH8eI+sP5Tuaw/BJpjWwA5VsJJMR1NiETSu80kmufeeCyO/Pu7VkYuB5k2g/6INbf0+ nHJcjPUHVFfdS8Bk/e0Ih5ydRHpYKy+e2EpAG+i46rKcNjxRvz4GFvpUwSRQY7Ng3EWS HL0bqxtTXrVL/Reu/1NJrcfuQSpkgH2u6TDco6WLd4TAX04hgi62Huk6rFqFKJw+shmu c7u54tjmHOy3GOlmrTUR/pjiHdt2ebJuey8EYsVYYoW/E201fl6uzFnCrYr0IWHAB9Xy 9z1A== X-Gm-Message-State: AGRZ1gKFZL6tVB351/Ynin37Uf4z6je5tEAAs168j4XJcTUDOpx2JOU8 82FiI4Hg7aRIlUb1drp2NTu9fLkdZVwA/pEERCc= X-Received: by 2002:a2e:c52:: with SMTP id o18-v6mr4699438ljd.94.1540201294601; Mon, 22 Oct 2018 02:41:34 -0700 (PDT) MIME-Version: 1.0 References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-2-miguel.ojeda.sandonis@gmail.com> <20181021222712.GI1617@thunk.org> In-Reply-To: From: Miguel Ojeda Date: Mon, 22 Oct 2018 11:41:23 +0200 Message-ID: Subject: Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1) To: Kees Cook Cc: "Gustavo A. R. Silva" , "Ted Ts'o" , Greg KH , linux-kernel , Dan , Andreas Dilger , Masahiro Yamada , Michal Marek , Steven Rostedt , Mauro Carvalho Chehab , Olof Johansson , Konstantin Ryabitsev , David Miller , Andrey Ryabinin , Thomas Gleixner , Ingo Molnar , Paul Lawrence , Sandipan Das , Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , Paul Burton , David Rientjes , Willy Tarreau , Martin Sebor , Christopher Li , Jonathan Corbet , Geert Uytterhoeven , Rasmus Villemoes , Joe Perches , Arnd Bergmann , Dominique Martinet , Stefan Agner , Luc Van Oostenryck , Nick Desaulniers , Andrew Morton , Linus Torvalds , Linux Doc Mailing List , Ext4 Developers List , linux-sparse@vger.kernel.org, linux-kbuild@vger.kernel.org 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 Mon, Oct 22, 2018 at 11:36 AM Kees Cook wrote: > > We need to make sure the static analyzers are happy with either > method. Additionally, when was -Wimplicit-fallthrough added to GCC? If > it was added _before_ the attribute, we need to continue using the > comment style otherwise we lose coverage even with gcc itself. > Additionally, does Clang support this attribute (it supports > -Wimplicit-fallthrough). Please take a look at the rationale (also more details at the linked thread): * gcc 7.1 added -Wimplicit-fallthrough at the same time as the attribute and the comment parsing. * clang does *not* support the attribute in C. Cheers, Miguel