mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: Sinan Kaya <okaya@codeaurora.org>,
	Vinod Koul <vinod.koul@intel.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] dmaengine: dmatest: Remove use of VLAs
Date: Mon, 9 Apr 2018 16:14:20 -0700	[thread overview]
Message-ID: <9bdd8bb4-b6d9-e170-b585-b2dc3b8f0d67@redhat.com> (raw)
In-Reply-To: <4491bde2-cf38-5103-0634-1986ecd32a7c@codeaurora.org>

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.

Thanks,
Laura

  reply	other threads:[~2018-04-09 23:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 21:06 Laura Abbott
2018-04-09 22:48 ` Sinan Kaya
2018-04-09 23:14   ` Laura Abbott [this message]
2018-04-09 23:19     ` okaya
2018-04-10 15:38     ` Vinod Koul
2018-04-10  4:00 ` kbuild test robot

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=9bdd8bb4-b6d9-e170-b585-b2dc3b8f0d67@redhat.com \
    --to=labbott@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=okaya@codeaurora.org \
    --cc=vinod.koul@intel.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

Powered by JetHome