From: Vinod Koul <vinod.koul@intel.com>
To: Laura Abbott <labbott@redhat.com>
Cc: Sinan Kaya <okaya@codeaurora.org>,
Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com,
Kees Cook <keescook@chromium.org>
Subject: dmaengine: dmatest: Remove use of VLAs
Date: Tue, 10 Apr 2018 21:08:55 +0530 [thread overview]
Message-ID: <20180410153854.GT6014@localhost> (raw)
On Mon, Apr 09, 2018 at 04:14:20PM -0700, Laura Abbott wrote:
> On 04/09/2018 03:48 PM, Sinan Kaya wrote:
> >On 4/9/2018 5:06 PM, Laura Abbott wrote:
> >>+ /* dst_cnt can't be more than u8 */
> >>+ dma_addr_t dma_pq[255];
> >
> >This is 2k stack space on 64 bit architectures. Isn't that a lot?
> >
>
> Depends on your definition of 'a lot'. My assumption was that
> since this was a test module there would be some willingness
> to be a bit more generous. The problem is the array size is
> based off of the parameters passed in, although oddly enough
> it's based off of the minimum of two variables. If you have
> a suggestion for a tighter bound we can use that. Another
> option is to just switch to allocating the array with kmalloc.
> That might be reasonable here since there's other setup
> that happens before the test starts.
Being a test module I don't think I would have too many qualms with current
approach :) said that kmalloc approach seems reasonable too..
Thanks
next reply other threads:[~2018-04-10 15:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 15:38 Vinod Koul [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-04-10 4:00 dmaengine: dmatest: Remove use of VLAs kbuild test robot
2018-04-09 23:19 Sinan Kaya
2018-04-09 23:14 Laura Abbott
2018-04-09 22:48 Sinan Kaya
2018-04-09 21:06 Laura Abbott
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=20180410153854.GT6014@localhost \
--to=vinod.koul@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=okaya@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).