From: Joe Perches <joe@perches.com>
To: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Michal Marek <michal.lkml@markovi.net>,
Andrew Morton <akpm@linux-foundation.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Matt Redfearn <matt.redfearn@mips.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
David Airlie <airlied@linux.ie>,
linux-kbuild@vger.kernel.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC][PATCH] Makefile: globally enable VLA warning
Date: Tue, 26 Jun 2018 13:21:35 -0700 [thread overview]
Message-ID: <46d20fac2dc15d842ebf23c62372ecdb892d7efd.camel@perches.com> (raw)
In-Reply-To: <20180626174013.GA41617@beast>
On Tue, 2018-06-26 at 10:40 -0700, Kees Cook wrote:
> This is the patch I've got prepared now that fixes for all VLAs have been
> sent to maintainers (some are still under review/adjustment, but there
> aren't any unexplored cases left). My intention would be to have this land
> at the end of the next merge window after all the pending VLA patches
> have landed. I just wanted to get any feedback here, since it touches
> a couple areas in the process and I didn't want anyone to be surprised. :)
[]
> diff --git a/Makefile b/Makefile
[]
> @@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
> # warn about C99 declaration after statement
> KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
>
> +# VLAs should not be used anywhere in the kernel
> +KBUILD_CFLAGS += $(call cc-option,-Wvla)
I'd probably spell out what a VLA is here.
# VLAs (Variable Length Arrays) should not be used anywhere in the kernel
Beyond that, seems sensible, thanks.
next prev parent reply other threads:[~2018-06-26 20:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 17:40 [RFC][PATCH] Makefile: globally enable VLA warning Kees Cook
2018-06-26 20:21 ` Joe Perches [this message]
2018-06-26 22:02 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46d20fac2dc15d842ebf23c62372ecdb892d7efd.camel@perches.com \
--to=joe@perches.com \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@embeddedor.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=keescook@chromium.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.redfearn@mips.com \
--cc=michal.lkml@markovi.net \
--cc=palmer@dabbelt.com \
--cc=torvalds@linux-foundation.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox