Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp536275rwb; Thu, 22 Sep 2022 23:57:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50uddkeN+Sigr8o5ppCSe9CqAjwTdeAURtgVJV2hHN+k1KHNj8EpEkjRakBkitB8khCwn9 X-Received: by 2002:a17:902:e841:b0:177:82b6:e6f7 with SMTP id t1-20020a170902e84100b0017782b6e6f7mr7282138plg.66.1663916228128; Thu, 22 Sep 2022 23:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663916228; cv=none; d=google.com; s=arc-20160816; b=CvjbQLq/+1f4a8YIW3By4I30fZvCD1FVxsYS2sKs/sFKO6w5uqvsgxBzmYxdw7UfV5 Uy5T5ywGol38JUiJNZRVze0tQ+2pxZXcvp7218cYHV7AGwu1h1zNb76AAKLyIlp1opfG +5fvt/c04I0lBouZoyQVVfJ261KplKYzieSamQRk2loOOTUQKLkEixvwhsw5CU+vNFTG AdnrCpU+egtX1MyqybWbTY/ZUz7AceVcfuckB9bOcY81JNfI7R8uSQldDK0jKqSQ60Kd Y166p7WVcusb/WjIVqatlKq0DXU4sD6uHrA94h2fzlqcIi30LJ8l3NrpHEfBW1PjhcbI gSpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5n36C2tqfcTCjqcGkGfBQuKpTNAA2BKA5lMbPoJLYUQ=; b=pzA+MYZzYCVlzVOGd2LCxibi6fU2Nyyl+lQUaPopVZ1wP/5PvKDZtsT+pNbBJeBdFo NhqU2+zDC4j7cldMlL+GvdD3oaYMdykkZCEnU8jlahOfTuHRQ1V81wbIkuCiy9K2QGcz RB5izj78R+6J1uygWrJAF8UhvJM43Gzp30hyN+ZkLy35/sNHkXQwQl7OODhOY8nAit1G wu0FsBeggWRC8aBixdJU8oTGxuU8gCXGpf8EVff/eufAcqLq9q39nesnVBpVGjcdSu0K QEMRLtV0dSsDrkSbhI2zz2OEIof1Zb/4a69YaW+O4/OqmohFlH/H5fvoJVUrbJhBhu2j P3Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=fJmGGepx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ionos.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a056a00194a00b005526b77c77asi10138244pfk.51.2022.09.22.23.56.56; Thu, 22 Sep 2022 23:57:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=fJmGGepx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ionos.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230228AbiIWGvX (ORCPT + 99 others); Fri, 23 Sep 2022 02:51:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230106AbiIWGvV (ORCPT ); Fri, 23 Sep 2022 02:51:21 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44771128891 for ; Thu, 22 Sep 2022 23:51:20 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id a14so13561186ljj.8 for ; Thu, 22 Sep 2022 23:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=5n36C2tqfcTCjqcGkGfBQuKpTNAA2BKA5lMbPoJLYUQ=; b=fJmGGepxP+6q2bIHI5328Lq4ITyrloOYv1zS43szF3ZREYrzkBnONf42D6jHk+s25l RV2QvL/SeyLmojPAck86cTnW+P/VtmvtOTV7cohizBPTykbHHF+0S+z9GfWCWz6Fu4YC wwmFQ3wyyOSX2irMzapqbBkQ44KA2MW7ZzaScBU64k4eq6SzYDRtcoPtOp+G8fQaMAT9 chVIkxfXJALs4DlMhQilRH/ZyGIEdFTyXK+Ty62ay8SkeNa8R+VaEz+OdIsrf+NzsNF9 5ct8+yG0BbEBt8blD+5XJYs6ASJqofVKx47FlbA5iwaZpeDBeRt8DfVc+BXbdtljP5xb DiCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=5n36C2tqfcTCjqcGkGfBQuKpTNAA2BKA5lMbPoJLYUQ=; b=NkGiSTqgVR2yLXgeX9/LJJBbP2ZWKz201Ovp+zmAFcX0NXhdlusaLPfrQsGqKrXA2J Hv23izmqhujDnn6mkL+yqY6bPTGfUHmc3Q07tkpBWvRec+dh67YL3wRGEFkkhkm0X/Cn X62da7q8FgOtvRcG5SwQyhXndvCXupdBcfq3w4VAVm/fFAN2c4CSk06JcI2h0UOy4I0j +y5w8qOZVRXxsRmmJGMwwAjj0zdWh/K6RqJi5wPuwNilLtzvXFs6XL3KsObBXc54dbSr vaFiRa9u3oEyc+pmRUA3a65x6v4uvkO/6D60YqNNnY8R7Uvlc/TM9O8QpkMR9UzX9J4k asuA== X-Gm-Message-State: ACrzQf1Mat1GYl6oXizWU5cFnJ1xHiXH3PIZj8EOvgudt80zF0BRYPX+ JGC4JbX5hONQ+suHRp0ujGjsVsubggRqTpR9thThdw== X-Received: by 2002:a2e:bf21:0:b0:266:2be3:61e8 with SMTP id c33-20020a2ebf21000000b002662be361e8mr2243397ljr.383.1663915878464; Thu, 22 Sep 2022 23:51:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jinpu Wang Date: Fri, 23 Sep 2022 08:51:07 +0200 Message-ID: Subject: Re: [PATCH] scsi: pm8001: Replace one-element array with flexible-array member To: "Gustavo A. R. Silva" Cc: Jack Wang , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On Thu, Sep 22, 2022 at 9:30 PM Gustavo A. R. Silva wrote: > > One-element arrays are deprecated, and we are replacing them with flexible > array members instead. So, replace one-element array with flexible-array > member in struct fw_control_info. > > This helps with the ongoing efforts to tighten the FORTIFY_SOURCE > routines on memcpy() and help us make progress towards globally > enabling -fstrict-flex-arrays=3 [1]. > > Link: https://github.com/KSPP/linux/issues/79 > Link: https://github.com/KSPP/linux/issues/207 > Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] > Signed-off-by: Gustavo A. R. Silva Acked-by: Jack Wang > --- > drivers/scsi/pm8001/pm8001_sas.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h > index c5e3f380a01c..b08f52673889 100644 > --- a/drivers/scsi/pm8001/pm8001_sas.h > +++ b/drivers/scsi/pm8001/pm8001_sas.h > @@ -612,7 +612,7 @@ struct fw_control_info { > operations.*/ > u32 reserved;/* padding required for 64 bit > alignment */ > - u8 buffer[1];/* Start of buffer */ > + u8 buffer[];/* Start of buffer */ > }; > struct fw_control_ex { > struct fw_control_info *fw_control; > -- > 2.34.1 >