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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E6DAC32771 for ; Mon, 26 Sep 2022 22:01:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 926923E7; Tue, 27 Sep 2022 00:00:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 926923E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1664229681; bh=vCrDXyZgrDvpI0pCkgfHdqYhitVnQAJTiAYoUYAUUUE=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hPBB6ke0RNSVdCTj9EsGh+iSh74hRJqxKzFzHTaiTxwS5rpG5nXJzShygXMxJVMov RPMHimqwDj6tWSXzLLqXNd6UIx9yVyAZiD5RaWAWBgi0HlmK1tO3f8huoIbiE+bdaC 7+Cu+OpNOSDLMyMoqXuGf58DEqyZLnGY/IIz96TU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1C140F80254; Tue, 27 Sep 2022 00:00:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F38BEF8027D; Tue, 27 Sep 2022 00:00:28 +0200 (CEST) Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8A47DF8011C for ; Tue, 27 Sep 2022 00:00:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8A47DF8011C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="kdUvjIZk" Received: by mail-pf1-x436.google.com with SMTP id y136so8036527pfb.3 for ; Mon, 26 Sep 2022 15:00:22 -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=Z+V9HKEzE/RCD+QuWbpkWnuj/UNSjdfJYogyydpcU5E=; b=kdUvjIZklCh7p0dy2cbAnFPWMnaQ9KU6pSVxgIsJWiq+Rg7+dTzBAtFdhyUWV/brDb IpNU0HceJCKIFZWASfKOAiuYPFrkk0Borpnr6U537aRJejJsQ1FDpSlMfPthP5MEWXSa tH5lEPrVqifpJ/Q2B8PMTZfLFiNA71z5Vn/X4= 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=Z+V9HKEzE/RCD+QuWbpkWnuj/UNSjdfJYogyydpcU5E=; b=w6gbvx0r96EYknUl9aHU2QQGj8q5nfynwMSYg9RCafJEeWGXTTAbTiP2givtBFT0O3 7ySKUm9d9Bj/zGDCL65gHRM9xxLuYsjpEaKv+yWvBV/PZ/+AIJT9yP7Xd+P43I1McYuB THaMM2pn4s56hcZLsQ6xJ+LrLQ8AZumFh5uWLGr91j95gOUHAsT2bal7kvKWiVSxIFO5 /6rSG2S/YWUDDhKCkhO3P5/ZMecXfMGMyRRQZFMlF96Opaw12WC7gp9MbhzNf4Zfi8dZ 9TH+HLMpSgg/72xxrRFIYMUDBxwW5BM7bTFDw+5qeGY54x0L6ukMe+KoJhZmr8PwfniT Wc5w== X-Gm-Message-State: ACrzQf12CvXKpMdV9cMKVL04YdmwPHe6GKWurhzKnjb1C8WBcH7QQnOh lddNKzJXal2TcmVq4oP77+jMiJfa0f5IoQ== X-Google-Smtp-Source: AMsMyM6EH3TLoP5Ab4HNfRJxhe6hu7QGEmIFxPc9r5Y3xSUNCHlUgH+CVhBdd6e51YbiFdKv0fGl0Q== X-Received: by 2002:aa7:9e12:0:b0:53e:27d8:b71b with SMTP id y18-20020aa79e12000000b0053e27d8b71bmr25834865pfq.46.1664229619477; Mon, 26 Sep 2022 15:00:19 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a24-20020aa794b8000000b0053e6d352ae4sm6408pfl.24.2022.09.26.15.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 15:00:18 -0700 (PDT) Date: Mon, 26 Sep 2022 15:00:17 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Subject: Re: [PATCH][next] ASoC: SOF: control.h: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: <202209261500.B594CC10@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-hardening@vger.kernel.org, Takashi Iwai X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, Sep 26, 2022 at 04:40:55PM -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/211 > Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook 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 52F93C07E9D for ; Mon, 26 Sep 2022 22:00:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229621AbiIZWAW (ORCPT ); Mon, 26 Sep 2022 18:00:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiIZWAV (ORCPT ); Mon, 26 Sep 2022 18:00:21 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B5D19F180 for ; Mon, 26 Sep 2022 15:00:20 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id bh13so7761713pgb.4 for ; Mon, 26 Sep 2022 15:00:20 -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=Z+V9HKEzE/RCD+QuWbpkWnuj/UNSjdfJYogyydpcU5E=; b=kdUvjIZklCh7p0dy2cbAnFPWMnaQ9KU6pSVxgIsJWiq+Rg7+dTzBAtFdhyUWV/brDb IpNU0HceJCKIFZWASfKOAiuYPFrkk0Borpnr6U537aRJejJsQ1FDpSlMfPthP5MEWXSa tH5lEPrVqifpJ/Q2B8PMTZfLFiNA71z5Vn/X4= 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=Z+V9HKEzE/RCD+QuWbpkWnuj/UNSjdfJYogyydpcU5E=; b=Md9kMz2N5ccJNzvrBZM61SyOIpGYft5GEFAecJ/eS69PPkb8Xh4gTcQhAuYosp8dve TCm+Eqe+fpRnaWSm8odTdiVEjkIsBB95oXqkXMe2mSlGDFIYnWrj/lobxNQSnXlZ000A q4A2DGWBKTul4RHUTzaCjSK9WMjoI5H9FeTHH7iks3vDFe5DTI17hLaAbBD3DX5xBmji 4zGgkszqKthXnmP31PS2r6V028Tg83X+OVATib0ueY4lZLYu5isUdRsY3zCdiOQKlC7I UHAmQIpx6aQrYhCJ0gWDPFjHsijOCIvodN92vT+o8jTwkdOOvkNEINo1XwBqLW3njknN z9Iw== X-Gm-Message-State: ACrzQf1ugkE3Y44wW8Vw921S/CQ92LATQi7i4/oIOZArId7xRq/Zzro+ WKedyFNLjiKErORoIiNjS5Hszw== X-Google-Smtp-Source: AMsMyM6EH3TLoP5Ab4HNfRJxhe6hu7QGEmIFxPc9r5Y3xSUNCHlUgH+CVhBdd6e51YbiFdKv0fGl0Q== X-Received: by 2002:aa7:9e12:0:b0:53e:27d8:b71b with SMTP id y18-20020aa79e12000000b0053e27d8b71bmr25834865pfq.46.1664229619477; Mon, 26 Sep 2022 15:00:19 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a24-20020aa794b8000000b0053e6d352ae4sm6408pfl.24.2022.09.26.15.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 15:00:18 -0700 (PDT) Date: Mon, 26 Sep 2022 15:00:17 -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] ASoC: SOF: control.h: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: <202209261500.B594CC10@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-hardening@vger.kernel.org On Mon, Sep 26, 2022 at 04:40:55PM -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/211 > Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook