All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: "Tobin C. Harding" <me@tobin.cc>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Stefan Wahren <stefan.wahren@i2se.com>
Cc: kernel-hardening@lists.openwall.com,
	linux-kernel@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org,
	Tycho Andersen <tycho@tycho.ws>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] staging: vchiq_arm: Clear VLA warning
Date: Fri, 09 Mar 2018 10:11:47 -0800	[thread overview]
Message-ID: <877eqli0f0.fsf@anholt.net> (raw)
In-Reply-To: <1520576470-20628-1-git-send-email-me@tobin.cc>

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

"Tobin C. Harding" <me@tobin.cc> writes:

> The kernel would like to have all stack VLA usage removed[1].  The
> array here is fixed (declared with a const variable) but it appears
> like VLA to the compiler.  We can use a pre-processor define to quiet
> the compiler.
>
> [1]: https://lkml.org/lkml/2018/3/7/621
>
> Signed-off-by: Tobin C. Harding <me@tobin.cc>
> ---
>
> The name of this constant may need changing, there is already a
> pre-processor constant VCHIQ_MAX_SERVICES

Maybe just use ARRAY_SIZE(local_max_services) and not have the #define?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Eric Anholt <eric@anholt.net>
To: "Tobin C. Harding" <me@tobin.cc>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Stefan Wahren <stefan.wahren@i2se.com>
Cc: "Tobin C. Harding" <me@tobin.cc>,
	kernel-hardening@lists.openwall.com,
	linux-kernel@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org,
	Tycho Andersen <tycho@tycho.ws>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] staging: vchiq_arm: Clear VLA warning
Date: Fri, 09 Mar 2018 10:11:47 -0800	[thread overview]
Message-ID: <877eqli0f0.fsf@anholt.net> (raw)
In-Reply-To: <1520576470-20628-1-git-send-email-me@tobin.cc>

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

"Tobin C. Harding" <me@tobin.cc> writes:

> The kernel would like to have all stack VLA usage removed[1].  The
> array here is fixed (declared with a const variable) but it appears
> like VLA to the compiler.  We can use a pre-processor define to quiet
> the compiler.
>
> [1]: https://lkml.org/lkml/2018/3/7/621
>
> Signed-off-by: Tobin C. Harding <me@tobin.cc>
> ---
>
> The name of this constant may need changing, there is already a
> pre-processor constant VCHIQ_MAX_SERVICES

Maybe just use ARRAY_SIZE(local_max_services) and not have the #define?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-03-09 18:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09  6:21 [PATCH] staging: vchiq_arm: Clear VLA warning Tobin C. Harding
2018-03-09  6:21 ` Tobin C. Harding
2018-03-09 18:11 ` Eric Anholt [this message]
2018-03-09 18:11   ` Eric Anholt
2018-03-09 18:35   ` Kees Cook
2018-03-09 18:35     ` Kees Cook
2018-03-09 18:44     ` Linus Torvalds
2018-03-09 18:44       ` Linus Torvalds

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=877eqli0f0.fsf@anholt.net \
    --to=eric@anholt.net \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@tobin.cc \
    --cc=stefan.wahren@i2se.com \
    --cc=tycho@tycho.ws \
    /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.