Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 10 Apr 2018 21:08:55 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: Laura Abbott <labbott@...hat.com>
Cc: Sinan Kaya <okaya@...eaurora.org>,
	Dan Williams <dan.j.williams@...el.com>, dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com,
	Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] dmaengine: dmatest: Remove use of VLAs

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
-- 
~Vinod

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.