Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2072863ima; Mon, 22 Oct 2018 03:54:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV61s6RDttpCA9Yve8BixM8YlCWkXrgT6JZ6WKlYl2MUmcC6onhM5JkgAtuYpf1Jby0/EKjZG X-Received: by 2002:a63:df4f:: with SMTP id h15-v6mr40759220pgj.94.1540205680427; Mon, 22 Oct 2018 03:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540205680; cv=none; d=google.com; s=arc-20160816; b=qtZtBVu0TuOCgj0Ahl5/+36dJ9UUbK0X0AxrtPqjT/cBu+rHIqemtBwlq4W/qGkZ5N +NLQbLyaFesJ6umDF6Ikqb2F7ndo6dA5eDT+/MFyKIWvQ9HHxKPgVIXWXSp9QjthT8ol XUQo6iu9EveAeGdzh3INIE2YtyDUWBUcx2i+KXwMqnFUazn3RfTVcVXZGRNnpt+PzLiT h35mKykLkB3iP2Z43JJfazkT9nLnXIbhCHshnO1PQ0uGwKsOxjtWLH7iZs5aw0qvlXfj cAG9dOylpJ4Gp16EQSYmy3B9/lF7uSBuClBbHkicHXX/uXI7q5LBqOt2EZbjBeXSmjx4 2/aA== 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 :references:in-reply-to:mime-version:dkim-signature; bh=sZ270nSjaKfi68ZW9Vo6MWbGRIFX4jrmR7nP2GqKqhI=; b=uqsRlTL+WsyUjSuuvr8ZPtmnqEls3oqDQ8YYjKT/TYQg8UqRwVWYPCE1bXq8Rr8syW whRb83iRzE/B65XJh8Q4rA/TMF46wAh8LePFumTE5NOPZHShJwIAoxQ2cYRvUaAXXmlL ZVs/ccDvr2CZQt6R8qp+4o/JUI+c1Eq3so6uR8rjuOJb69H8CwgAqdHBdRbg/sQbnLN6 bC92Jb6ORbRJDl+T9H8ihHvHQvstUcgg0MFhnFcPIRQp23EH4Nk6l0Xk8iDjGgZlndzD lu4QCAlIxZRkFXgAy2Qt7X7CZUFqSqlYQFCcdLV5bk6FYUKBswOLNjGY5fOR7ENXIzb9 VDNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BzTFoqEa; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14-v6si6100211pgr.259.2018.10.22.03.54.25; Mon, 22 Oct 2018 03:54:40 -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=@chromium.org header.s=google header.b=BzTFoqEa; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728736AbeJVTLV (ORCPT + 99 others); Mon, 22 Oct 2018 15:11:21 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:39660 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728101AbeJVTLV (ORCPT ); Mon, 22 Oct 2018 15:11:21 -0400 Received: by mail-yb1-f196.google.com with SMTP id j193-v6so4693724ybj.6 for ; Mon, 22 Oct 2018 03:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sZ270nSjaKfi68ZW9Vo6MWbGRIFX4jrmR7nP2GqKqhI=; b=BzTFoqEaw+Wgv0mNgso4rduZZHV5EdrzpDWkaQIk05vvJqfiVgev98BnzOVUu/L1rg Vr21M5evhiq19twdE68VvO/KfKH4ITW4EggQoWEbbWeLAFSkreK7GK44wlWvmCD6ZPet DrU7pz5ghKHukaTKrTJs4B8BXMt33AyCfSsGE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sZ270nSjaKfi68ZW9Vo6MWbGRIFX4jrmR7nP2GqKqhI=; b=iB3514YLxclDdhCm5P0U44yNwO7GCN28SfEbF0v3pNWBfypJxFHn17JWfdKv4eVzTs 6TnKOW8buJ86MCcDrUiXfBMHNtXdQWWYG33m9bar3ZRlOAjEblj7SyAQMaNMS0O0KVUl Lk5z+Q+JlvLi6T6PwmPINGDfG9fFZUJNhrOqU84feAdntwauwSDv1/txEhmz/7XkawLn hBJTu7rZshfO5K4ct3zNuOf/RGLwbc1GYpz1ljaXQ87aYABAnlCxpP4TsGwSsZhrDBXQ fZjPV7uu4vSXJkx9ltgWvJFEbZkL4T5cOD4Kxdd7xlY+60JAvpEW9mgm7N2A+Y4p4kQr 4Kxw== X-Gm-Message-State: ABuFfoiVqXk+5/Gq9MesbVQrCyVhQywMFV8bKkBm9EIzlQUzNjSI+OHW Pb4aOIyybqipVcaMKYVwkhqq2IhEqkQ= X-Received: by 2002:a25:2d53:: with SMTP id s19-v6mr18804960ybe.471.1540205596530; Mon, 22 Oct 2018 03:53:16 -0700 (PDT) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com. [209.85.219.171]) by smtp.gmail.com with ESMTPSA id c128-v6sm12345560ywb.68.2018.10.22.03.53.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 03:53:14 -0700 (PDT) Received: by mail-yb1-f171.google.com with SMTP id 131-v6so1185613ybe.12 for ; Mon, 22 Oct 2018 03:53:14 -0700 (PDT) X-Received: by 2002:a25:8091:: with SMTP id n17-v6mr31941229ybk.209.1540205593804; Mon, 22 Oct 2018 03:53:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3990:0:0:0:0:0 with HTTP; Mon, 22 Oct 2018 03:53:12 -0700 (PDT) In-Reply-To: References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-2-miguel.ojeda.sandonis@gmail.com> <20181021222712.GI1617@thunk.org> From: Kees Cook Date: Mon, 22 Oct 2018 03:53:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1) To: Miguel Ojeda 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 , Sparse Mailing-list , linux-kbuild 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 2:41 AM, Miguel Ojeda wrote: > 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. Ah, perfect. I missed this. :) > * clang does *not* support the attribute in C. Well that's not good. :) -Kees -- Kees Cook Pixel Security