Received: by 10.213.65.68 with SMTP id h4csp4059717imn; Tue, 10 Apr 2018 08:38:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx49/uY7gqNiZjNiiMVOLIeSzEdGIllfP5RCD+ygU95I1BdnbkLtgPOI9vjSjfiRJnhK9ymcz X-Received: by 2002:a17:902:60cf:: with SMTP id k15-v6mr994751pln.44.1523374704309; Tue, 10 Apr 2018 08:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523374704; cv=none; d=google.com; s=arc-20160816; b=ZY1LT5sKAAXE8XShVdc6GyY+1lu9lDM0jAiq0ncStAMcmhr++bSck9geQKUYN4pblJ 9dAE0LD3ShjskbKtVaMONtMPLv3mLpcIOo1S+SNnr03fZnNNgCk3fSUPPRjmaqW5fYMf xvnl7x8oKT4NwdmDXKJlb4gZbLvXdr6EdIruS+Dv2/8WOUiun/jqp7oAO8DAjEKFhqma we+f0MwqEhpb2xTvhPachh7sUJNyfA2UVYLB30CaWb9OnBHXCqa6R78NGf0pUTFfDel5 PqZVuU3nIvit6Fa9ipfbjn6vcjr+lGP3djuBdv8uWpx2NQskiU7nRRIncy/R61DRLC7j 6r/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=73ZT9MgX2oN9e8EMvDg7YjFk/uA2pDzUy4GMWy+bUSg=; b=hVTAABWHJEzyv32WzuHXslKRxD9BF31k7alNTiFjAS7ADFrMy8ATHJURDok632k97I w6L6bVxAhBz4TnnnTr1aT3yE1hU97v2izh+U66ms5FoA/zkCU3kxd6eTsL2IYaE0c2R1 HoRbi8c+Gw27iZQriTNkSAggbXeqyCCS9gYlbwEDeFbbsAAs0uMvW/wfW5nGXkxFnv9Z 0kGH9EDRbaVmTc/wQvYGCG8UzFaFOi0S5cUBjnEMDu1LT3U3FmhXmzQnp9EudTEI+NzC YOxQvKRPWMunRDhiRsnmPJArdm/Am0XU3jx8TpQETiDudSrPIGfz3VnGw2ac2ruTbIS/ KHJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si1998956pgc.529.2018.04.10.08.37.45; Tue, 10 Apr 2018 08:38:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751851AbeDJPee (ORCPT + 99 others); Tue, 10 Apr 2018 11:34:34 -0400 Received: from mga17.intel.com ([192.55.52.151]:7735 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbeDJPed (ORCPT ); Tue, 10 Apr 2018 11:34:33 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 08:34:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,432,1517904000"; d="scan'208";a="45753809" Received: from vkoul-udesk7.iind.intel.com (HELO localhost) ([10.223.84.143]) by fmsmga001.fm.intel.com with ESMTP; 10 Apr 2018 08:34:26 -0700 Date: Tue, 10 Apr 2018 21:08:55 +0530 From: Vinod Koul To: Laura Abbott Cc: Sinan Kaya , Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, Kees Cook Subject: Re: [PATCH] dmaengine: dmatest: Remove use of VLAs Message-ID: <20180410153854.GT6014@localhost> References: <20180409210603.3575-1-labbott@redhat.com> <4491bde2-cf38-5103-0634-1986ecd32a7c@codeaurora.org> <9bdd8bb4-b6d9-e170-b585-b2dc3b8f0d67@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9bdd8bb4-b6d9-e170-b585-b2dc3b8f0d67@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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