From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Tobin C. Harding" <me@tobin.cc>
Cc: linux-kernel@vger.kernel.org, Tycho Andersen <tycho@tycho.ws>,
driverdev-devel@linuxdriverproject.org,
Kees Cook <keescook@chromium.org>,
kernel-hardening@lists.openwall.com
Subject: Re: [PATCH v2] staging: vchiq_arm: Clear VLA warning
Date: Mon, 12 Mar 2018 06:58:04 +0100 (CET) [thread overview]
Message-ID: <1166411830.411906.1520834284931@email.1und1.de> (raw)
In-Reply-To: <20180312054613.GG8631@eros>
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?
Thanks
Stefan
>
> thanks,
> Tobin.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2018-03-12 5:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 1:37 Tobin C. Harding
2018-03-12 5:46 ` Tobin C. Harding
2018-03-12 5:58 ` Stefan Wahren [this message]
2018-03-12 6:05 ` Tobin C. Harding
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=1166411830.411906.1520834284931@email.1und1.de \
--to=stefan.wahren@i2se.com \
--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=me@tobin.cc \
--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
all inboxes | Powered by JetHome®