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 42CA1C32771 for ; Mon, 26 Sep 2022 22:03:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231202AbiIZWDO (ORCPT ); Mon, 26 Sep 2022 18:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231245AbiIZWCd (ORCPT ); Mon, 26 Sep 2022 18:02:33 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32673E62EA for ; Mon, 26 Sep 2022 15:02:21 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id p1-20020a17090a2d8100b0020040a3f75eso8269678pjd.4 for ; Mon, 26 Sep 2022 15:02:21 -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=U3wnme3rYduyoVtIGUlTO8+VEkNnq6ssvexioDxXiO0=; b=m7A9wPP+UVXaKk5udgflsFMHhHQwhc4ksTnYsMbqMfDG+zGudxILZCBMPvDouo6CdU OYBbw1JYGR6PGl6yZEGs2tGERHcfDFJ6TvruMNhy75dUg2xdl101snMyzJHp/rPxtPbn pJCMR6qMtcCD/8rP213URMXb+s6hjzbt1RY/o= 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=U3wnme3rYduyoVtIGUlTO8+VEkNnq6ssvexioDxXiO0=; b=OQf7OKN9gwQsgRFo3y3+wGJqwvf73nyNCLZCUn+vujByAx4CA5mc5eXvpqqQ/eBhIs qBRH7WkgScNyWRx6y+ChBrmlsBldhT7p0z5iAwer+o8UNGkO/ofmePYBZXqkvOeSwEM0 PmsAMUbJG2yDZYtCyEw6aQZMoHABKd9Nq/U1U+n6O5wPhyLWfQwD08wvtus2TJfZZxdv nyhCM7GCUbgX0jnNEpQres7VKm6pBNeDJeUhfUVOsE5pKHozjxPgtZbQSf2TXu4ybykW /j3b3f5p8JyiYPN5zRE5wJne9dAUw/HLibpD54TGZS8RxSwWqVJuiAVVeU57AE7Dw7RQ Px2g== X-Gm-Message-State: ACrzQf1ZVgRk7zfAaVBpoERIEJozPNaz+x4hIHjv8y9sAXEfqQD8hM9z lK4VRlbNu8I08tKgo2dVprVkm2lwpwwzSA== X-Google-Smtp-Source: AMsMyM6CvAcNqkfH+luPZWoDW5EO95r3BSMZ19DrskXhps5m5gllCO8uEBnH0R9tyeEajnQjAOWoaA== X-Received: by 2002:a17:90a:fc98:b0:202:52cf:c117 with SMTP id ci24-20020a17090afc9800b0020252cfc117mr917381pjb.26.1664229740742; Mon, 26 Sep 2022 15:02:20 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id h16-20020aa796d0000000b00540d75197f2sm13197405pfq.143.2022.09.26.15.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 15:02:20 -0700 (PDT) Date: Mon, 26 Sep 2022 15:02:19 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Stanislav Yakovlev , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] ipw2x00: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: <202209261502.5E16542AB@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:49:04PM -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/220 > Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook