Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp766722rwb; Fri, 18 Nov 2022 08:01:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6IV14egB+EKwaphGNJpiFyehO8ecgjlG5iW+x+/vU3QUQKA2440xLhJKK/EfD9plpBIXVz X-Received: by 2002:a63:1607:0:b0:457:a1d3:48c3 with SMTP id w7-20020a631607000000b00457a1d348c3mr7065142pgl.465.1668787314145; Fri, 18 Nov 2022 08:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668787314; cv=none; d=google.com; s=arc-20160816; b=EJPAYaUikB3kvexrE0D1zi6jLewDkTu1hNyZ13eewYTpi63JeWDx4AGnFCTIlTxnVu 7eLYSlirgsucoGoNaahZoM0HH4T+E7T2Qd/g3L4yOGjD8KXxJifVCox7Z3JxEwtn2+A5 eKw8eiMZ0kyOhonIJ8O0q0LCIYze+/dNXnOTZBzAZjXNZVRBlhwBuD2ZFAkRsThCldoI 8oxwKS8kPrtaE2t/SDL+V7nHX2d05AnUZclHbw7si/zEha2Y/0bwyikZ84zTUvfryC2w r0lAvbC8VyLIXEQeOJ/hLbXY+zMYiv7gsxGsqCr6ManVjB1OxexVdkdrDdBO+ZHOzt4P SRVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Cekggd2mIGpDHP16Z+247DH6Af3bPNgMmmmk4IQXF+o=; b=ahMZ9mz59M8WYNJuO35muOOjBNnb5pzx2z3shJFS1akJHyo4vLRNLY7pyBD9RyWLup t/8+poBWqIakVkUqNzah+qfsmmYfswyvBGkoJYam0Nt6A8epRJiVwoDBhOZbZprM7XFS tu96zsVEZjc6lvReG8rLqnO8WOpxEpHUyZ4RgxW8cSXhZcyDWFGSnWXp1oUNTlq825hB URISlFRbSy/+J8rH4XEiaHvDFbs4ysWe+4AJh3wZzPFKNueo2uDv1sFysfFw2zm6Rrhs vnbCab2Hdk9T48ZzIemadBp/4/y8OQV8dBP6lPBKNfl++DPqknzpHa3LumPzKIMs3nIq JCcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pt0nEkiY; 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 h13-20020a63574d000000b00476e640ddfesi4279416pgm.80.2022.11.18.08.01.41; Fri, 18 Nov 2022 08:01:54 -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=Pt0nEkiY; 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 S242438AbiKRPlU (ORCPT + 91 others); Fri, 18 Nov 2022 10:41:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242352AbiKRPlN (ORCPT ); Fri, 18 Nov 2022 10:41:13 -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 EE0AB78D4B; Fri, 18 Nov 2022 07:41:05 -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 96084B8244F; Fri, 18 Nov 2022 15:41:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E359AC433B5; Fri, 18 Nov 2022 15:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668786063; bh=R4xBJmP/myMQ0Kip18TRQGWMGPC+256bduAJsZzqgm8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Pt0nEkiYP3Ivn4a4HL4M+vbconKZ7ATVzTHnVeCQ+LegKL8X286/oC1lyMsME/OXW ZMbTuE2qFVQLMuF8va+AOyLbVPqK30Yu74zham5+Guz2H9iplrRwJvZk2Is293TSPD Skuk3pPei4Cuitu/21dNYeFzCwmxHf7v59A+7rRRAxJE6dirbxk9Ksfgz/IFX7j6xF tpu6JsI5ZPCdgloE6dPrd09m5fsG22G+Wyl0onBDvdhzivzrtHmy7kfgJoE0jqoS+j x+zKiG91/B9E/11/sPBgiRXd2CMmtjSTAlm1xjUE/xgVSZcw2IqTkxjYikZ4zsPMWw x/ux5+87roo7Q== Message-ID: Date: Fri, 18 Nov 2022 08:41:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH] ipv4/fib: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Content-Language: en-US To: Kees Cook , Jakub Kicinski Cc: "David S. Miller" , Hideaki YOSHIFUJI , Eric Dumazet , Paolo Abeni , "Gustavo A. R. Silva" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20221118042142.never.400-kees@kernel.org> From: David Ahern In-Reply-To: <20221118042142.never.400-kees@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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,NICE_REPLY_A, 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 11/17/22 9:21 PM, Kees Cook wrote: > Zero-length arrays are deprecated[1] and are being replaced with > flexible array members in support of the ongoing efforts to tighten the > FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing > with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3. > > Replace zero-length array with flexible-array member in struct key_vector. > > This results in no differences in binary output. > > [1] https://github.com/KSPP/linux/issues/78 > > Cc: Jakub Kicinski > Cc: "David S. Miller" > Cc: Hideaki YOSHIFUJI > Cc: David Ahern > Cc: Eric Dumazet > Cc: Paolo Abeni > Cc: "Gustavo A. R. Silva" > Cc: netdev@vger.kernel.org > Signed-off-by: Kees Cook > --- > net/ipv4/fib_trie.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: David Ahern