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 94237C07E9D for ; Mon, 26 Sep 2022 22:02:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231365AbiIZWCe (ORCPT ); Mon, 26 Sep 2022 18:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231202AbiIZWCM (ORCPT ); Mon, 26 Sep 2022 18:02:12 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280C3E6DED for ; Mon, 26 Sep 2022 15:02:05 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id q9so7744975pgq.8 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=f0qGbexQBnwTzcK4d/suzkieJnR8tc1TILPcUQfW9bxgodQ06PFQt13JhIY992hTrK ab9U9Q+wt1wbaMLPBi0tpNUimVQIahEZ030iAWZiony8Ikg3wikIno90dRgLLsAnLcxM IKlweU5g7nsFSdxr6uLzJLq9gnex5dsrlRB2L9anM68iq2D7UtOabuqB6LKxGZeTH2H0 HzllKygASLj4r6rJmiARLpakkNUQNnzWpQ4FiIZLPIBg/l2OaX28kCBgS3rz5YOtI+Kw AyHtPYZaMytvssFTlE2JBwvZmMs9pr+1FKFqGF6ILRB02+MS4Ga0z7GJhXJByDegd9Yr cSWA== X-Gm-Message-State: ACrzQf2FqNyVVDMZVCJFOWOrqbYc1Wn6A5NnlZZc5Z4CBSoem1gVw1PB oNFgCQgGlMz++PDLTr+mqOwLyQ== 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-acpi@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