Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4500122pxb; Mon, 21 Feb 2022 23:25:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZBNjz2pvJEwW3eRC9bMNeMTqI1iLRGjL68+LKi6Qa+iIv+SgvBDluSTAiQdfWf8T8r/o3 X-Received: by 2002:a63:348:0:b0:373:9e18:8695 with SMTP id 69-20020a630348000000b003739e188695mr18764332pgd.280.1645514734859; Mon, 21 Feb 2022 23:25:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645514734; cv=none; d=google.com; s=arc-20160816; b=FkWYHy0D4kPJZiO7uQuJiMgoZsoklaX1BnXzsWzf+e26/ofQHRKInaYHHP7O9LlPQv gb4KPMASjfCdJ5DTYTPd+0UCeNIsQgDOG0D3QFhBsJ6WT3azZSxRMxHRhBuZqPyh86sz LcguzFu/HC/d6QutbJmtpw6Ui/bgx/iHxuPJ6ggugCtsHU54068SeQi19fICoCXfTO/2 fZaTdnyH+xN3lLQFoqt0hKde9s1kPDC9hoAtQV4KEUdTZbkuWvqKRZUhdxnCFKRx+7jd 8HseAKIt7cS28W/ACuSOXo2Wtd9OAkHgfiN4bWYX0SFQfuiJ7doz5WSBYVe7n2rLiMWa jQeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iVMYxGbUY3rJXPVdzuW5PVXrR4I9e4pvebTb+H27pv0=; b=UA/4Znzp/w2FOziRRfJmZlhbZQ0ZzirrriYjrIjIZ52jjdR0Z9rwUvVAoiJAwDbR7i aEAqxUr6prDeTY9ihd0jSN2Qmk/GOM/tcfE126RVE126ojTbhjnkmpjn3azsPJtikbnT o48To+evzKof8iAH5/++KGC+HKtpPyPnmJ9ysfwPRUwoK6hiYvl7UpYLdnGBxLwrocGN 8EyiKNFPkSPDku9EKescAGkAfuHDCsiaagTwPH7ZDTnc9ZI+MSGaTDIRzhKBSc3GcOxM tKzr6V+P/aXUBmhZSjwG2gdA6mdqs4KE1gE0qqpNIW3xG5N2t3FaDmn22LC6L1iNx1gS Kf7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sOGlSCAo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o16si23393234pgu.129.2022.02.21.23.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 23:25:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sOGlSCAo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 149C0C4B72; Mon, 21 Feb 2022 23:23:21 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231137AbiBVHXl (ORCPT + 99 others); Tue, 22 Feb 2022 02:23:41 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:54626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbiBVHXj (ORCPT ); Tue, 22 Feb 2022 02:23:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5573EC4295; Mon, 21 Feb 2022 23:23:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E4D95611C8; Tue, 22 Feb 2022 07:23:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA9E1C340E8; Tue, 22 Feb 2022 07:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645514594; bh=lw9fy6EP1h2nUptSIDOirVphpvqPdsxFhmUtQZxs2B0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sOGlSCAogaMh7NzeqJYs5YzeOcOA0uhY6Jy1te1KlgAs5DEvMt1L0aeXbCmGV7qjR /QCHBeqAye9mcbW0UGXVYL40S1W2UmB3lRacQVKCFduYQMhoQA5VQb43YvLA2BCJno IivFiSCoK10IkwdVNKQrvN7eh2xh1Pw4p0NY2W1/kqQTpQU124IHRpq4uQX3Srb/yv IGBT+7by5twipzM+hmklfKDGiI4hTVPtfXTjGtItjJ9Kn+ou7kpTsweqbHYgM4L3M4 ra5GgwfLaCX+Sef4H64BgmnMFaVsOBCdwqrY0zlugsqma1/7aD5jx4WF1WdzHVmYEF hawqnv6QKx37w== Date: Tue, 22 Feb 2022 01:31:07 -0600 From: "Gustavo A. R. Silva" To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" , linux-hardening@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH 8/8][next] scsi: aacraid: Replace one-element array with flexible-array member in struct aac_aifcmd Message-ID: <7d0571ef5dc87904008c325a942cfed24dbbf42e.1645513670.git.gustavoars@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace one-element array with flexible-array member in struct aac_aifcmd. This issue was found with the help of Coccinelle and audited and fixed, manually. Link: https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/aacraid/aacraid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 97948cd5f13c..447feabf5360 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -2616,7 +2616,7 @@ struct aac_hba_info { struct aac_aifcmd { __le32 command; /* Tell host what type of notify this is */ __le32 seqnum; /* To allow ordering of reports (if necessary) */ - u8 data[1]; /* Undefined length (from kernel viewpoint) */ + u8 data[]; /* Undefined length (from kernel viewpoint) */ }; /** -- 2.27.0