Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8481586rwl; Tue, 10 Jan 2023 14:20:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJ6A3K9ESChyNptOhJ8p8nTFfHYKv8eFbg3tAwb+bGSBFQvXAY6fY3NkjgmwQr40SaVO8n X-Received: by 2002:a17:90b:4c0f:b0:225:eb4b:222f with SMTP id na15-20020a17090b4c0f00b00225eb4b222fmr55964358pjb.45.1673389215782; Tue, 10 Jan 2023 14:20:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673389215; cv=none; d=google.com; s=arc-20160816; b=KAxhuzShBUrQXLSIE8NVBueCEFGRb3JRHTpey6Altg+Hh6u73uoH2nMYJuQvy7Jj26 vO7sKhwZANp0mTw1c0qLiF+J8YIvDGJBty5AJqgUizoeMyNfgb0Ui6bFBQLyJmOLgrPH /pm5lhtY3LXypCWhLyhCe4FG3c3hoD1oYzs+Ziqw7/J4gIDogI/aJcz0v3ppwAwyUWy5 hAjSAkYReLFBIu9LT1NKpwl/gGN9LqnN9iWsKCCCKvD5x0P6OAuqqud2F5qTAmaWjgYl sa2CGIip1C3ajJETQegcjguolrRyrCJ8fXQFGAVsgd22Hs0ncj0YwVTne8TkTU6b6Q3g iHGA== 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=U577vnktAersop3sE2Vgk2QPf5Dyzg9UCAOJXjKCv14=; b=UVz3tjpT4sxDjcxMVBHs6OQy/4ksZq/H0DHOZwlw/Qehw0+HXXLQ1PI0Z419jk0Xzf gCp8aGfd1br7sg7Npi4oeafsCQA4/wD4mRZUDOYZAJVKmYoTkI9kgxQ43V7qKaQyfHdV dCeEW9HaUNQ7cK4xZ36dWPIe+nKjt+NgcqTZfWZJO+qXsXK+vqVx+FkU/prK0f//xmWk bI0ebXR0boQukQNiFb+59OWzZSiSStu5b8w3CMyZFTRTb+hZuG1WogNxX4rOLyNrHAtb ReRm/DJsPJbjnQTgCHJaerP3utnGQ9ClhCJX1w1xnhvNPtlzg5qwqV1Su1q25UioxijD EGHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rp92ue4C; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lr8-20020a17090b4b8800b00218ac70fdefsi14229104pjb.183.2023.01.10.14.20.09; Tue, 10 Jan 2023 14:20:15 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=rp92ue4C; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233118AbjAJVwf (ORCPT + 53 others); Tue, 10 Jan 2023 16:52:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232908AbjAJVwa (ORCPT ); Tue, 10 Jan 2023 16:52:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3DB3479D1; Tue, 10 Jan 2023 13:52:29 -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 ams.source.kernel.org (Postfix) with ESMTPS id 99F99B819B2; Tue, 10 Jan 2023 21:52:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34F96C433EF; Tue, 10 Jan 2023 21:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673387547; bh=U577vnktAersop3sE2Vgk2QPf5Dyzg9UCAOJXjKCv14=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rp92ue4CxvqOShsJn15quJzekl0gtNhM3K4qNgqg6VwoZDx1gZceG3XePjto+I3e9 cTHtJVuff/gWdyr5L7ZjzTlAv3DOM3He4pOMm6GdjnUebBEuqzURkqlKBW+MTtsS8N EXQyp/YfBIICIi7YPUq83QJF5MCVq4IU4PkL29FVA7SsjI2oChu1VrYg0ITEWjvqRp cutLmdtYH/dnHuv5M408OP60DU+YW+HT90wjY+BwFuYsDD0ob1Xko6WRauC7jJhlfk sNU3+kXGgEFSOC+oy/vw2e2n9oV+w1oD8qGk90yyjkQFuDNUxwqaikZoDzK6CxahaD FIBl/6ggJg+Cw== Date: Tue, 10 Jan 2023 13:52:25 -0800 From: Saeed Mahameed To: "Gustavo A. R. Silva" Cc: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] net/mlx5e: Replace zero-length array with flexible-array member Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 09 Jan 19:39, Gustavo A. R. Silva wrote: >Zero-length arrays are deprecated[1] and we are moving towards >adopting C99 flexible-array members instead. So, replace zero-length >array declaration in struct mlx5e_flow_meter_aso_obj with flex-array >member. > >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 [2]. > >Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] >Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] >Link: https://github.com/KSPP/linux/issues/78 >Signed-off-by: Gustavo A. R. Silva Applied to net-next-mlx5, Thanks!