From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4398C07E9D for ; Mon, 26 Sep 2022 22:02:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbiIZWCh (ORCPT ); Mon, 26 Sep 2022 18:02:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231374AbiIZWCM (ORCPT ); Mon, 26 Sep 2022 18:02:12 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 581DCE720D for ; Mon, 26 Sep 2022 15:02:05 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id 9so7988315pfz.12 for ; Mon, 26 Sep 2022 15:02:05 -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:subject:date; bh=UWb8wOcddtfIJyUFHBW5IFK0MRMvmDGvIdsfGhwq6fs=; b=dC8LNQiZOc8Y9cleQx7I90Ilxgksx1StItiDqfDAw5kcu+wbT6Svs4BKe6de3VBEa8 2Vz0EVtEAeXZQrz5wyhwgRc1V1hk3ZBnZN5xcRPZGY/PEC3WDGhqxxwUHRJQdJVtRYP3 f+4j6TzqwFY0fyt3pnKplYB3IrwAqWudnuM18= 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:subject:date; bh=UWb8wOcddtfIJyUFHBW5IFK0MRMvmDGvIdsfGhwq6fs=; b=SFE7yflFlXYqmnJ1EYMxKx39kOf+ve0RZOlJh+fu1TzsVrnmLATKnJSNu3Hpn2FMgR fbAj/Xe/fZqi26fg3zRmqH2v/0Qu47XmiBs7N7mDJUrtMxK2dTw2y2ku/MQZF1fetJ+g UdeQ1AS4tSn2/CH5UXOpKyC7NuPY1Mv2I8whkza9r5vbKCjSGCKGBOLksjAs81Hf3+nG fQ58OY46LfK4+XWbR0kOhr/L5tEEqG+nHt38Ub1yE/bEJ3etN2jOFRSpxVQTzJaNi0jU e6nvaSFA1F2Ch0Bra/QgHEmx9VOCMFVjxmqas866UIg2L0kpgJPeqY/8jbmelvpmRG+L UDnA== X-Gm-Message-State: ACrzQf1zeKI6w/0Ec9y1U0jQWpbNOWv3SAAOVeeYvdpaeGVT4Er9hdSu YTFnki/qirWjHlfWLlFncnMCNw== X-Google-Smtp-Source: AMsMyM7++pwLxo9jbIU4Zan+KiWB3G+z82cHwCpvQIpOj2QII3T8ZRtHBoCOWvcGBn2icNismTMwTA== X-Received: by 2002:a63:3348:0:b0:439:db24:8b02 with SMTP id z69-20020a633348000000b00439db248b02mr21383347pgz.425.1664229724728; Mon, 26 Sep 2022 15:02:04 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t15-20020a17090340cf00b001754a3c5404sm11444207pld.212.2022.09.26.15.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 15:02:04 -0700 (PDT) Date: Mon, 26 Sep 2022 15:02:03 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Wolfram Sang , Mika Westerberg , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] i2c: acpi: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: <202209261502.AA269D2@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 26, 2022 at 04:47:25PM -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 arrays > declarations in anonymous union with the new DECLARE_FLEX_ARRAY() > helper macro. > > This helper allows for flexible-array members in unions. > > Link: https://github.com/KSPP/linux/issues/193 > Link: https://github.com/KSPP/linux/issues/218 > Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook