All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Warn against variable length arrays
Date: Tue, 13 Mar 2018 10:39:45 +0200	[thread overview]
Message-ID: <87lgewnzce.fsf@intel.com> (raw)
In-Reply-To: <20180313004055.25411-2-chris@chris-wilson.co.uk>

On Tue, 13 Mar 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> VLA are strongly discouraged in the kernel due to ambiguity they impose
> on the limited stack space and security concerns over manipulating the
> stack frame. Add -Wvla to our compiler flags so that CI rejects them.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Acked-by: Jani Nikula <jani.nikula@intel.com>


> ---
>  drivers/gpu/drm/i915/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 4eee91a3a236..fcb8a7b27ae2 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -12,7 +12,7 @@
>  # Note the danger in using -Wall -Wextra is that when CI updates gcc we
>  # will most likely get a sudden build breakage... Hopefully we will fix
>  # new warnings before CI updates!
> -subdir-ccflags-y := -Wall -Wextra
> +subdir-ccflags-y := -Wall -Wextra -Wvla
>  subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
>  subdir-ccflags-y += $(call cc-disable-warning, type-limits)
>  subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-13  8:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13  0:40 [PATCH 1/2] drm/i915: Remove variable length arrays from sseu debugfs printers Chris Wilson
2018-03-13  0:40 ` [PATCH 2/2] drm/i915: Warn against variable length arrays Chris Wilson
2018-03-13  8:39   ` Jani Nikula [this message]
2018-03-13  1:04 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915: Remove variable length arrays from sseu debugfs printers Patchwork
2018-03-13  1:22 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-13  7:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-03-13  9:35 ` [PATCH 1/2] " Tvrtko Ursulin
2018-03-13  9:57   ` Chris Wilson

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=87lgewnzce.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.