Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3710212rwe; Mon, 29 Aug 2022 18:30:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR5FJPOlFXFIUTfpLI0hOd4QMFo6VncV4uyjq3qh+tL/sJg83uWbgQt9DmOjZacGl7ksVxtz X-Received: by 2002:a17:907:2723:b0:741:4fbf:4658 with SMTP id d3-20020a170907272300b007414fbf4658mr7982709ejl.424.1661823059603; Mon, 29 Aug 2022 18:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661823059; cv=none; d=google.com; s=arc-20160816; b=yYqm4NUldmqBEDvtRo6cD2qhzhxl0sUdPRjYtu1yc4sIs0DnPD3DXfP09hNaq23Ai9 2Ua6wbY8gQVtYl6+TLlP+Mx6pPHcHEV8NYHY3Gh+HmaXgK7r08q1uwkg4y6HHS0ZuocT rm7uzs51YtuFP1X4BlS5rE3m+68pidV8CQq62ii9VgHc4EthRdlyLR8XkPJA4OcvCWwX uOx/blkAvNDLVfxxA5vQZF3XsReIxUiTkjgnFQeH+zkwfJZwAAZ0xySNYjm7E+dgaWPS rcFYi5VTrkl18fcgYIt+r1RcgQrGu0uJm3i9dtXDyPxqRs+sHh/j/pllUk40AtLVhVPf nJ6g== 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; bh=YY4EvYlIxF4cRJxUop7qemsLYYOepkMFoFeZ9idYEBg=; b=WL9AWd1qEJC58Kd6v7dmOfTq/Lk7hxhoqgu+VYc81apuSdrL+HZTcXxVfw8Tp+RhcW PBaCbA1SZG6UYd5JdGdGzn4mkBIjVT+BI+H5lx8L0jriduPweWNYSuCVQrGGrAi0fMma or7JZtYw20b6reeEisNnyxpElepDP9qOVjv5/aA+HgYlSJljH7nRkqYIAMbCJtM37Qvw K7uNIP4opSrkyifR90yEFK24Pg9q+a6Riv9+Havq0lhAS5u+hVipNisEt8f0Kauw841J Jnuc26LOhBKoOaanvmsvfzkTOMNtZOfeEWhtB8qPQVMXRflSokV6xzZe9VBMxVK9Wjr0 KV7g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht20-20020a170907609400b00741a1629d57si2123295ejc.627.2022.08.29.18.30.30; Mon, 29 Aug 2022 18:30:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbiH3BPP (ORCPT + 99 others); Mon, 29 Aug 2022 21:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbiH3BPO (ORCPT ); Mon, 29 Aug 2022 21:15:14 -0400 Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F5921FCD9; Mon, 29 Aug 2022 18:15:12 -0700 (PDT) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-33dc31f25f9so237806127b3.11; Mon, 29 Aug 2022 18:15:12 -0700 (PDT) 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; bh=YY4EvYlIxF4cRJxUop7qemsLYYOepkMFoFeZ9idYEBg=; b=P1gTJDxVXNI00q3I1CecYMSLhnZg6hBw7u/aGi6awjbaWExPmca84f4u5vDEyLkIxE sGJon5LRrbAfe1tqUcKcCDIysOKBVJUlBkiuWNu668nXdSU9vjmWmvihN+n7BgWUbGND GnD7WyRC2YhKVtTfo2rj627dXVLpwVzl/mTuWQCBCj9OAetbOHa4D7osFfL40uzDPdVK 4P1Q68BGt1ifHD+zEhzu3VE/1RIjzWnWHgIN3WFbwsHNggxvl1xYRa/vXtkh3OI0ioGk KIeUunJ8hYpsVeLdTgKYHuKAYqj3SmGTxskaLGxN1zAn64hJchLb/BSb2UWuTYlLPIKg Ga9A== X-Gm-Message-State: ACgBeo3dwfMPu8XiHGlqDEshvl82xfjtclXk4bJhbOvJuQHJLd/AbRmw NZA4E+EFlP8/f2VOfzPXytmQe5j4dyH53mgE1S8= X-Received: by 2002:a81:6f43:0:b0:335:9e7e:ad25 with SMTP id k64-20020a816f43000000b003359e7ead25mr12384196ywc.518.1661822111809; Mon, 29 Aug 2022 18:15:11 -0700 (PDT) MIME-Version: 1.0 References: <202208291506.869166F4CE@keescook> In-Reply-To: <202208291506.869166F4CE@keescook> From: Vincent MAILHOL Date: Tue, 30 Aug 2022 10:15:00 +0900 Message-ID: Subject: Re: [PATCH][next] can: etas_es58x: Replace zero-length array with DECLARE_FLEX_ARRAY() helper To: Kees Cook Cc: "Gustavo A. R. Silva" , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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. 30 Aug. 2022 at 07:15, Kees Cook wrote: > 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 Acked-by: Vincent Mailhol Yours sincerely, Vincent Mailhol