Received: by 10.213.65.68 with SMTP id h4csp1419668imn; Wed, 14 Mar 2018 21:38:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELtirJ8oR1FnebrmGFoc726vjfumlK1ij2u20TQaxDWenxSkJhf4NW1K8MIx0z9ImcRbNWyW X-Received: by 2002:a17:902:864b:: with SMTP id y11-v6mr6438258plt.380.1521088739634; Wed, 14 Mar 2018 21:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521088739; cv=none; d=google.com; s=arc-20160816; b=iZy6VOcBugE5YFh8b1JKAZdWo22oAv1AKg0j11XAyPbkxEZ6XQMIJqD3tO4BczQHFc Kz6CHriVur3oV0fqNeXwNXhhrUT1ZUkspnGiaDNCwC6t6m++Kl/CmpRwt7wYCFg1pt8y jorWnURhW+Nyv4NaxPh8wsdOvb5K5PsudcUPfJa9rrTmxpfmE4cCZk8iaF0keTnyyPLO iopHPvc8D1tuNHkzq4DC9bC6WM0DJpDv28PkG2Ct84QGZBiOIEeAUNyMwKzDul81mojk ELEu8SUVIZ4x054VTattRGEOWDGV+ToXWyT81jiUUrQIdJnR9GjRjdisEf6c8Y0Q4+80 eSSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:from:subject:cc:to :dkim-signature:arc-authentication-results; bh=sixVjZpVkmOLpduTVlXGinQtPSbiIZv32/WJMDUcM08=; b=qqdrYJjC+GaJFBPFLcr2nbTs3BwJODjKeV/Tf4pmf6Sr1+0gQId5zwhyYGp79smJXe sCusFiHzp2QSb0gPZPFQxC+S0Hb++KcGemNGdiiWohV7/xuU/jVQLoZA6zWpn6KqcO92 opaDd+cDU1Q0+OC6lE0e2VGNyO8+z9LjaWv9Zp3jDxqG6wNxi2q0bgYeEQkYEt9Zc3io 52LYBJ/qxKC0rm5yT5yeKDAiTfaa7szEnCpa8uPXniRSvDc5EdVFrHZhOT9iOehxjnCZ dhHpOJpeDU24AksvhIYWZfcpGCYskmfDPW/KzqJdO4oDfdFw/Efogjs4UUZ+UsM47c9f z4NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=J0By+pPy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12-v6si3397518pln.298.2018.03.14.21.38.44; Wed, 14 Mar 2018 21:38:59 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=J0By+pPy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751428AbeCOEht (ORCPT + 99 others); Thu, 15 Mar 2018 00:37:49 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:37776 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbeCOEhs (ORCPT ); Thu, 15 Mar 2018 00:37:48 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2F4agKq118240; Thu, 15 Mar 2018 04:37:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2017-10-26; bh=sixVjZpVkmOLpduTVlXGinQtPSbiIZv32/WJMDUcM08=; b=J0By+pPyMVzYUcpBsJwQw50KTCjyMawzdQgf3UAMWf1TurdFgUj6XjiXEn4/r2NHDs8Q qlum+ni202cUXK/exyas36rKTCVzVE1Kyz/XMvI6wLo5rpiaCvy/frupZrNKfEbOO+74 q/gKnkp9NMdMYxDAzXtb433+2XWPjUIBmRkiiS1v1gpGdoD3mHOOqkhXJ+niKATxkwKh X4P/A5f9Ay0r+uosdj/XW+kkzqvKlkP48pSX80PZ5xphRFkLoQZxyRN978l1OOy6DFhh 7A3DUtqvR/0KNL8SAsO2VgSNFyaZgPWVU8u0t12o3l8IMa/359kJVog45hpLht3kYlgj 6Q== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2gqg8fha2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Mar 2018 04:37:23 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2F4bMBk027709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Mar 2018 04:37:22 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2F4bMbC024661; Thu, 15 Mar 2018 04:37:22 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Mar 2018 21:37:21 -0700 To: Stephen Kitt Cc: hare@suse.com, linux-scsi@vger.kernel.org, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] bfa: remove VLA From: "Martin K. Petersen" Organization: Oracle Corporation References: <20180308213841.13807-1-steve@sk2.org> Date: Thu, 15 Mar 2018 00:37:20 -0400 In-Reply-To: <20180308213841.13807-1-steve@sk2.org> (Stephen Kitt's message of "Thu, 8 Mar 2018 22:38:41 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8832 signatures=668690 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=451 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803150053 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stephen, > bfad_bsg.c uses a variable-length array declaration to measure the > size of a putative array; this can be replaced by the product of the > size of an element and the number of elements, avoiding the VLA > altogether. > > - sizeof(wwn_t[iocmd->nports])) != BFA_STATUS_OK) { > + sizeof(wwn_t) * iocmd->nports) != BFA_STATUS_OK) { These parentheses made me blurry eyed but it's actually OK. Applied to 4.17/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering