Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3609029rwe; Mon, 29 Aug 2022 15:50:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR4XwIWLszHqJVFq+DGRpbH7mIS/a0SF2hpNZMnIll8dc21NSrlfmoP7srq0uD0JaQXqeZSb X-Received: by 2002:a63:8048:0:b0:42b:73ef:ac8f with SMTP id j69-20020a638048000000b0042b73efac8fmr14860633pgd.446.1661813420628; Mon, 29 Aug 2022 15:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661813420; cv=none; d=google.com; s=arc-20160816; b=tdCc/IQwULqEUv5z5lRPVw4xZ8RK/Xfcfrvzr3TrrAqFiwnJBzQyGQUCmEtC4ukKLY 4W/8qYFvMX8TqD676c8Ma+sJnyl/1/ErOYLGUi8ABqGPpLaoc/iL8tA7VdLcjgXNN/wH Sz8NK6V4pTCplBQVNUKIbBoKRZTyuZsqhscYrkQY2xVc6TrOQGcQok/LN0V8ajLGln3W ARKiXZl0RlSZfyD6krMR9Co//db4vPRzihozwgKLJ8SAFO1oWlshVclWA5fKSFMMgfMd 7Ur6lWODx8it3fA85D2L130kOK5/XBv6+J8Csn0rtKUKhOxgrAxfNR8GhN/CXsxs0ABW BCwQ== 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=PVgk1cYgmYdP4/z4FGNSnk6B21vheryH4WleroFD7+c=; b=PS3fDANGNOgjtUkzvvnLBNDMo1pPZubdG8gW5iScd32KwEFQ7g2N1hBUP4RZ8HKQf2 iwVghnQgSf2+1n7yIaIP2MXOYagZ24dw0Juw1A3y3tXb0jsXFLlWwKwMBahNKLMC6VBC cY+TReZh0bHaosOft+BptURMz975bgtLhmAi/1rhOCJeHtvL5oYRJ2LCPPzesvcrcwt5 O0vooXPG786rW8Iyu4OmtLn3fMFwkbvM2+8Karc6mzU50HtQAKEivTkRbmpUoOuHNcjv PKGl2Om2o1EQaHCMJdh7GUleeEiAWsFdWSX+zZ3batR7dKxaU9iozXL2AopQHntywh7p dqJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=H1qAkZGA; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a655b81000000b00429cf28b83dsi517568pgr.396.2022.08.29.15.50.09; Mon, 29 Aug 2022 15:50:20 -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=@chromium.org header.s=google header.b=H1qAkZGA; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229969AbiH2WG5 (ORCPT + 99 others); Mon, 29 Aug 2022 18:06:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbiH2WGy (ORCPT ); Mon, 29 Aug 2022 18:06:54 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94E2D88DFF for ; Mon, 29 Aug 2022 15:06:52 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id l3so9282369plb.10 for ; Mon, 29 Aug 2022 15:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=PVgk1cYgmYdP4/z4FGNSnk6B21vheryH4WleroFD7+c=; b=H1qAkZGA4OVOv6X6d5+8sVRSkog8oFm3MWrQR/VztA7mi2MZAkkNCv8kA981Qq03Fx MUJmWhQAQRkde2/NnKvlNpZIUfiPRfurvuynlPO9SVIBUaNUcv+DBHHCwK9SBZdKgcfP 32Hlchfx3ykLEVe0oBHty7ikUk5Ly7kAHhY3w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=PVgk1cYgmYdP4/z4FGNSnk6B21vheryH4WleroFD7+c=; b=RCRG+WUp8T/kpGe02YIudMyBKCRuzw3cqGVr5UwzQP5Dls2sL8pJy00n71FyC/eYNz dPab36rE09SY4s2aQNfokvGrqEJHaxMnbtKWf8UmVERbjkeUTL4sIR8wEB3N4zvdjojy Kv/PJzthUO8m+4lm27ceqf5tr10OEGJsUjE2AAoNA0Gb2WgEky8BcJUIC5BdgPOGs7Ut SvSl/UHecc2L2Pla5gQp8d576iRI4l7Wyilzt16Nj6/ZwbNUweKRY4x37Yduxq6MW/zc l3V504XvI8VLlMubgvCm5AiN7tm7Clbon7iml7Bz7ZeSPeekBst3FHqIS/XIU3LxSxkI XVmQ== X-Gm-Message-State: ACgBeo0v6OVm+mqZgEM0mk7hH+kGBzIiWcKPcPCZFxpNbpCpPYyJjrZL 9U8ioCLPK0RJrwFDJYGyN3Pdfg== X-Received: by 2002:a17:90a:7343:b0:1fd:d6fc:b2f with SMTP id j3-20020a17090a734300b001fdd6fc0b2fmr6219851pjs.65.1661810812073; Mon, 29 Aug 2022 15:06:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x10-20020a170902a38a00b0016bdeb58611sm3271966pla.112.2022.08.29.15.06.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 15:06:51 -0700 (PDT) Date: Mon, 29 Aug 2022 15:06:49 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Vincent Mailhol , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] can: etas_es58x: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: <202208291506.869166F4CE@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 On Mon, Aug 29, 2022 at 04:50:59PM -0500, Gustavo A. R. Silva wrote: > Zero-length arrays are deprecated and we are moving towards adopting > C99 flexible-array members, instead. So, replace zero-length array > declaration in union es58x_urb_cmd with the new DECLARE_FLEX_ARRAY() > helper macro. > > This helper allows for a flexible-array member in a union. > > Link: https://github.com/KSPP/linux/issues/193 > Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook