Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3590388rwe; Mon, 29 Aug 2022 15:18:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR46fRwWYMTgBoskAtGu6BXN28yWZKTjI8Z+dB8ZwKQh4pR2rDcSYcK+OWt5uVq7rTxjC4PQ X-Received: by 2002:a17:907:3d90:b0:741:346a:6e46 with SMTP id he16-20020a1709073d9000b00741346a6e46mr10318558ejc.279.1661811535559; Mon, 29 Aug 2022 15:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661811535; cv=none; d=google.com; s=arc-20160816; b=U6b6J6euVuVHHTEeFdsghaPkCOb0AqvahCy0E+JMPSli+g65ffZhNFv/zQSaCzJ/nh zFCSGJzGD5F8hLMUJHjgtFyCzl0RmiAQ9oxOH9SYy4Plx3kHLR7DpdksTa9Meyjkndo8 /xMYpk8bC4UnvzLlmNU2L664nAQYE4rgv3/SmYWL0RnrEx8h4lt0QJW3EhCPWtdQKrq4 BG7RDDKGIlpJV705fiwMcMrKw4yfY7wJb52tdaFsxPjYFNQrzFpCxX9MIGc5xOIIyB4r J6BtAwDNu0d/wAjE5mxkeeDFCNafqyaX8oo3AHcYgFBTfCnFI9ilNnv7X8YPJhH50n3E GNKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=k2Isl7E2TJrjz9RWvaLb1hVmrU1bdckrw7QzjwxtCok=; b=H8Jjw/ulWbiCSBf/3vJcD+VSTcjJGBv7CYloaG4QJ0AgT1Gx+GXSNtkwEfJdmhrMno 1KDSxo9R8KhKArjsF5uKqTumT+kQb/A+RAhwuJl1RWyVv7s62nFnSk8xzwvMUTxM8eiX gS//uTl3AGjPXqE0jBxyd/WY6Tt9IhVtpDbnaRZUF4n1e10GRpCCavXvf6cbW6IGCvI6 3FTDL+6mEnRA5pA4MmnRrWoJI7D59ynqIPQ77Du8o6oxA83FbsojDxUZjEmUGEtuhfEZ Pozbl55IDFf7TbpDufYPQQ9eoRwGsuPDC96tfsz/vNIwBuStY0R7MWgxFDtzNvgkzYFz O6tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kgkdmJX7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a50fb09000000b00445e9f07800si6527055edq.501.2022.08.29.15.18.30; Mon, 29 Aug 2022 15:18:55 -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; dkim=pass header.i=@chromium.org header.s=google header.b=kgkdmJX7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbiH2WHX (ORCPT + 99 others); Mon, 29 Aug 2022 18:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbiH2WHU (ORCPT ); Mon, 29 Aug 2022 18:07:20 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E01D3A2ABC for ; Mon, 29 Aug 2022 15:07:18 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id l5so5436851pjy.5 for ; Mon, 29 Aug 2022 15:07:18 -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; bh=k2Isl7E2TJrjz9RWvaLb1hVmrU1bdckrw7QzjwxtCok=; b=kgkdmJX7EizEvIXDuh3PyH9dF4tkinwEbVoInAmpJDW2RpLs7hLMkXJ04kArFIK4uw xJinRNSts20Fpeyl0cWOYrfKmZ93mkCktWz28aG7myBx5tzDJ3gL5KlNzCWRomOCtDQZ RUyqDuIw0xjEQayVF6Ia5ksfmxWePWZW1oRRQ= 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; bh=k2Isl7E2TJrjz9RWvaLb1hVmrU1bdckrw7QzjwxtCok=; b=KxCHePPrXj/PgENPpLLeUFLckL0TCXvlL+PpP6sW36pZepd1sS8CBZI7mtfiz+WC7e /yP7Vx5CmKsszDW9BE0fAxzCvM7rW+ZOXNKNzN2tWtFvgRJvlpUvDvUny602g4G7Aiss 1P4CpLGO5SXA363HhiSTq2Dq3t3hWdZkk/8PZBZWcVpzEh9w2m6M2gqFmDX+c7IAoNSY 3qJzKYdFEOHdaW72ER9NOXnHv7DhrIvqexP7FBz01bxp1AgpEgBKvQdjaMfbjX/saqEN 48HN4f0NGCbwlrSFsXvpzAloHq4VmnfYhKEYVECHdTxo18FQAbwNSvmSXjlCIxa8zlh6 ODcg== X-Gm-Message-State: ACgBeo0PObd4tSNPhclVxoRt0mxt4vH7C+gomd5PJrJdFxybqCG5VneB 1algCBI9E2GzzUf0HlkXqePUnA== X-Received: by 2002:a17:902:c94d:b0:16d:c10a:650e with SMTP id i13-20020a170902c94d00b0016dc10a650emr17851903pla.29.1661810838390; Mon, 29 Aug 2022 15:07:18 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id md10-20020a17090b23ca00b001f24c08c3fesm7324164pjb.1.2022.08.29.15.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 15:07:17 -0700 (PDT) Date: Mon, 29 Aug 2022 15:07:16 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] ALSA: hda/hdmi: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: <202208291507.FBA7EF4@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, Aug 29, 2022 at 04:52:03PM -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 audio_infoframe 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 -- Kees Cook