Received: by 10.213.65.68 with SMTP id h4csp3198853imn; Mon, 9 Apr 2018 16:18:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ge/3rRvyzSqGUD0wP6gbMvbbE2UagwpYLd7SIT48BUWviH3zWlwIZVCCBo0V3qep8sBAR X-Received: by 2002:a17:902:7894:: with SMTP id q20-v6mr41360051pll.86.1523315901134; Mon, 09 Apr 2018 16:18:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523315901; cv=none; d=google.com; s=arc-20160816; b=mBca7lk9hVt8AmDcXmc3D0AOt/LPZEz7Q9eTg1AGN30Gtu57rxZbWY7KLSqA4fti68 gEmmQRzCUeRWDlYKUFVZIlgXqWQqF6RbCEabISOZU9wciuIZpbEgjl+Sl3PkElrsWBo/ tANpY1UBDTYD7cNLH5VN9rv9JTN8twbrEEaUQ8z+h8cWVJv2N+oc6JvKyOU5asgVzYiF 3eWKSm60LrInzeY3cUIImbVXbnnQ0Gfj6NJndF/YjVffP0CICbHZeqXTfAV7ZCsa6Rlo XmNh/+tcM378AYUlr+rlvdPybE0GT/LAyKENYn3MVKlMrK0nu/bsaub2+gdo8hZcFt2c cv6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=vwEDXkAhqs7n55VQY7BQnGti3DQXVLcYlL5qAby3A90=; b=uLDGphFBgAOuERKKqeelKVbA0HYO+h5C44MOtEQQuUPsx79Fb+cAhcxuXW1OF7VRCT yhZc2JX/OBZMW4qpK/Cia9vvp/D8MWjBtVZo5zjU37RCSVjmJlxElSNckQ60TGZ2I+Ap jdkDASVy8wscORloE87i90DKyCZvbMMCdJuF8ehv4q47C6BYB56l4zpFVyNZ/L5sIZx+ oCDs3Nag2a5M0eZXbJM/p3RNcZZDjq07DJQJbyaM91f4q6UmsrEfhHkO2Z90VUNwPi8r z4op1u3G8AHVsJgc7wFKsnHpm3zeeVjtUP5JPvwPrfoxecXDXMtgOuwRbUoux5ala9i3 nJhQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2-v6si1281743pld.596.2018.04.09.16.17.44; Mon, 09 Apr 2018 16:18:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbeDIXO3 (ORCPT + 99 others); Mon, 9 Apr 2018 19:14:29 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:46146 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbeDIXOZ (ORCPT ); Mon, 9 Apr 2018 19:14:25 -0400 Received: by mail-pf0-f182.google.com with SMTP id h69so6654485pfe.13 for ; Mon, 09 Apr 2018 16:14:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vwEDXkAhqs7n55VQY7BQnGti3DQXVLcYlL5qAby3A90=; b=g/YaO85qSR0xZ5S1y4mWwMvkUJ/lHVLGv1HzsdS48R6kc4hUEUkraPS833o7SQKGIV +fZuxlFYtcX/CH9HA0E3YIXk1+rursktV3lD54QqJ8u9k4JJP2UFBExLe4epPRlk++wW D8fl2UwakxGhUvzVngCV2FC6H1y5w0xiOkt9oQ5sa6iNR1ZEBS8lgSm1gJi/Cl1GL7bv E3cBzheb8i4CREH0zmUPVuquzbovh6tSPh2RDJcDLbseM/m57SDQ4eouH9wIkpZHKv0j NOGsA0nH07UEqVtJu2ImpakwPKh9YMIf7sv2B58CGHhPR6sRNNpNnxm//deQhEt6bmBs qc3A== X-Gm-Message-State: AElRT7H2sKs8GWLfmbHJnYm8Sk1ovNu9fSJa/mIFzrhlrSt5PLaIj05G 9TULUN9ddYoIa23PGlPUe1NNnw== X-Received: by 10.101.65.195 with SMTP id b3mr26383279pgq.118.1523315665491; Mon, 09 Apr 2018 16:14:25 -0700 (PDT) Received: from ?IPv6:2601:602:9802:a8dc::1082? ([2601:602:9802:a8dc::1082]) by smtp.gmail.com with ESMTPSA id x29sm3050234pfk.68.2018.04.09.16.14.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 16:14:24 -0700 (PDT) Subject: Re: [PATCH] dmaengine: dmatest: Remove use of VLAs To: Sinan Kaya , Vinod Koul , Dan Williams Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, Kees Cook References: <20180409210603.3575-1-labbott@redhat.com> <4491bde2-cf38-5103-0634-1986ecd32a7c@codeaurora.org> From: Laura Abbott Message-ID: <9bdd8bb4-b6d9-e170-b585-b2dc3b8f0d67@redhat.com> Date: Mon, 9 Apr 2018 16:14:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <4491bde2-cf38-5103-0634-1986ecd32a7c@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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