Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752255AbdLEUaO (ORCPT ); Tue, 5 Dec 2017 15:30:14 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:40992 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbdLEUaK (ORCPT ); Tue, 5 Dec 2017 15:30:10 -0500 X-Google-Smtp-Source: AGs4zMbWF5GbFa51hnoyZ84IilmgJfCAnyjrFi8M7HIjc6HzTSLqFyQqeB8BBA0lVJpzB8AUO0Mdv6sNz9twl8XUTpk= MIME-Version: 1.0 In-Reply-To: References: <20171205153259.2522368-1-arnd@arndb.de> From: Arnd Bergmann Date: Tue, 5 Dec 2017 21:30:08 +0100 X-Google-Sender-Auth: WNw0Hlc8OCl20Rr_aMnYVJvPJ5k Message-ID: Subject: Re: [PATCH 1/2] [RFC] kbuild: add macro for controlling warnings to linux/compiler.h To: Kees Cook Cc: linux-kbuild , Michal Marek , Masahiro Yamada , Douglas Anderson , Al Viro , Heiko Carstens , Mauro Carvalho Chehab , Matthew Wilcox , Matthias Kaehlcke , Ingo Molnar , Josh Poimboeuf , Andrew Morton , Thomas Gleixner , Gideon Israel Dsouza , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 623 Lines: 15 On Tue, Dec 5, 2017 at 8:25 PM, Kees Cook wrote: > I like this. I wonder if it would be a good idea to add an additional > argument that forces documentation of the reason for adding a diag > marking? Something like: > > __diag_warn(GCC_7, vla, "No VLAs should be used in this code"); This would be similar to what glibc does, it names the (ignore) macro DIAG_IGNORE_NEEDS_COMMENT(), and by convention requires a comment block in front of it. Not sure if it will actually work in the kernel where the reviews are much more scattered across subsystem maintainers, but we could try it. Arnd