All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@codeaurora.org>
To: Laura Abbott <labbott@redhat.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
	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>,
	dmaengine-owner@vger.kernel.org
Subject: dmaengine: dmatest: Remove use of VLAs
Date: Mon, 09 Apr 2018 19:19:16 -0400	[thread overview]
Message-ID: <e2991519fb007653c35bf52210af36b9@codeaurora.org> (raw)

On 2018-04-09 19:14, 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.

I think allocation is a better choice.

> 
> Thanks,
> Laura
> 
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: okaya@codeaurora.org
To: Laura Abbott <labbott@redhat.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
	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>,
	dmaengine-owner@vger.kernel.org
Subject: Re: [PATCH] dmaengine: dmatest: Remove use of VLAs
Date: Mon, 09 Apr 2018 19:19:16 -0400	[thread overview]
Message-ID: <e2991519fb007653c35bf52210af36b9@codeaurora.org> (raw)
In-Reply-To: <9bdd8bb4-b6d9-e170-b585-b2dc3b8f0d67@redhat.com>

On 2018-04-09 19:14, 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.

I think allocation is a better choice.

> 
> Thanks,
> Laura
> 
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 23:19 Sinan Kaya [this message]
2018-04-09 23:19 ` [PATCH] dmaengine: dmatest: Remove use of VLAs okaya
  -- strict thread matches above, loose matches on Subject: below --
2018-04-10 15:38 Vinod Koul
2018-04-10 15:38 ` [PATCH] " Vinod Koul
2018-04-10  4:00 kbuild test robot
2018-04-10  4:00 ` [PATCH] " kbuild test robot
2018-04-10  4:00 ` kbuild test robot
2018-04-09 23:14 Laura Abbott
2018-04-09 23:14 ` [PATCH] " Laura Abbott
2018-04-09 22:48 Sinan Kaya
2018-04-09 22:48 ` [PATCH] " Sinan Kaya
2018-04-09 21:06 Laura Abbott
2018-04-09 21:06 ` [PATCH] " 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=e2991519fb007653c35bf52210af36b9@codeaurora.org \
    --to=okaya@codeaurora.org \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine-owner@vger.kernel.org \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.