From: Jordan Crouse <jcrouse@codeaurora.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Kees Cook <keescook@chromium.org>,
Rob Clark <robdclark@gmail.com>, David Airlie <airlied@linux.ie>,
linux-arm-msm@vger.kernel.org,
dri-devel <dri-devel@lists.freedesktop.org>,
freedreno@lists.freedesktop.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/msm/adreno: Remove VLA usage
Date: Fri, 29 Jun 2018 15:19:35 -0600 [thread overview]
Message-ID: <20180629211935.GG24526@jcrouse-lnx.qualcomm.com> (raw)
In-Reply-To: <CAK8P3a3Q9e59uqeZSLw6wqtNZYLe8LVgCO9RQGJB4D0F+3MLdg@mail.gmail.com>
On Fri, Jun 29, 2018 at 10:47:31PM +0200, Arnd Bergmann wrote:
> On Fri, Jun 29, 2018 at 8:48 PM, Kees Cook <keescook@chromium.org> wrote:
> > In the quest to remove all stack VLA usage from the kernel[1], this
> > switches to using a kasprintf()ed buffer. Return paths are updated
> > to free the allocation.
> >
> > [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com
> >
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > ---
> > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 7 +++++--
> > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 28 +++++++++++++++++--------
> > 2 files changed, 24 insertions(+), 11 deletions(-)
>
> This seems fine, though using a fixed-length string is probably just
> as well here,
> given that the 'fwname' variable is always set to the constant string
> "a530_zap.mdt"
> at the moment, which is not very long.
We could make it fixed but since this code is only called once this
feels safer.
Jordan
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-06-29 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 18:48 Kees Cook
2018-06-29 20:47 ` Arnd Bergmann
2018-06-29 21:19 ` Jordan Crouse [this message]
2018-06-29 21:20 ` Jordan Crouse
2018-08-02 23:24 ` Kees Cook
2018-08-03 12:04 ` Rob Clark
2018-07-02 8:34 ` SF Markus Elfring
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=20180629211935.GG24526@jcrouse-lnx.qualcomm.com \
--to=jcrouse@codeaurora.org \
--cc=airlied@linux.ie \
--cc=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=keescook@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.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
all inboxes | Powered by JetHome®