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 41D1EC32771 for ; Mon, 26 Sep 2022 22:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231372AbiIZWCF (ORCPT ); Mon, 26 Sep 2022 18:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231202AbiIZWBr (ORCPT ); Mon, 26 Sep 2022 18:01:47 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 466C5E3EDA for ; Mon, 26 Sep 2022 15:01:43 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id a29so8029137pfk.5 for ; Mon, 26 Sep 2022 15:01:43 -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=jyUZYtxAtN1iTCX6RvQjDGcCuH9kvS5eYzROcFEThqY=; b=MzGhAq5OFEs2Jw3eI9RLQ+YxWhJkO64hQtgKbJilL0PzjLuQEVe9C+/uRy4PdTG8tz bG/i1MUi6O6fNF6xlb8WrrVfZWKq91jRdsDITIW/6qF8KZWGb0TzYKKhR/KIZDGttILa jSjcZeLBLVxe8wgx2SPAqVZWq/GXhl8HuDA9A= 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=jyUZYtxAtN1iTCX6RvQjDGcCuH9kvS5eYzROcFEThqY=; b=rgxCHqxWMAMw8QhVJoC80Pycpf+tKD1K+BRRbzQzxrco7UngROrnUG2+YflXk2P5nW 4J25U3VAmrkMQg8AWkFjKHEKbLQLUP0CwBTrhSNOv7kUJ34SobVPz9p4TYhC0qMyDgi3 bBzCusjXTD5fjAbVswgQpY9KN2WTRlbOcHQbI8xmYYodpqyQ15JXeE/qR7YI9L+utLsi YExOO6O+XTSIr1ulRaXaVNgwn9qKaTQWGoxR7rXR6CMXa5CW4Pb5YimPlecQVyqb08W9 D0y5ScKFjhQs7kYxED3ANLOys+Yig9pFNkBbkYnvCAQOlTJ/zjGSUnDAAk+66w3fb0M+ U4AQ== X-Gm-Message-State: ACrzQf0RmvckSnfDED0uM7pQUGkBG3l81HY9eGx2a7a4Gu4SXwvErh+2 ypsnxE4WY98BCSz94SbnFdm15Q== X-Google-Smtp-Source: AMsMyM74ae4NJ4uEWNYiyk2e2ui6FrMQMT3qMJP8N0KnVh3xSmJR82MhWuJadxiI/Ex1FCEuybYffw== X-Received: by 2002:a63:91c8:0:b0:438:d55c:4484 with SMTP id l191-20020a6391c8000000b00438d55c4484mr21974518pge.157.1664229702792; Mon, 26 Sep 2022 15:01:42 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f1-20020a170902684100b00173cfb184c0sm11728552pln.32.2022.09.26.15.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 15:01:42 -0700 (PDT) Date: Mon, 26 Sep 2022 15:01:41 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] crypto: talitos - Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper Message-ID: <202209261501.D540C881@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:45:45PM -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/216 > Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook