Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7817004rwl; Tue, 10 Jan 2023 05:53:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXsBprvLQ9SRPSF5dotKd1EqY7Ipzfg0o0wpjDddF1ohNOgV7PQiyfJaPXFR0BjavUMSpvEh X-Received: by 2002:a17:902:edd1:b0:192:50fe:504a with SMTP id q17-20020a170902edd100b0019250fe504amr63890145plk.16.1673358805608; Tue, 10 Jan 2023 05:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673358805; cv=none; d=google.com; s=arc-20160816; b=xa8EipOeipMvE4WaBq59Hrm3NrEXlq6H7vKxQ3Qb1zMne+hb/Ddd4C8QWacMtvcq2D JAjZcet3grc63NbA4QZ1Ge5bbZDw8HVJoES+C8tmuT0FGu/nRE1F1u3sl9e4OcWDlwXH 0SXlkBjBzNPo7x/nGXT7hlu8bTo1RiHPAtM8DRW6CdzSqlbqNUK2spYP49z5JG12kVEt qUpW06gciD4UQEQ/EN2dgBQUxPP7f2rAJHEC44TzKuzA/6Env0Z/CEC3ozogKSPphWdo zp2L+FelfJwus1poWU2HG9HQwDv2nn8gYTwBAWMhw2ZhNiXBJDNNlMbdQ7poMsWQwwer Gprg== 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=428Utdh+e6F2/hWYnKzDhqLh/AHuuQMV5oFWLJ3BKqg=; b=diwRHj0KS4RhvsuQbMqmh7y7PxxAIv+r28MFfHnUQ4rASI4kUCV7nDELoDE6QLi7DW 8xGQ5uNMTmzkkyltv4dGdlj7G8DJ7mCdJDum+yp91wWenM/8UQ/x556IRQyA2hqS/3kZ ZBH+v5qzZWbeLwmKuI3nnLiaeYORsw/4fj1bJoFA3wYUKa4+ohye5QIyerRFaK+thWWY weKrCap2JOARl9XlIFP1C1z4ozK7opa4L80r3V0MpkuwAsKpSedR5xhLJcL0j+i18bBs zGsUi6zijEBIFupNgVxmtCv2Xq9g5BF+tiRL5vGt3HTEfgF8H8/Q7v1UTSxph2VtiKrK 6czQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PifxqQiV; 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 f9-20020a170902e98900b00186e9ff4edcsi10792970plb.408.2023.01.10.05.53.19; Tue, 10 Jan 2023 05:53:25 -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=PifxqQiV; 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 S229796AbjAJNfN (ORCPT + 53 others); Tue, 10 Jan 2023 08:35:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238748AbjAJNez (ORCPT ); Tue, 10 Jan 2023 08:34:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC19E7A39C; Tue, 10 Jan 2023 05:34:46 -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 6CA5D6171A; Tue, 10 Jan 2023 13:34:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C67F9C433EF; Tue, 10 Jan 2023 13:34:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673357685; bh=428Utdh+e6F2/hWYnKzDhqLh/AHuuQMV5oFWLJ3BKqg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PifxqQiVsu2yVxl+rvItZRxvJQ4ShpBz+CyugsIA5h6Xy6eogwCrR6tFdn76H51+9 qwBoKfhNOJNlRtFcQ/bMGGgJu4QKQ1zCSwlKDl9DFdRWeQ/7OuSK4Hzt0+nyn6MwOP LqUQ7e9EXMAJOHgoyZ7zYMsA2pTYuw+LnTwCQLOXx3ZeEZ5mMZ1ziIMRcfu+vRCPDy 4+1UlQ99l+q3b/OU3Uvclc+Se2K9gawsEzPhhFNB0o+HDCaGQ1eS6X9FFeFWslUut1 vEK5uBOSLo4urIQZBEhY5KYGic/0vEo1sVWuCPPhuuKCyWc32c58/++vHWcWbO8jWn 5/8lVcEXr2T9w== Received: by mail-yb1-f169.google.com with SMTP id c124so11737562ybb.13; Tue, 10 Jan 2023 05:34:45 -0800 (PST) X-Gm-Message-State: AFqh2krp9A9p2LbrRsjXT4gB8vCKRU3XGqg8aUEuspH98x3bM9+LK/TQ 770zCGLSrEzw66xrVbDt8bLsvsCWuHP6fZbzPfo= X-Received: by 2002:a25:bbd1:0:b0:70b:87c6:4fe with SMTP id c17-20020a25bbd1000000b0070b87c604femr7421709ybk.550.1673357684837; Tue, 10 Jan 2023 05:34:44 -0800 (PST) MIME-Version: 1.0 References: <20230110104609.GA1602079@linux.intel.com> In-Reply-To: <20230110104609.GA1602079@linux.intel.com> From: Oded Gabbay Date: Tue, 10 Jan 2023 15:34:18 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH][next] habanalabs: Replace zero-length arrays with flexible-array members To: Stanislaw Gruszka Cc: "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" 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 Tue, Jan 10, 2023 at 12:46 PM Stanislaw Gruszka wrote: > > On Mon, Jan 09, 2023 at 07:39:47PM -0600, 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 > > arrays in a couple of structures with flex-array members. > > > > 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 > > Reviewed-by: Stanislaw Gruszka Thanks, applied to -next. Oded