public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Tobin C. Harding" <me@tobin.cc>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Tycho Andersen <tycho@tycho.ws>,
	Kees Cook <keescook@chromium.org>,
	kernel-hardening@lists.openwall.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, Eric Anholt <eric@anholt.net>
Subject: Re: [PATCH v2] staging: vchiq_arm: Clear VLA warning
Date: Mon, 12 Mar 2018 17:05:49 +1100	[thread overview]
Message-ID: <20180312060549.GH8631@eros> (raw)
In-Reply-To: <1166411830.411906.1520834284931@email.1und1.de>

On Mon, Mar 12, 2018 at 06:58:04AM +0100, Stefan Wahren wrote:
> Hi Tobin,
> 
> > "Tobin C. Harding" <me@tobin.cc> hat am 12. März 2018 um 06:46 geschrieben:
> > 
> > 
> > On Mon, Mar 12, 2018 at 12:37:53PM +1100, Tobin C. Harding wrote:
> > > 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 a VLA
> > > to the compiler.  Also, currently we are putting 768 bytes on the
> > > stack.  This function is only called on the error path so performance is
> > > not critical, let's just allocate the memory instead of using the
> > > stack.  This saves stack space and removes the VLA build warning.
> > > 
> > > kmalloc a buffer for dumping state instead of using the stack.
> > > 
> > > [1]: https://lkml.org/lkml/2018/3/7/621
> > > 
> > > Signed-off-by: Tobin C. Harding <me@tobin.cc>
> > > ---
> > 
> > Drop this please, leaks memory.
> 
> except from the leak, did you test this patch on a RPi?

No I didn't, but I can have a go at it.  Will try before doing v3.

thanks,
Tobin.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-03-12  6:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12  1:37 [PATCH v2] staging: vchiq_arm: Clear VLA warning Tobin C. Harding
2018-03-12  5:46 ` Tobin C. Harding
2018-03-12  5:58   ` Stefan Wahren
2018-03-12  6:05     ` Tobin C. Harding [this message]
2018-03-12 11:14     ` Dan Carpenter

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=20180312060549.GH8631@eros \
    --to=me@tobin.cc \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=eric@anholt.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox